mirror of
https://github.com/lxsang/antos-frontend.git
synced 2025-02-22 18:02:47 +01:00
fix menu bug
This commit is contained in:
parent
702a83df6a
commit
7fefc17f04
@ -54,7 +54,7 @@ class BasicDialog extends BaseDialog
|
||||
|
||||
init: () ->
|
||||
@title = @name if not @title
|
||||
html = "<afx-app-window data-id = 'dia-window' apptitle='#{@title}' width='#{@conf.width}' height='#{@conf.height}'>
|
||||
html = "<afx-app-window data-id = 'dia-window' width='#{@conf.width}' height='#{@conf.height}'>
|
||||
<afx-vbox>"
|
||||
html += "<#{v.tag} #{v.att} style = 'margin-left:5px; margin-right:5px;' data-id = 'content#{k}'></#{v.tag}>" for k,v of @conf.tags
|
||||
html += "<div data-height = '35' style=' text-align:right;padding-top:3px;'>"
|
||||
@ -64,6 +64,7 @@ class BasicDialog extends BaseDialog
|
||||
_GUI.htmlToScheme html, @, @host
|
||||
|
||||
main: () ->
|
||||
@scheme.set "apptitle", @title
|
||||
@scheme.set "minimizable", false
|
||||
@scheme.set "resizable", @conf.resizable if @conf.resizable isnt undefined
|
||||
me = @
|
||||
@ -266,7 +267,7 @@ class FileDiaLog extends BaseDialog
|
||||
location = @find "location"
|
||||
filename = @find "filename"
|
||||
me = @
|
||||
@scheme.set "apptitle", "#{@title}"
|
||||
@scheme.set "apptitle", @title
|
||||
fileview.set "fetch", (e, f) ->
|
||||
return unless e.child
|
||||
e.child.path.asFileHandler().read (d) ->
|
||||
|
20
src/core/tags/afx-html.tag
Normal file
20
src/core/tags/afx-html.tag
Normal file
@ -0,0 +1,20 @@
|
||||
<afx-html ref = "container">
|
||||
<script>
|
||||
this.content = opts.content
|
||||
this.root.innerHTML = this.content
|
||||
this.updateContent = undefined
|
||||
var self = this
|
||||
this.root.set = function(k, v)
|
||||
{
|
||||
self[k] = v
|
||||
if(k == "content")
|
||||
self.root.innerHTML = v
|
||||
else if(k == "updateContent")
|
||||
self.update()
|
||||
}
|
||||
this.on("update", function(){
|
||||
if(self.updateContent)
|
||||
self.updateContent()
|
||||
})
|
||||
</script>
|
||||
</afx-html>
|
@ -18,8 +18,11 @@ afx-menu a afx-label{
|
||||
afx-menu ul{
|
||||
padding:0;
|
||||
margin: 0;
|
||||
display:inline-block;
|
||||
}
|
||||
afx-menu ul li{
|
||||
white-space:nowrap;
|
||||
}
|
||||
|
||||
afx-menu afx-switch span{
|
||||
width: 20px;
|
||||
height: 16px;
|
||||
|
Loading…
x
Reference in New Issue
Block a user