mirror of
https://shylinux.com/x/volcanos
synced 2025-04-25 08:48:06 +08:00
opt table.js
This commit is contained in:
parent
f9f88bc461
commit
0202603b85
@ -1,4 +1,4 @@
|
||||
# volcanos
|
||||
|
||||
volcanos 是一个前端框架,通过集群化、模块化、自动化的方式,快速的创建、共享应用程序和数据。
|
||||
volcanos 是一个前端框架,通过集群化、模块化、自动化的方式,快速的开发、创建、共享应用程序和数据。
|
||||
|
||||
|
2
frame.js
2
frame.js
@ -598,7 +598,7 @@ Volcanos(chat.ONMOTION, {_init: function(can, target) {
|
||||
var pos = can.page.Cache(target._cache_key = key, target); if (pos) { target.scrollTo && target.scrollTo(0, pos-1); return target }
|
||||
}).length > 0
|
||||
},
|
||||
share: function(event, can, input, args) { var _args = args
|
||||
share: function(event, can, input, args) { var _args = args; can.request(event, {submit: "共享"})
|
||||
return can.user.input(event, can, input, function(args) { can.onengine.signal(can, chat.ONSHARE, can.request(event, {args: [mdb.TYPE, chat.FIELD].concat(_args||[], args||[])})) })
|
||||
},
|
||||
focus: function(can, target, value) { if (!target) { return } if (!can.base.isUndefined(value)) { target.value = value }
|
||||
|
@ -127,7 +127,6 @@ form.option>div.cmd, form.option>div.textarea { width:100%; } textarea { resize:
|
||||
legend, form.option, form.option>div.item, div.action, div.action>div.item, div.action>div.tabs, fieldset>div.status>div.item, div.layout.flex>* { float:left; }
|
||||
div.action, div.output, div.status, div.project, div.display, div.profile, div.content, table.content, table.content td, div.code, div.plug, div.story, div.toast, div.carte, fieldset.input { overflow:auto; }
|
||||
div.output, fieldset>div.status, div.item.textarea, div.project div.item, div.content:not(.item), div.code, div.story[data-type=spark] { clear:both; }
|
||||
// fieldset>div.output, fieldset>div.status, div.item.textarea, div.project div.item, div.content:not(.item), div.code, div.story[data-type=spark] { clear:both; }
|
||||
fieldset>div.status>legend { margin-left:2px; margin-right:0; height:30px; float:right; clear:none; }
|
||||
fieldset.plugin:not(.output):not(.float):not(.full):not(.cmd) { padding:10px; margin:10px; }
|
||||
fieldset.plugin:not(.float):not(.full):not(.cmd)>legend { float:none; }
|
||||
@ -325,8 +324,6 @@ body.mobile div.output.card div.item { height:160px; float:none; }
|
||||
body.mobile.simple div.output.card div.item { width:100%; }
|
||||
body.mobile.landscape div.output.card div.item { width:auto; float:left; }
|
||||
/* scrollbar */
|
||||
// body { overflow:-moz-scrollbars-none; -ms-overflow-style:none; }
|
||||
// body::-webkit-scrollbar { width:0 !important; height:0 !important; }
|
||||
fieldset.panel.Action>div.output::-webkit-scrollbar { width:0 !important; height:0 !important; }
|
||||
div.story[data-type=spark]::-webkit-scrollbar { width:0 !important; height:0 !important; }
|
||||
div.project::-webkit-scrollbar { width:0 !important; height:0 !important; }
|
||||
|
@ -146,6 +146,7 @@ Volcanos("user", {
|
||||
})}]}, html.ACTION,
|
||||
]}])
|
||||
var action = can.onappend._action(can, button||[html.SUBMIT, html.CANCEL], ui.action, {
|
||||
_trans: {submit: msg.Option("submit")},
|
||||
focus: function() { can.onmotion.focus(can, can.page.Select(can, ui._target, html.INPUT_ARGS)[0]) },
|
||||
cancel: function() { can.page.Remove(can, ui._target) },
|
||||
submit: function(event, can, button) { var args = [], data = {}, err = false
|
||||
|
@ -14,33 +14,27 @@ Volcanos(chat.ONIMPORT, {
|
||||
_field: function(can, msg) { var opts = {}
|
||||
can.page.SelectArgs(can, can._option, "", function(target) { var value = msg.Option(target.name); target.name && value && (opts[target.name] = value) })
|
||||
var height = can.ConfHeight(); can.page.Select(can, can._output, html.TABLE, function(target) { height -= target.offsetHeight })
|
||||
msg.Table(function(item) { can.onappend._plugin(can, item, {index: item.index, args: can.base.Obj(item[ice.ARG], []), height: can.base.Min(height, 200)}, function(sub, meta) {
|
||||
msg.Table(function(item) { can.onappend._plugin(can, item, {index: item.index, args: can.base.Obj(item.args||item.arg, []), height: can.base.Min(height, 200)}, function(sub, meta) {
|
||||
sub.Conf(can.base.Obj(item.conf)); if (sub.isSimpleMode()) { (function() { sub.ConfHeight(can.ConfHeight()/2)
|
||||
var msg = can.request(); msg.Echo(sub.Conf(ice.MSG_RESULT)), can.onappend._output(sub, msg, sub.Conf(ctx.DISPLAY))
|
||||
})(); return } var opt = can.base.Obj(item[ice.OPT], []); sub.ConfWidth(can.ConfWidth())
|
||||
sub.run = function(event, cmds, cb) {
|
||||
var res = can.request(event, can.Option(), opts); for (var i = 0; i < opt.length; i += 2) { res.Option(opt[i], opt[i+1]) }
|
||||
can.run(event, (msg.Option("_index")==can._index? msg[ice.MSG_PREFIX]||[]: [ice.RUN, msg.Option("_index")]).concat(cmds), cb, true)
|
||||
sub.run = function(event, cmds, cb) { var res = can.request(event, can.Option(), opts); for (var i = 0; i < opt.length; i += 2) { res.Option(opt[i], opt[i+1]) }
|
||||
can.run(event, (msg.Option("_index") == can._index? msg[ice.MSG_PREFIX]||[]: [ice.RUN, msg.Option("_index")]).concat(cmds), cb, true)
|
||||
}
|
||||
}) })
|
||||
},
|
||||
_float: function(can, msg) { var arg = msg._arg
|
||||
msg.Table(function(item) { can.onappend._plugin(can, item, {index: item.index, args: arg.slice(1), mode: chat.FLOAT}, function(sub, meta) {
|
||||
sub.run = function(event, cmds, cb) { can.runAction(can.request(event, {path: msg.Option(nfs.PATH), text: msg.Option(mdb.TEXT)}), [ice.RUN, arg[0]], cmds, cb) }
|
||||
can.getActionSize(function(left, top, width, height) { left = left||0, top = !can.Mode()? 120: 0
|
||||
sub.onimport.size(sub, can.base.Max(height, can.page.height())-top-(can.user.isMobile&&!can.user.isLandscape()? 2*html.ACTION_HEIGHT: 0), width, true)
|
||||
can.onmotion.move(can, sub._target, {left: left, top: top})
|
||||
})
|
||||
}, document.body) })
|
||||
},
|
||||
_float: function(can, msg) { var arg = msg._arg; msg.Table(function(item) { can.onappend._plugin(can, item, {index: item.index, args: arg.slice(1), mode: chat.FLOAT}, function(sub, meta) {
|
||||
sub.run = function(event, cmds, cb) { can.runAction(can.request(event, {path: msg.Option(nfs.PATH), text: msg.Option(mdb.TEXT)}), [ice.RUN, arg[0]], cmds, cb) }
|
||||
can.getActionSize(function(left, top, width, height) { left = left||0, top = !can.Mode()? 120: 0, can.onmotion.move(can, sub._target, {left: left, top: top})
|
||||
sub.onimport.size(sub, can.base.Max(height, can.page.height())-top-(can.user.isMobile&&!can.user.isLandscape()? 2*html.ACTION_HEIGHT: 0), width, true)
|
||||
})
|
||||
}, document.body) }) },
|
||||
_hold: function(can, msg, arg) { arg && can.user.toast(can, arg) },
|
||||
_back: function(can) { can._history.pop()
|
||||
for (var index = 0, his = can._history.pop(); his; his = can._history.pop()) { if (his[0] == ctx.ACTION) { continue }
|
||||
can.page.SelectArgs(can, can._option, "", function(item) { item.value = his[index++]||"" })
|
||||
can.page.SelectArgs(can, can._action, "", function(item) { item.value = his[index++]||"" })
|
||||
can.Update(); break
|
||||
} !his && can.Update()
|
||||
},
|
||||
_back: function(can) { can._history.pop(); for (var index = 0, his = can._history.pop(); his; his = can._history.pop()) { if (his[0] == ctx.ACTION) { continue }
|
||||
can.page.SelectArgs(can, can._option, "", function(item) { item.value = his[index++]||"" })
|
||||
can.page.SelectArgs(can, can._action, "", function(item) { item.value = his[index++]||"" })
|
||||
can.Update(); break
|
||||
} !his && can.Update() },
|
||||
_rich: function(can, msg) { if (can.page.Select(can, can._output, [html.TABLE_CONTENT, html.TBODY], function(table) {
|
||||
var head = can.page.Select(can, can._output, [html.TABLE_CONTENT, html.TH], function(th) { return th.innerText })
|
||||
return can.page.Append(can, table, msg.Table(function(value) { return {row: can.core.List(head, function(key) { return value[key] })} }))
|
||||
@ -64,7 +58,7 @@ Volcanos(chat.ONIMPORT, {
|
||||
})
|
||||
Volcanos(chat.ONACTION, {list: [
|
||||
"刷新界面", "刷新数据", "切换浮动", "切换全屏", "远程控制", "共享工具", "打开链接", "生成链接", "生成脚本", "生成图片",
|
||||
["其它", "保存参数", "清空参数", "扩展参数", "复制数据", "下载数据", "清空数据", "删除工具"],
|
||||
["其它", "扩展参数", "保存参数", "清空参数", "复制数据", "下载数据", "清空数据", "删除工具"],
|
||||
["调试", "查看日志", "打包页面", "查看文档", "查看脚本", "查看源码", "查看配置", "清理配置", "导出配置", "导入配置", "删除配置"],
|
||||
],
|
||||
_engine: function(event, can, button) { can.Update(event, [ctx.ACTION, button].concat(can.Input())) },
|
||||
@ -86,11 +80,11 @@ Volcanos(chat.ONACTION, {list: [
|
||||
"刷新界面": function(event, can) { var sub = can._outputs[0]; sub.onlayout._init(sub), can.user.toastSuccess(can) },
|
||||
"刷新数据": function(event, can) { can.Update(event, can.Input()), can.user.toastSuccess(can) },
|
||||
"切换浮动": function(event, can, button, sub) { can.onaction._switch(can, sub, chat.FLOAT, function() { can.onmotion.hidden(can, can._action), can.onmotion.hidden(can, can._status)
|
||||
can.ConfHeight(can.page.height()/2-2*html.ACTION_HEIGHT-can.onexport.statusHeight(can)), html.WIDTH, can.ConfWidth(can.page.width()/(can.user.isMobile? 1: 2))
|
||||
can.getActionSize(function(left) { can.onmotion.move(can, can._target, {left: (left||0)+(can.user.isMobile? 0: html.PLUGIN_MARGIN), top: can.page.height()/2-html.PLUGIN_MARGIN}) })
|
||||
can.getActionSize(function(left) { can.onmotion.move(can, can._target, {left: (left||0)+(can.user.isMobile? 0: html.PLUGIN_MARGIN), top: can.page.height()/2-html.PLUGIN_MARGIN-html.ACTION_HEIGHT}) })
|
||||
can.ConfHeight(can.page.height()/2-can.onexport.actionHeight(can)-can.onexport.statusHeight(can)), can.ConfWidth(can.page.width()/(can.user.isMobile? 1: 2))
|
||||
}) },
|
||||
"切换全屏": function(event, can) { var sub = can._outputs[0]; can.onaction._switch(can, sub, chat.FULL, function() { can.page.style(can, can._target, html.LEFT, "", html.TOP, "", html.BOTTOM, "")
|
||||
can.ConfHeight(can.page.height()-html.ACTION_HEIGHT-can.onexport.statusHeight(can)), can.ConfWidth(can.page.width())
|
||||
can.ConfHeight(can.page.height()-can.onexport.actionHeight(can)-can.onexport.statusHeight(can)), can.ConfWidth(can.page.width())
|
||||
}) },
|
||||
"远程控制": function(event, can) { can.onaction.keyboard(event, can) },
|
||||
"共享工具": function(event, can) { var meta = can.Conf(); can.onmotion.share(event, can, [
|
||||
@ -104,9 +98,9 @@ Volcanos(chat.ONACTION, {list: [
|
||||
]; can.user.copy(event, can, list[0]) },
|
||||
"生成图片": function(event, can) { can.user.toimage(can, can._name) },
|
||||
|
||||
"扩展参数": function(event, can) { can.onmotion.toggle(can, can._action) },
|
||||
"保存参数": function(event, can) { can.search(event, ["River.ondetail.保存参数"]) },
|
||||
"清空参数": function(event, can) { can.page.SelectArgs(can, can._option, "", function(item) { return item.value = "" }) },
|
||||
"扩展参数": function(event, can) { can.onmotion.toggle(can, can._action) },
|
||||
"复制数据": function(event, can) { var sub = can._outputs[0]; can.user.copy(event, can, sub.onexport.table(sub)||sub.onexport.board(sub)) },
|
||||
"下载数据": function(event, can) { var sub = can._outputs[0]; can.user.input(event, can, [{name: "filename", value: can.Conf(mdb.NAME)}], function(list) {
|
||||
can.user.downloads(can, sub.onexport.table(sub), list[0], nfs.CSV), can.user.downloads(can, sub.onexport.board(sub), list[0], nfs.TXT)
|
||||
@ -125,9 +119,7 @@ Volcanos(chat.ONACTION, {list: [
|
||||
"导入配置": function(event, can) { can.runAction(event, mdb.IMPORT) },
|
||||
"删除配置": function(event, can) { can.runAction(event, ctx.CONFIG, [mdb.REMOVE], function() { can.user.toastProcess(can), can.onmotion.delay(can, function() { can.user.toastSuccess(can), can.Update() }, 1000) }) },
|
||||
|
||||
refresh: function(event, can) { var sub = can.core.Value(can, chat._OUTPUTS_CURRENT); if (!sub) { return }
|
||||
sub.ConfHeight(can.ConfHeight()), sub.ConfWidth(can.ConfWidth()), sub.onimport.layout(sub)
|
||||
},
|
||||
refresh: function(event, can) { var sub = can.core.Value(can, chat._OUTPUTS_CURRENT); if (sub) { sub.ConfHeight(can.ConfHeight()), sub.ConfWidth(can.ConfWidth()), sub.onimport.layout(sub) } },
|
||||
close: function(event, can) {
|
||||
if (can.isFullMode()) {
|
||||
can.onaction["切换全屏"](event, can, "切换全屏", can.core.Value(can, chat._OUTPUTS_CURRENT))
|
||||
@ -163,9 +155,7 @@ Volcanos(chat.ONACTION, {list: [
|
||||
}) },
|
||||
openLocation: function(event, can) { can.user.agent.openLocation(can, can.request(event)) },
|
||||
scanQRCode0: function(event, can, button) { can.user.agent.scanQRCode(can) },
|
||||
scanQRCode: function(event, can, button) { can.user.agent.scanQRCode(can, function(data) {
|
||||
can.runAction(event, button, can.base.Simple(data), function() { can.Update() })
|
||||
}) },
|
||||
scanQRCode: function(event, can, button) { can.user.agent.scanQRCode(can, function(data) { can.runAction(event, button, can.base.Simple(data), function() { can.Update() }) }) },
|
||||
record0: function(event, can, name, cb) { can.user.input(event, can, [{name: nfs.FILE, value: name}], function(list) {
|
||||
navigator.mediaDevices.getDisplayMedia({video: {height: window.innerHeight}}).then(function(stream) { var toast
|
||||
can.core.Next([3, 2, 1], function(item, next) { toast = can.user.toast(can, item + "s 后开始截图"), can.onmotion.delay(can, next, 1000) }, function() { toast.close()
|
||||
@ -188,14 +178,14 @@ Volcanos(chat.ONACTION, {list: [
|
||||
}) },
|
||||
})
|
||||
Volcanos(chat.ONEXPORT, {
|
||||
link: function(can) { var meta = can.Conf(), args = can.Option(); can.misc.Search(can, log.DEBUG) == ice.TRUE && (args[log.DEBUG] = ice.TRUE)
|
||||
args.cmd = meta.index||can.core.Keys(meta.ctx, meta.cmd), args.cmd == web.WIKI_WORD && (args.cmd = args.path)
|
||||
return can.misc.MergePodCmd(can, args, true)
|
||||
},
|
||||
title: function(can, title) { can.isCmdMode() && can.user.title(title) },
|
||||
output: function(can, msg) {},
|
||||
action: function(can, button, line) {},
|
||||
record: function(can, value, key, line) {},
|
||||
actionHeight: function(can) { return html.ACTION_HEIGHT },
|
||||
statusHeight: function(can) { return !can.page.isDisplay(can._status) || can._status.innerHTML == "" || (can._target.offsetHeight > 0 && can._status.offsetHeight == 0)? 0: html.ACTION_HEIGHT },
|
||||
title: function(can, title) { can.isCmdMode() && can.user.title(title) },
|
||||
link: function(can) { var meta = can.Conf(), args = can.Option(); can.misc.Search(can, log.DEBUG) == ice.TRUE && (args[log.DEBUG] = ice.TRUE)
|
||||
args.cmd = meta.index||can.core.Keys(meta.ctx, meta.cmd), args.cmd == web.WIKI_WORD && (args.cmd = args.path)
|
||||
return can.misc.MergePodCmd(can, args, true)
|
||||
},
|
||||
})
|
||||
|
@ -1,21 +1,19 @@
|
||||
Volcanos(chat.ONIMPORT, {_init: function(can, msg, target) { can.onmotion.clear(can, target)
|
||||
if (can.Mode() == html.ZONE) { msg.Table(function(value) { var action = []
|
||||
can.page.Select(can, can.page.Create(can, html.DIV, value.action), html.INPUT, function(target) {
|
||||
action.push(target.name), target.name != target.value && can.user.trans(can, kit.Dict(target.name, target.value))
|
||||
})
|
||||
can.onimport.item(can, {name: can.page.Color(value[can.Conf(mdb.FIELD)||mdb.VIEW]||value[mdb.NAME])}, function() {
|
||||
can.sup.onexport.record(can, value.name, mdb.NAME, value)
|
||||
}, function() { return shy(action, function(event, button, meta, carte) { can.misc.Event(event, can, function(msg) {
|
||||
can.sup.onexport.action(can, button, value) || can.run(event, [ctx.ACTION, button], function(msg) {
|
||||
can.sup.onimport._process(can.sup, msg) || can.Update() }), carte.close()
|
||||
}, value) }) })
|
||||
}); return }
|
||||
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)) {
|
||||
can.onappend.style(can, can._args[ctx.STYLE], target), can.core.CallFunc(cbs, {can: can, msg: msg, target: target})
|
||||
} else {
|
||||
can.onappend.table(can, msg, null, target), can.onappend.board(can, msg, target)
|
||||
} can.onmotion.story.auto(can, target)
|
||||
} else { can.onappend.table(can, msg, null, target), can.onappend.board(can, msg, target), can.onmotion.story.auto(can, target) }
|
||||
},
|
||||
_vimer_zone: function(can, msg, target) { msg.Table(function(value) { var action = []
|
||||
can.page.Select(can, can.page.Create(can, html.DIV, value.action), html.INPUT, function(target) {
|
||||
action.push(target.name), target.name != target.value && can.user.trans(can, kit.Dict(target.name, target.value))
|
||||
})
|
||||
can.onimport.item(can, {name: can.page.Color(value[can.Conf(mdb.FIELD)||mdb.VIEW]||value[mdb.NAME])}, function() {
|
||||
can.sup.onexport.record(can, value.name, mdb.NAME, value)
|
||||
}, function() { return shy(action, function(event, button, meta, carte) { can.misc.Event(event, can, function(msg) {
|
||||
can.sup.onexport.action(can, button, value) || can.run(event, [ctx.ACTION, button], function(msg) { can.sup.onimport._process(can.sup, msg) || can.Update() }), carte.close()
|
||||
}, value) }) })
|
||||
}) },
|
||||
_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}},
|
||||
@ -34,7 +32,7 @@ Volcanos(chat.ONIMPORT, {_init: function(can, msg, target) { can.onmotion.clear(
|
||||
function close(target) { var next = target.nextSibling||target.previousSibling; if (!next) { return }
|
||||
next.click(), can.onmotion.delay(can, function() { can.base.isFunc(cbs) && cbs(tabs), can.page.Remove(can, target) })
|
||||
}
|
||||
return {view: html.TABS, title: tabs.text, list: [{text: [tabs.name, html.SPAN, mdb.NAME]}, {text: [can.page.unicode.delete, html.SPAN, html.ICON], onclick: function(event) {
|
||||
return {view: html.TABS, title: tabs.text, list: [{text: [tabs.name, html.SPAN, mdb.NAME]}, {icon: mdb.DELETE, onclick: function(event) {
|
||||
close(tabs._target), can.onkeymap.prevent(event)
|
||||
}}], onclick: function(event) {
|
||||
can.onmotion.select(can, action, html.DIV_TABS, tabs._target), can.base.isFunc(cb) && cb(event, tabs)
|
||||
@ -45,7 +43,7 @@ Volcanos(chat.ONIMPORT, {_init: function(can, msg, target) { can.onmotion.clear(
|
||||
oncontextmenu: function(event) { can.user.carte(event, can, kit.Dict("Close", function(event) { close(target) },
|
||||
"Close Other", function(event) { can.page.SelectChild(can, action, html.DIV_TABS, function(target) { target == tabs._target || close(target) }) }, menu.meta
|
||||
), ["Close", "Close Other", ""].concat(can.base.getValid(menu.list, can.core.Item(menu.meta))), function(event, button, meta) { (meta[button]||menu)(event, button, meta) }) },
|
||||
}), can.onmotion.delay(can, function() { target.click() })
|
||||
}), target.click()
|
||||
}}
|
||||
}))._target },
|
||||
tool: function(can, list, cb, target, status) { target = target||can._output, status = status||can._status
|
||||
@ -74,8 +72,7 @@ Volcanos(chat.ONIMPORT, {_init: function(can, msg, target) { can.onmotion.clear(
|
||||
zone._menu = shy({_trans: sub._trans}, action.concat(can.base.Obj(msg.Option(ice.MSG_ACTION), [])), function(event, button, meta, carte) {
|
||||
sub.Update(event, [ctx.ACTION, button]), carte.close()
|
||||
}), can.user.toastSuccess(can)
|
||||
}, zone._target = sub._target
|
||||
can.ui.zone[zone.name].refresh = function() { sub.Update() }
|
||||
}, zone._target = sub._target, can.ui.zone[zone.name].refresh = function() { sub.Update() }
|
||||
}, zone._target) } },
|
||||
zone: function(can, list, target) {
|
||||
return can.page.Append(can, target, can.core.List(list, function(zone) { can.base.isString(zone) && (zone = {name: zone}); return zone && {view: [[html.ZONE, zone.name]], list: [
|
||||
@ -89,12 +86,10 @@ Volcanos(chat.ONIMPORT, {_init: function(can, msg, target) { can.onmotion.clear(
|
||||
}},
|
||||
{view: html.ACTION, _init: function(target) { zone._action = target
|
||||
can.onappend._action(can, [{type: html.TEXT, name: mdb.SEARCH, _init: function(target) { zone._search = target }, onkeyup: function(event) {
|
||||
can.onmotion.delayOnce(can, function() { can.onkeymap.selectItems(event, can, zone._target) }, event.target.value.length<3? 500: 150, zone._delay_select = zone._delay_select||{})
|
||||
can.page.Select(can, zone._target, html.DIV_LIST, function(item) { can.onmotion.toggle(can, item, true) })
|
||||
if (event.target.value == "") { can.page.Select(can, zone._target, html.DIV_LIST, function(target) { can.onmotion.hidden(can, target) })
|
||||
can.page.Select(can, zone._target, html.DIV_EXPAND, function(target) { can.page.ClassList.del(can, target, cli.OPEN) })
|
||||
}
|
||||
}, onfocus: function(event) { can.onmotion.selectRange(event.target) }}], target, {})
|
||||
if (event.target.value == "") { can.page.Select(can, zone._target, html.DIV_EXPAND, function(target) { can.page.ClassList.del(can, target, cli.OPEN) }) }
|
||||
can.page.Select(can, zone._target, html.DIV_LIST, function(item) { can.onmotion.toggle(can, item, event.target.value != "") })
|
||||
can.onmotion.delayOnce(can, function() { can.onkeymap.selectItems(event, can, zone._target) }, event.target.value.length<3? 500: 150)
|
||||
}}], target, {})
|
||||
}},
|
||||
{view: html.LIST, _init: function(target) { can.ui.zone = can.ui.zone||{}, can.ui.zone[zone.name] = zone, zone._target = target
|
||||
zone._total = function(total) { return can.page.Modify(can, zone._search, {placeholder: "search in "+total+" items"}), total }
|
||||
@ -152,15 +147,9 @@ Volcanos(chat.ONLAYOUT, {
|
||||
},
|
||||
})
|
||||
Volcanos(chat.ONEXPORT, {
|
||||
title: function(can, title) { can._legend.innerHTML = title, can.isCmdMode() && can.user.title(title); var sup = can.sup; if (sup) { sup._header_tabs && (sup._header_tabs.innerHTML = title), sup._tabs && (sup._tabs.innerHTML = title) } },
|
||||
table: function(can) { var msg = can._msg; if (msg.Length() == 0) { return }
|
||||
var res = [msg.append && msg.append.join(ice.FS)]; msg.Table(function(line, index, array) {
|
||||
res.push(can.core.Item(line, function(key, value) { return value }).join(ice.FS))
|
||||
}); return res.join(ice.NL)
|
||||
var res = [msg.append && msg.append.join(ice.FS)]; msg.Table(function(line, index, array) { res.push(can.core.Item(line, function(key, value) { return value }).join(ice.FS)) }); return res.join(ice.NL)
|
||||
},
|
||||
board: function(can) { var msg = can._msg; return msg.Result() },
|
||||
title: function(can, title) { can._legend.innerHTML = title
|
||||
can.sup && can.sup._tabs && (can.sup._tabs.innerHTML = title)
|
||||
can.sup && can.sup._header_tabs && (can.sup._header_tabs.innerHTML = title)
|
||||
can.isCmdMode() && can.user.title(title)
|
||||
},
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user