mirror of
https://github.com/lxsang/antos-frontend.git
synced 2024-12-27 01:38:21 +01:00
fix bug
This commit is contained in:
parent
aec5457a31
commit
5b6e68116b
@ -1,5 +1,5 @@
|
||||
<afx-button class= { btactive: selected }>
|
||||
<button disabled={ enable == false } onclick="{ _onbtclick }" ref = "mybtn" >
|
||||
<afx-button >
|
||||
<button class= { btactive: selected } disabled={ enable == false } onclick="{ _onbtclick }" ref = "mybtn" >
|
||||
<afx-label color = {color} icon={icon} iconclass = {iconclass} text = {text} ></afx-label>
|
||||
</button>
|
||||
<script>
|
||||
|
@ -284,16 +284,29 @@ class AntOSDK extends this.OS.GUI.BaseApplication
|
||||
me = @
|
||||
me.prjfile = file
|
||||
if(me.tabarea)
|
||||
file.read (d) ->
|
||||
file.read (data) ->
|
||||
me.log "INFO", __("Opening {0}", me.prjfile.path)
|
||||
fn = (d, dt) ->
|
||||
me.tabarea.set "selected", -1
|
||||
me.tabarea.set "items", []
|
||||
me.currfile = "#{d.root}/README.md".asFileHandler()
|
||||
me.currfile.dirty = false
|
||||
me.currfile.dirty = dt
|
||||
me.chdir d.root if d.root
|
||||
me.prjfile.cache = d
|
||||
me.log "INFO", __("Opening {0}", me.currfile.path)
|
||||
me.open me.currfile
|
||||
# verify if the path is ok
|
||||
data.root.asFileHandler().onready () ->
|
||||
fn(data, false)
|
||||
, (e) ->
|
||||
# try the current folder of the project file
|
||||
pr = file.parent()
|
||||
me.log "INFO", __("Project root folder not found, try {0}", pr)
|
||||
pr.asFileHandler().onready () ->
|
||||
data.root = pr
|
||||
fn(data, true)
|
||||
, (e) ->
|
||||
me.error __("Cannot find the project root, please modify the project file")
|
||||
,"json"
|
||||
else
|
||||
me.init()
|
||||
|
@ -18,7 +18,7 @@ afx-button i.icon-style {
|
||||
display: inline-block;
|
||||
float:left;
|
||||
}
|
||||
afx-button button:active, afx-button.btactive button {
|
||||
afx-button button:active, afx-button button.btactive {
|
||||
background-color: #2786F3;
|
||||
color: white;
|
||||
border: 1px solid #dedede;
|
||||
|
Loading…
Reference in New Issue
Block a user