mirror of
https://shylinux.com/x/volcanos
synced 2025-04-25 16:58:06 +08:00
opt code
This commit is contained in:
parent
5e44892381
commit
a8c028dd33
@ -295,7 +295,7 @@ Volcanos(chat.ONIMPORT, {
|
||||
can.onmotion.toggle(can, can.ui.profile_output, true)
|
||||
can.onmotion.toggle(can, can.ui.profile, true), can.onimport.layout(can)
|
||||
},
|
||||
display: function(can, msg) {
|
||||
display: function(can, msg) { var target = can.ui.display
|
||||
var height = can.display_size[can.onexport.keys(can)]||can.ConfHeight()/2
|
||||
can.onimport.process(can, msg, can.ui.display, height, can.ui.display.offsetWidth, function(sub) {
|
||||
can.page.style(can, sub._output, html.HEIGHT, "", html.MAX_HEIGHT, ""), can.onmotion.delay(can, function() {
|
||||
@ -305,6 +305,13 @@ Volcanos(chat.ONIMPORT, {
|
||||
}), sub.onaction.close = function() { can.onmotion.hidden(can, can.ui.display), can.onimport.layout(can) }
|
||||
})
|
||||
can.onmotion.toggle(can, can.ui.display, true), can.onimport.layout(can)
|
||||
if (msg.Option(ice.MSG_PROCESS) != "_field") {
|
||||
can.onmotion.delay(can, function() { can.page.style(can, target, html.HEIGHT, "", html.MAX_HEIGHT, "")
|
||||
can.display_size[can.onexport.keys(can)] = can.base.Max(target.offsetHeight, can.ConfHeight()/2)
|
||||
can.page.style(can, target, html.MAX_HEIGHT, can.display_size[can.onexport.keys(can)])
|
||||
can.onimport.layout(can)
|
||||
})
|
||||
}
|
||||
},
|
||||
process: function(can, msg, target, height, width, cb) { can.onmotion.clear(can, target), can.user.toastSuccess(can)
|
||||
if (msg.Option(ice.MSG_PROCESS) == "_field") {
|
||||
@ -325,6 +332,7 @@ Volcanos(chat.ONIMPORT, {
|
||||
})
|
||||
} }}
|
||||
}, target), can.onappend.board(can, msg, target)
|
||||
can.onappend._status(can, msg.Option(ice.MSG_STATUS), can.page.Append(can, target, ["status"])._target)
|
||||
} else {
|
||||
can.onmotion.hidden(can, target.parentNode)
|
||||
}
|
||||
|
@ -29,11 +29,9 @@ Volcanos(chat.ONSYNTAX, {
|
||||
},
|
||||
},
|
||||
h: {
|
||||
render: {},
|
||||
link: "c",
|
||||
},
|
||||
c: {
|
||||
render: {},
|
||||
prefix: {
|
||||
"//": code.COMMENT,
|
||||
"/*": code.COMMENT,
|
||||
|
@ -1,6 +1,6 @@
|
||||
Volcanos(chat.ONIMPORT, {_init: function(can, msg, cb, target) { can.onmotion.clear(can)
|
||||
can.path = can.request(), can.list = [], msg.Table(function(value) { can.base.endWith(value.path, ice.PS)? can.path.Push(value): can.list.push(value) })
|
||||
can.ui = can.onlayout.profile(can, target), can.path.Table(function(item) { item.name = item.path
|
||||
can._path = can.request(), can.list = [], msg.Table(function(value) { can.base.endWith(value.path, ice.PS)? can._path.Push(value): can.list.push(value) })
|
||||
can.ui = can.onlayout.profile(can, target), can._path.Table(function(item) { item.name = item.path
|
||||
can.onimport.item(can, item, function() { can.Option(nfs.PATH, item.path), can.Update() }, function() {}, can.ui.project)
|
||||
}), can.isCmdMode() || can.onmotion.hidden(can, can._action), can.onmotion.hidden(can, can.ui.project)
|
||||
can.base.isFunc(cb) && cb(msg), can.Action(html.HEIGHT, ice.AUTO), can.Action(mdb.LIMIT, 6)
|
||||
|
@ -9,6 +9,14 @@ Volcanos(chat.ONIMPORT, {_init: function(can, msg, cb, target) { can.onmotion.cl
|
||||
can.page.style(can, can._output, html.MAX_HEIGHT, can.ConfHeight())
|
||||
}
|
||||
},
|
||||
_system_app: function(can, msg, target) {
|
||||
can.page.Appends(can, target, msg.Table(function(item) { var name = item.name||item.text
|
||||
return {view: html.ITEM, style: {"text-align": "center", margin: 10, width: 100, "float": "left"}, list: [
|
||||
{type: html.IMG, src: "/share/local/usr/icons/"+item.text, style: {display: html.BLOCK, width: 100}},
|
||||
{text: name.split(ice.PT)[0].replace(ice.SP, ice.NL), style: {display: html.BLOCK, height: 40}},
|
||||
], onclick: function(event) { can.runAction(can.request(event, item, can.Option()), "xterm", []) }}
|
||||
}))
|
||||
},
|
||||
card: function(can, msg, target) {
|
||||
can.page.Appends(can, target, msg.Table(function(item) {
|
||||
return {view: html.ITEM+ice.SP+(item.status||""), list: [
|
||||
|
Loading…
x
Reference in New Issue
Block a user