mirror of
https://shylinux.com/x/volcanos
synced 2025-04-25 16:58:06 +08:00
add studio
This commit is contained in:
parent
3587d7ab28
commit
6d3f37c7bc
29
frame.js
29
frame.js
@ -311,7 +311,7 @@ Volcanos(chat.ONAPPEND, {_init: function(can, meta, list, cb, target, field) {
|
||||
can.misc.Search(can, log.DEBUG) == ice.TRUE && can.base.beginWith(display, "/require/src/") && delete(Volcanos.meta.cache[display])
|
||||
Volcanos(display, {_root: can._root, _follow: can.core.Keys(can._follow, display), _fields: can._target, _target: output, _path: display||chat.PLUGIN_TABLE_JS,
|
||||
_legend: can._legend, _option: can._option, _action: action||can._action, _output: output, _status: status||can._status,
|
||||
Update: can.Update, Option: can.Option, Action: can.Action, Status: can.Status, db: {}, ui: {layout: function() {}},
|
||||
Update: can.Update, Option: can.Option, Action: can.Action, Status: can.Status, db: {hash:[""], value: {}}, ui: {layout: function() {}},
|
||||
}, [display, msg.Option(ice.MSG_DISPLAY_CSS)||undefined, chat.PLUGIN_TABLE_JS], function(sub) { sub.Conf(can.Conf())
|
||||
sub.db.hash = can.base.getValid(can.isCmdMode()? can.misc.SearchHash(can): [], can.misc.localStorage(can, [sub.ConfSpace()||can.misc.Search(can, ice.POD), sub.ConfIndex(), "hash"]))||[]
|
||||
var last = can.sub; last && can.core.CallFunc([last, "onaction.hidden"], {can: last})
|
||||
@ -387,7 +387,7 @@ Volcanos(chat.ONAPPEND, {_init: function(can, meta, list, cb, target, field) {
|
||||
sub.run = function(event, cmds, cb) { var _msg = can.request(event); _msg.result = [JSON.stringify(msg)], cb(_msg) }
|
||||
})
|
||||
} else if (item.name == ice.LOG_TRACEID) {
|
||||
can.onappend._float(can, web.CODE_XTERM, ["sh", item.value, "grep "+item.value+" var/log/bench.log | grep -v grep | grep -v '"+item.value+" $'"])
|
||||
can.onappend._float(can, web.CODE_XTERM, ["sh", item.value, "grep "+item.value+" var/log/bench.log | grep -v grep | grep -v 'id: "+item.value+" $'"])
|
||||
} else {
|
||||
can.user.copy(event, can, item.value)
|
||||
}
|
||||
@ -536,7 +536,7 @@ Volcanos(chat.ONAPPEND, {_init: function(can, meta, list, cb, target, field) {
|
||||
if (msg.append && msg.append[msg.append.length-1] == ctx.ACTION && can.core.List(msg[ctx.ACTION], function(item) { if (item) { return item } }).length == 0) { msg.append.pop() }
|
||||
if (msg.append[msg.append.length-1] == ctx.ACTION && (!msg[ctx.ACTION] || msg[ctx.ACTION].length == 0)) { msg.append.pop() }
|
||||
var option = can.core.Item(can.Option())
|
||||
var table = can.page.AppendTable(can, msg, target||can._output, msg.append, cb||function(value, key, index, data, list) { var _value = value
|
||||
var table = can.page.AppendTable(can, msg, target||can.ui.content||can._output, msg.append, cb||function(value, key, index, data, list) { var _value = value
|
||||
if (msg.append.length == 2 && msg.append[0] == mdb.KEY && msg.append[1] == mdb.VALUE) {
|
||||
if (key == mdb.VALUE) { key = data.key } data = {}, can.core.List(list, function(item) { data[item.key] = item.value })
|
||||
}
|
||||
@ -603,7 +603,7 @@ Volcanos(chat.ONAPPEND, {_init: function(can, meta, list, cb, target, field) {
|
||||
return table
|
||||
},
|
||||
board: function(can, text, target) { text && text.Result && (text = text.Result()); if (!text) { return }
|
||||
var code = can.page.Append(can, target||can._output, [{text: [can.page.Color(text), html.DIV, html.CODE]}]).code
|
||||
var code = can.page.Append(can, target||can.ui.content||can._output, [{text: [can.page.Color(text), html.DIV, html.CODE]}]).code
|
||||
code.ondblclick = function(event) { can.Option(mdb.KEY, window.getSelection().toString()) && can.Update() }
|
||||
if (text.indexOf("<fieldset") == 0) { can.page.Select(can, code, html.FIELDSET, function(target) { var data = target.dataset
|
||||
data.index && can.onappend.plugin(can, {index: data.index, args: can.base.Split(data.args)}, function(sub) {
|
||||
@ -724,16 +724,23 @@ Volcanos(chat.ONAPPEND, {_init: function(can, meta, list, cb, target, field) {
|
||||
if (can.page.isDisplay(target)) { width -= w }
|
||||
}
|
||||
}), can.core.List(list, function(item) { if (can.base.isArray(item)) { layout(type == FLOW? FLEX: FLOW, item, height, width) } }) }
|
||||
ui.profile && can.onmotion.hidden(can, ui.profile), ui.display && can.onmotion.hidden(can, ui.display)
|
||||
if (can.onimport.filter) { ui.filter = can.onimport.filter(can, ui.project) }
|
||||
ui.project && can.user.isMobile && can.onmotion.hidden(can, ui.project)
|
||||
ui.layout = function(height, width, delay, cb) { can.onmotion.delay(can, function() { defer = [], layout(type, ui.list, height, width), defer.forEach(function(cb) { cb() }), cb && cb(content_height, content_width) }, delay||0) }
|
||||
ui.project && can.user.isMobile && can.onmotion.hidden(can, ui.project); if (can.onimport.filter) { ui.filter = can.onimport.filter(can, ui.project) }
|
||||
ui.display && can.onmotion.hidden(can, ui.display), ui.profile && can.onmotion.hidden(can, ui.profile)
|
||||
ui.layout = function(height, width, delay, cb) { can.onmotion.delay(can, function() {
|
||||
defer = [], layout(type, ui.list, height, width), defer.forEach(function(cb) { cb() })
|
||||
if (can.db.value) { can.db.value._display_plugin && (height = height/2-1), can.page.style(can, can.ui.content, html.HEIGHT, height)
|
||||
can.db.value._content_plugin && can.db.value._content_plugin.onimport.size(can.db.value._content_plugin, height, content_width, false)
|
||||
can.db.value._display_plugin && can.db.value._display_plugin.onimport.size(can.db.value._display_plugin, height, content_width, false)
|
||||
can.db.value._display_plugin && can.onmotion.toggle(can, can.ui.display, true)
|
||||
} cb && cb(content_height, content_width)
|
||||
}, delay||0) }
|
||||
can.onimport.layout = can.onimport.layout||function(can) {
|
||||
ui.layout(can.ConfHeight(), can.ConfWidth()), can.onimport._layout && can.onimport._layout(can)
|
||||
can.Action(html.FILTER) && can.onmotion.filter(can, can.Action(html.FILTER))
|
||||
ui.layout(can.ConfHeight(), can.ConfWidth(), 0, function(height, width) {
|
||||
can.ui._content_plugin && can.ui._content_plugin.onimport.size(can.ui._content_plugin, height, width, false)
|
||||
}), can.onimport._layout && can.onimport._layout(can), can.Action(html.FILTER) && can.onmotion.filter(can, can.Action(html.FILTER))
|
||||
}
|
||||
can.onimport._layout = can.onimport._layout||function(can) { if (!can.ui.content || !can.ui.content.innerHTML) { return }
|
||||
can.page.style(can, can.ui.content, html.HEIGHT, can._output.style[html.HEIGHT], html.MAX_HEIGHT, can._output.style[html.MAX_HEIGHT])
|
||||
// can.page.style(can, can.ui.content, html.HEIGHT, can._output.style[html.HEIGHT], html.MAX_HEIGHT, can._output.style[html.MAX_HEIGHT])
|
||||
can.page.style(can, can.ui.project, html.HEIGHT, can.ui.content.offsetHeight+can.ui.display.offsetHeight)
|
||||
can.onlayout.expand(can, can.ui.content)
|
||||
}
|
||||
|
@ -551,7 +551,8 @@ div.output.card>div.item:hover { box-shadow:var(--notice-box-shadow); }
|
||||
fieldset>div.output.card>div.item>div.title { border-bottom:var(--box-border); }
|
||||
fieldset>div.output.card>div.item>div.action>input { box-shadow:var(--input-box-shadow); }
|
||||
fieldset>div.status { border-top:var(--status-border); }
|
||||
fieldset>div.status>legend { box-shadow:var(--legend-box-shadow); }
|
||||
fieldset>div.status>legend.select { box-shadow:var(--legend-box-shadow); }
|
||||
fieldset>div.status>legend:hover { box-shadow:var(--legend-box-shadow); }
|
||||
fieldset.Action>div.toast>div.toast:hover { box-shadow:var(--notice-box-shadow); }
|
||||
table.content th { box-shadow:var(--th-box-shadow); }
|
||||
table.content th.select { border:var(--box-notice); }
|
||||
@ -574,7 +575,7 @@ kbd { font-family:var(--code-font-family); line-height:var(--code-line-height);
|
||||
kbd:hover { background-color:var(--notice-bg-color); color:var(--notice-fg-color); }
|
||||
table.content { font-family:var(--table-font-family); }
|
||||
table.content th { font-family:var(--input-font-family); font-style:italic; }
|
||||
body div.code { font-family:var(--table-font-family); }
|
||||
body div.code { font-family:var(--table-font-family); padding:var(--table-padding); }
|
||||
body div.tabs { font-family:var(--code-font-family); }
|
||||
body div.path { font-family:var(--code-font-family); }
|
||||
body div.carte { font-family:var(--code-font-family); }
|
||||
@ -642,6 +643,7 @@ div.item.text.id>input { width:80px; }
|
||||
div.item.text.url>input { width:var(--river-width); }
|
||||
div.item.text.port>input { width:80px; }
|
||||
div.item.text.line>input { width:80px; }
|
||||
div.item.text.path>input { width:var(--project-width); }
|
||||
div.item.text.limit>input { width:var(--button-width); }
|
||||
div.item.text.offend>input { width:var(--button-width); }
|
||||
body:not(.width2):not(.mobile) fieldset.plugin>form.option>div.item.text.path>input { width:var(--project-width); }
|
||||
|
@ -70,9 +70,9 @@ fieldset.inner>div.output>div.layout>div.path span.view { font-size:22px; font-s
|
||||
body.windows fieldset.inner>div.output>div.layout>div.path span.view { margin-top:0; }
|
||||
body.windows fieldset.inner>div.output>div.layout>div.path span.view { font-style:normal; }
|
||||
fieldset.inner>div.output>div.layout>fieldset.plug.output { white-space:pre; }
|
||||
fieldset.inner.cmd>div.output>div.layout>div.plug { height:var(--action-height); overflow:auto; }
|
||||
fieldset.inner.cmd>div.output>div.layout>div.plug { box-shadow:var(--box-shadow); height:var(--action-height); overflow:auto; }
|
||||
fieldset.inner.cmd>div.output>div.layout>div.plug>legend {
|
||||
box-shadow:var(--legend-box-shadow);
|
||||
// box-shadow:var(--legend-box-shadow);
|
||||
font-style:italic; font-size:var(--legend-font-size);
|
||||
padding:0 var(--input-padding); margin-left:var(--input-margin); margin-right:0;
|
||||
float:right; }
|
||||
|
@ -278,7 +278,7 @@ Volcanos(chat.ONIMPORT, {_init: function(can, msg, cb) { var paths = can.core.Sp
|
||||
},
|
||||
layout: function(can) {
|
||||
if (can.isCmdMode()) { can.ConfHeight(can.page.height()) }
|
||||
if (can.isOutputStyle()) { return can.page.style(can, can.ui.content, html.WIDTH, can.ConfWidth()) }
|
||||
if (can.Conf(ctx.STYLE) == html.OUTPUT) { return can.page.style(can, can.ui.content, html.WIDTH, can.ConfWidth()) }
|
||||
if (can.isSimpleMode() && !can.page.tagis(can._fields, html.FIELDSET_FLOAT)) { can.page.style(can, can._output, html.MAX_HEIGHT, "") }
|
||||
if (can.isSimpleMode()) { can.ui.layout(can.ConfHeight(), can.ConfWidth()); return can.page.style(can, can.ui.content, html.WIDTH, can.ConfWidth()) }
|
||||
if (can.ui.zone && can.ui.zone.source) {
|
||||
@ -335,18 +335,21 @@ Volcanos(chat.ONFIGURE, {
|
||||
function show(target, zone, path) { can.run(can.request({}, {dir_root: path, dir_deep: true, "_toast": "目录加载中..."}), [nfs.PWD], function(msg) { can.onmotion.clear(can, target)
|
||||
can.onimport.tree(can, can.core.List(msg.Table(), function(item) {
|
||||
if (path == args[0] && args[1].indexOf(item.path) == 0) { item.expand = true } return item
|
||||
}), nfs.PATH, nfs.PS, function(event, item) { can.onimport.tabview(can, path, item.path) }, target), zone._total(msg.Length())
|
||||
}), function(event, item) { can.onimport.tabview(can, path, item.path) }, function() {}, target), zone._total(msg.Length())
|
||||
}, true) } if (path.length == 1) { return show(target, zone, path[0]) } can.page.Remove(can, zone._action)
|
||||
can.onimport.zone(can, can.core.List(path, function(path) { return kit.Dict(mdb.NAME, path, path == args[0]? chat._INIT: chat._DELAY_INIT, function(target, zone) { show(target, zone, path) }) }), target)
|
||||
},
|
||||
module: function(can, target, zone) { zone._delay_init = function() { can.runAction({}, mdb.INPUTS, [ctx.INDEX], function(msg) {
|
||||
can.onimport.tree(can, msg.Table(), ctx.INDEX, nfs.PT, function(event, item) { can.onimport.tabview(can, "", item.index, ctx.INDEX) }, target), zone._total(msg.Length())
|
||||
can.onimport.tree(can, msg.Table(),
|
||||
function(event, item) { can.onimport.tabview(can, "", item.index, ctx.INDEX) },
|
||||
function() {}, target, null, ctx.INDEX, nfs.PT), zone._total(msg.Length())
|
||||
can.onmotion.orderShow(can, target)
|
||||
}) }, zone.toggle(false) },
|
||||
plugin: function(can, target, zone) { zone._delay_init = function() { var total = 0
|
||||
can.onimport.tree(can, can.core.ItemKeys(can.onengine.plugin.meta, function(key) { if (key[0] != "_") { return total++, {index: key} } }), ctx.INDEX, nfs.PT, function(event, item) {
|
||||
can.onimport.tree(can, can.core.ItemKeys(can.onengine.plugin.meta, function(key) { if (key[0] != "_") { return total++, {index: key} } }),
|
||||
function(event, item) {
|
||||
can.onimport.tabview(can, "", can.core.Keys(ice.CAN, item.index), ctx.INDEX)
|
||||
}, target), zone._total(total)
|
||||
}, function() {}, target, null, ctx.INDEX, nfs.PT), zone._total(total)
|
||||
can.onmotion.orderShow(can, target)
|
||||
}, zone.toggle(false) },
|
||||
})
|
||||
|
@ -46,7 +46,7 @@ Volcanos(chat.ONFIGURE, {
|
||||
can.onaction.script(can.request(event, {path: path, file: item.path+(can.base.endWith(item.path, "/")? "client.go": "")}), can, nfs.SCRIPT) },
|
||||
nfs.TRASH, function(event, button) { can.runAction(event, nfs.TRASH, [path+item.path], function(msg) { show(target, zone, path) }) },
|
||||
)}; return item
|
||||
}); cache = can.onimport.tree(can, list, nfs.PATH, nfs.PS, function(event, item) { can.onimport.tabview(can, path, item.path) }, target, cache)
|
||||
}); cache = can.onimport.tree(can, list, function(event, item) { can.onimport.tabview(can, path, item.path) }, function() {}, target, cache)
|
||||
can.onmotion.orderShow(can, target)
|
||||
}, true) } if (path.length == 1) { return show(target, zone, path[0]) } can.page.Remove(can, zone._action)
|
||||
can.onimport.zone(can, can.core.List(path, function(path) { return kit.Dict(mdb.NAME, path, path == args[0]? chat._INIT: chat._DELAY_INIT, function(target, zone) {
|
||||
@ -138,8 +138,7 @@ Volcanos(chat.ONKEYMAP, {
|
||||
scrollHold: function(can, count, begin) { var scroll = can.ui.content.scrollLeft; can.ui.current.focus(), count != undefined && can.onkeymap.cursorMove(can.ui.current, count, begin == undefined? count: begin), can.ui.content.scrollLeft = scroll },
|
||||
cursorDown: function(can, target) { var p = can.onkeymap.cursorMove(target); can.onaction.selectLine(can, can.current.next()), can.onkeymap.cursorMove(target, 0, p) },
|
||||
cursorUp: function(can, target) { var p = can.onkeymap.cursorMove(target); can.onaction.selectLine(can, can.current.prev()), can.onkeymap.cursorMove(target, 0, p) },
|
||||
_model: function(can, value) {
|
||||
can.db.mode = value, can.onimport.__tabPath(can, true),
|
||||
_model: function(can, value) { can.db.mode = value, can.onimport.__tabPath(can, true),
|
||||
can.core.List([mdb.PLUGIN, mdb.NORMAL, mdb.INSERT], function(item) { can.page.ClassList.del(can, can.ui.content, item) }), can.page.ClassList.add(can, can.ui.content, value)
|
||||
can.core.List([mdb.PLUGIN, mdb.NORMAL, mdb.INSERT], function(item) { can.page.ClassList.del(can, can._output, item) }), can.page.ClassList.add(can, can._output, value)
|
||||
can.core.List([mdb.NORMAL, mdb.INSERT], function(item) { can.page.ClassList.del(can, can._fields, item) }), can.page.ClassList.add(can, can._fields, value)
|
||||
@ -268,6 +267,7 @@ Volcanos(chat.ONKEYMAP, {
|
||||
zt: shy("屏幕最上", function(can, count) { return can.current.scroll(can.current.scroll()-(count>1? count: 3)), true }),
|
||||
zz: shy("屏幕中间", function(can, count) { return can.current.scroll(can.current.scroll()-(count = count>1? count: can.current.window()/2)), true }),
|
||||
zb: shy("屏幕最下", function(can, count) { return can.current.scroll(can.current.scroll()-can.current.window()+(count>1? count: 5)), true }),
|
||||
F5: shy("刷新网页", function(can, target) { can.user.reload(true) }),
|
||||
},
|
||||
normal_ctrl: {
|
||||
e: shy("向下滚屏", function(can) { can.current.scroll(1) }),
|
||||
|
@ -24,7 +24,7 @@ Volcanos(chat.ONIMPORT, {_init: function(can, msg, target) { can.Conf(html.PADDI
|
||||
if (can.base.beginWith(link, nfs.PS, web.HTTP)) { return can.user.opens(link) }
|
||||
if (can.onmotion.cache(can, function() { return can.onexport.title(can, item.meta.name), can.Option(nfs.PATH, link) })) { return }
|
||||
return can.sup.Update(event, [link])
|
||||
}, nav)
|
||||
}, function() {}, nav)
|
||||
can.onimport.layout(can)
|
||||
},
|
||||
premenu: function(can, meta, target) { can.page.Select(can, can._output, can.page.Keys(html.H2, html.H3), function(_target) {
|
||||
|
@ -152,8 +152,7 @@ Volcanos(chat.ONIMPORT, {_init: function(can, msg, target) {
|
||||
},
|
||||
itemlist: function(can, list, cb, cbs, target) { if (!list || list.length == 0) { return }
|
||||
if (!target) { return can.core.List(list, function(value) { can.onimport.item(can, value, cb, cbs) }) }
|
||||
var _select
|
||||
target._list = can.page.insertBefore(can, [{view: html.LIST, list: can.core.List(list, function(item) { var icon = item.icon||item.icons
|
||||
var _list = can.core.List(list, function(item) { var icon = item.icon||item.icons
|
||||
return {view: html.ITEM, list: [
|
||||
icon && (can.base.contains(icon, ice.HTTP, ".ico", ".png", ".jpg")? {img: can.misc.Resource(can, icon)}: {icon: icon}),
|
||||
{text: item.nick||item.name||item.zone}
|
||||
@ -167,31 +166,53 @@ Volcanos(chat.ONIMPORT, {_init: function(can, msg, target) {
|
||||
if (can.base.isFunc(cbs)) { var menu = cbs(event, event.currentTarget); if (menu) { return can.user.carteRight(event, can, menu.meta, menu.list, menu) } }
|
||||
can.user.carteItem(event, can, item)
|
||||
}}
|
||||
}) }], target.nextSibling, target.parentNode)
|
||||
_select && _select.click()
|
||||
})
|
||||
var _select; if (target._list) { can.page.Append(can, target._list, _list) } else {
|
||||
target._list = can.page.insertBefore(can, [{view: html.LIST, list: _list}], target.nextSibling, target.parentNode)
|
||||
} _select && _select.click()
|
||||
return target._list
|
||||
},
|
||||
list: function(can, root, cb, target, cbs) { target = target||can._output
|
||||
list: function(can, root, cb, cbs, target) { target = target||can._output
|
||||
can.core.List(root.list, function(item) { var ui = can.page.Append(can, target, [{view: [[html.ITEM, "open"]], list: [{text: item.meta.name}, item.list && {icon: icon.CHEVRON_DOWN}], onclick: function(event) {
|
||||
can.page.ClassList.set(can, ui.item, "open", can.base.isFunc(cb) && cb(event, item) || can.onmotion.toggle(can, ui.list))
|
||||
can.onmotion.select(can, target, html.DIV_ITEM, event.target)
|
||||
}, _init: function(target) { if (item.meta.name == "_") { target.innerHTML = "", can.onappend.style(can, html.SPACE, target) }
|
||||
cbs && cbs(target, item)
|
||||
}}, {view: html.LIST}]); can.onimport.list(can, item, cb, ui.list, cbs) })
|
||||
}}, {view: html.LIST}]); can.onimport.list(can, item, cb, cbs, ui.list) })
|
||||
},
|
||||
tree: function(can, list, field, split, cb, target, node) { node = node||{"": target}
|
||||
tree: function(can, list, cb, cbs, target, node, field, split) { node = node||{"": target||can.ui.project}
|
||||
field = field||nfs.PATH, split = split||nfs.PS
|
||||
can.core.List(list, function(item) { item[field] && can.core.List(item[field].split(split), function(value, index, array) { if (!value) { return }
|
||||
var last = array.slice(0, index).join(split), name = array.slice(0, index+1).join(split); if (node[name]) { return }
|
||||
last && node[last] && can.page.Select(can, node[last].previousSibling, "div.expand", function(target) { target.innerHTML == "" && (target.innerHTML = can.page.unicode.closes) })
|
||||
var ui = can.page.Append(can, node[last], [{view: html.ITEM, list: [
|
||||
{view: [[html.EXPAND, item.expand? cli.OPEN: ""], html.DIV, (index==array.length-1? "": can.page.unicode.closes)]},
|
||||
{view: [mdb.NAME, html.DIV, value], _init: item._init},
|
||||
], onclick: function(event) {
|
||||
if (node[name].childElementCount == 2) { node[name].firstChild.click() }
|
||||
index < array.length - 1? can.page.ClassList.set(can, ui[html.EXPAND], cli.OPEN, !can.page.ClassList.neg(can, node[name], html.HIDE)): can.base.isFunc(cb) && cb(event, item)
|
||||
], onclick: function(event) { var target = event.currentTarget
|
||||
if (node[name].childElementCount > 0&& !can.page.ClassList.set(can, ui[html.EXPAND], cli.OPEN, !can.page.ClassList.neg(can, node[name], html.HIDE))) { return }
|
||||
target && can.page.Select(can, can.ui.project, html.DIV_ITEM, function(target) { can.page.ClassList.del(can, target, html.SELECT) })
|
||||
for (var p = target; p; p = p.parentNode.previousElementSibling) {
|
||||
can.page.ClassList.add(can, p, html.SELECT), can.onmotion.toggle(can, p.nextSibling, true)
|
||||
} can.onexport.hash(can, [item[field]]), can.base.isFunc(cb) && cb(event, item, ui.item)
|
||||
node[item[field]] && can.page.ClassList.add(can, node[item[field]].previousSibling, html.SELECT)
|
||||
if (node[name].childElementCount == 2) { can.onmotion.delay(can, function() { node[name].firstChild.click() }) }
|
||||
}, oncontextmenu: function(event) { if (!item._menu) { return }
|
||||
var menu = item._menu; can.user.carteRight(event, can, menu.meta, menu.list, menu)
|
||||
}}, {view: [[html.LIST, item.expand? "": html.HIDE]]}]); node[name] = ui.list
|
||||
}) }); return node
|
||||
}}, {view: [[html.LIST, item.expand? "": html.HIDE]]}]); node[name] = ui.list;
|
||||
(item._select || can.db.hash && (can.db.hash[0]||"").indexOf(item[field]) == 0) && can.onmotion.delay(can, function() { ui.item.click() })
|
||||
}) });
|
||||
return node
|
||||
},
|
||||
tabsCache: function(can, msg, key, value, target, cb) { if (value._tabs) { return value._tabs.click() }
|
||||
value._tabs = can.onimport.tabs(can, [value], function() { can.onexport.hash(can, [key]), can.Status(value), can.db.value = value
|
||||
can.page.ClassList.has(can, target, html.SELECT) || can.onmotion.delay(can, function() { target.click() })
|
||||
if (can.onmotion.cache(can, function() { return key }, can.ui.content, can.ui.profile, can.ui.display)) { return can.onimport.layout(can) }
|
||||
if (cb && cb()) { return }
|
||||
if (msg.Append(ctx.INDEX)) { msg.Table(function(value, index) {
|
||||
index == 0 && can.onappend.plugin(can, value, function(sub) { can.db.value._content_plugin = sub, can.onimport.layout(can) }, can.ui.content)
|
||||
index == 1 && can.onappend.plugin(can, value, function(sub) { can.db.value._display_plugin = sub, can.onimport.layout(can) }, can.ui.display)
|
||||
}) } else { can.onappend.table(can, msg), can.onappend.board(can, msg) }
|
||||
}, function() { delete(value._tabs), can.onmotion.cacheClear(can, key, can.ui.content, can.ui.profile, can.ui.display) })
|
||||
},
|
||||
tabs: function(can, list, cb, cbs, action) { action = action||can._action; return can.page.Append(can, action, can.core.List(list, function(tabs) {
|
||||
if (typeof tabs == code.STRING) { tabs = {name: tabs} }
|
||||
@ -298,7 +319,7 @@ Volcanos(chat.ONEXPORT, {
|
||||
session: function(can, key, value) { return can.misc[can.user.isWebview? "localStorage": "sessionStorage"](can, [can.Conf(ctx.INDEX), key, location.pathname].join(":"), value == ""? "": JSON.stringify(value)) },
|
||||
action_value: function(can, key, def) { var value = can.Action(key); return can.base.isIn(value, ice.AUTO, key, undefined)? def: value },
|
||||
tool: function(can) { can.misc.sessionStorage(can, [can.ConfIndex(), "tool"], JSON.stringify(can.page.Select(can, can._status, html.LEGEND, function(target) { return target._meta }))) },
|
||||
hash: function(can, hash) { can.misc.SearchHash(can, hash)
|
||||
hash: function(can, hash) { hash = typeof hash == code.STRING? [hash]: hash, can.misc.SearchHash(can, hash)
|
||||
can.misc.localStorage(can, [can.ConfSpace()||can.misc.Search(can, ice.POD), can.ConfIndex(), "hash"], hash)
|
||||
},
|
||||
tabs: function(can) {},
|
||||
|
Loading…
x
Reference in New Issue
Block a user