mirror of
https://shylinux.com/x/volcanos
synced 2025-04-25 08:48:06 +08:00
add some
This commit is contained in:
parent
0b3ee1d4fa
commit
3d45725678
@ -17,26 +17,22 @@ Volcanos(chat.ONIMPORT, {
|
|||||||
_session: function(can, msg) { can.misc.sessionStorage(can, msg._arg[0], msg._arg[1]), can.Update() },
|
_session: function(can, msg) { can.misc.sessionStorage(can, msg._arg[0], msg._arg[1]), can.Update() },
|
||||||
_field: function(can, msg, cb) {
|
_field: function(can, msg, cb) {
|
||||||
var height = can.ConfHeight()-can.onexport.actionHeight(can)-(can.onexport.statusHeight(can)||1), width = can.ConfWidth()
|
var height = can.ConfHeight()-can.onexport.actionHeight(can)-(can.onexport.statusHeight(can)||1), width = can.ConfWidth()
|
||||||
var tabs = false, tabHash = msg.Option("field.tabs")
|
var tabs = false, tabHash = msg.Option("field.tabs"); if (tabHash) {
|
||||||
if (tabHash) {
|
can.sub && can.sub.onimport.tabs(can, [{name: tabHash.slice(0, 6)}], function() { can.onmotion.cache(can, function() { return tabHash }) }), tabs = true
|
||||||
can.sub && can.sub.onimport.tabs(can, [{name: tabHash.slice(0, 6)}], function() {
|
|
||||||
can.onmotion.cache(can, function() { return tabHash })
|
|
||||||
}), tabs = true
|
|
||||||
} else {
|
} else {
|
||||||
if (!can.page.tagis(can._target, html.FIELDSET_OUTPUT)) {
|
if (msg.Length() > 1) {
|
||||||
|
height = height / msg.Length()
|
||||||
|
} else if (can._output.innerHTML && !can.page.tagis(can._target, html.FIELDSET_OUTPUT)) {
|
||||||
height = can.base.Max(html.STORY_HEIGHT, height)
|
height = can.base.Max(html.STORY_HEIGHT, height)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
msg.Table(function(item) { tabs && can.onmotion.cache(can, function() { return tabHash })
|
msg.Table(function(item) { tabs && can.onmotion.cache(can, function() { return tabHash })
|
||||||
can.onappend._plugin(can, item, {index: item.index, args: can.base.Obj(item.args||item.arg, []), height: height, width: width}, function(sub) { can._plugins = (can._plugins||[]).concat([sub])
|
can.onappend._plugin(can, item, {index: item.index, args: can.base.Obj(item.args||item.arg, []), height: height, width: width}, function(sub) { can._plugins = (can._plugins||[]).concat([sub])
|
||||||
sub.run = function(event, cmds, cb) { var index = msg.Option(ice.MSG_INDEX); can.run(can.request(event, {pod: item.space}), (msg[ice.MSG_PREFIX]? msg[ice.MSG_PREFIX]: index? [ctx.RUN, index]: []).concat(cmds), cb, true) }
|
sub.run = function(event, cmds, cb) { var index = msg.Option(ice.MSG_INDEX)||item.index; can.run(can.request(event, {pod: item.space}), (msg[ice.MSG_PREFIX]? msg[ice.MSG_PREFIX]: index? [ctx.RUN, index]: []).concat(cmds), cb, true) }
|
||||||
can.page.ClassList.has(can, sub._target, html.FLOAT)? can.onmotion.float(sub): sub.onimport.size(sub, height, width, true), cb && cb(sub)
|
can.page.ClassList.has(can, sub._target, html.FLOAT)? can.onmotion.float(sub): sub.onimport.size(sub, height, width, true), cb && cb(sub)
|
||||||
if (item.style == html.FLOAT) { return } can.onmotion.delay(can, function() { can.onmotion.scrollIntoView(can, sub._target) }, 300)
|
if (item.style == html.FLOAT) { return } can.onmotion.delay(can, function() { can.onmotion.scrollIntoView(can, sub._target) }, 300)
|
||||||
sub.onexport.output = function() { if (tabs) {
|
sub.onexport.output = function() { if (tabs) { msg.Option(ice.MSG_ACTION) && can.onappend._action(can, msg.Option(ice.MSG_ACTION))
|
||||||
msg.Option(ice.MSG_ACTION) && can.onappend._action(can, msg.Option(ice.MSG_ACTION))
|
sub.sub.onimport.tabs(can, [{name: tabHash.slice(0, 6)}], function() { tabs || can.onmotion.cache(can, function() { return tabHash }) }), tabs = false
|
||||||
sub.sub.onimport.tabs(can, [{name: tabHash.slice(0, 6)}], function() {
|
|
||||||
tabs || can.onmotion.cache(can, function() { return tabHash })
|
|
||||||
}), tabs = false
|
|
||||||
} }
|
} }
|
||||||
}, item.style == html.FLOAT && can.page.tagis(can._target, "fieldset.story")? document.body: can._output)
|
}, item.style == html.FLOAT && can.page.tagis(can._target, "fieldset.story")? document.body: can._output)
|
||||||
})
|
})
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
Volcanos(chat.ONIMPORT, {_init: function(can, msg, target) {
|
Volcanos(chat.ONIMPORT, {_init: function(can, msg, target, cb) { cb && cb(msg)
|
||||||
|
if (msg.index && msg.meta && msg.list) { return can.sup.onimport._field(can.sup, msg) }
|
||||||
if (can.isCmdMode() && can.Conf(ctx.STYLE) == html.FORM) { can.onappend.style(can, html.OUTPUT) }
|
if (can.isCmdMode() && can.Conf(ctx.STYLE) == html.FORM) { can.onappend.style(can, html.OUTPUT) }
|
||||||
if (can.Mode() == html.ZONE) { return can.onimport._vimer_zone(can, msg, target) }
|
if (can.Mode() == html.ZONE) { return can.onimport._vimer_zone(can, msg, target) }
|
||||||
var cbs = can.onimport[can.Conf(ctx.STYLE)||msg.Option(ctx.STYLE)]; if (can.base.isFunc(cbs)) {
|
var cbs = can.onimport[can.Conf(ctx.STYLE)||msg.Option(ctx.STYLE)]; if (can.base.isFunc(cbs)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user