forked from x/volcanos
opt some
This commit is contained in:
parent
f397ce266a
commit
741d70d78f
@ -30,21 +30,22 @@ Volcanos(chat.ONFIGURE, {help: "索引导航",
|
|||||||
can.isCmdMode()? can.onappend._action(can, can.base.Obj(can._msg.Option(ice.MSG_ACTION)).concat(window.webview? ["vim", "录屏", "日志", "编辑器", "浏览器"]: []), target): can.onmotion.hidden(can, target.parentNode)
|
can.isCmdMode()? can.onappend._action(can, can.base.Obj(can._msg.Option(ice.MSG_ACTION)).concat(window.webview? ["vim", "录屏", "日志", "编辑器", "浏览器"]: []), target): can.onmotion.hidden(can, target.parentNode)
|
||||||
},
|
},
|
||||||
recent: function(can, target, zone, path) { var total = 0
|
recent: function(can, target, zone, path) { var total = 0
|
||||||
can.runAction(can.request({}), code.FAVOR, ["_recent_cmd"], function(msg) {
|
function show(msg, cb) {
|
||||||
var list = {}; msg.Table(function(item) { list[item.path+item.file] = item }), can.core.Item(list, function(path, item) {
|
var list = {}; msg.Table(function(item) { var path = item.path+item.file
|
||||||
zone._total(++total)
|
if (!list[path]) { zone._total(++total)
|
||||||
can.page.Append(can, target, [{text: [item.name||item.file, html.DIV, html.ITEM], onclick: function(event) {
|
can.page.Append(can, target, cb(item, path))
|
||||||
|
} list[path] = item
|
||||||
|
})
|
||||||
|
}
|
||||||
|
can.runAction({}, code.FAVOR, ["_recent_cmd"], function(msg) {
|
||||||
|
show(msg, function(item) { return [{text: [item.name||item.file, html.DIV, html.ITEM], onclick: function(event) {
|
||||||
can.onimport.tabview(can, can.Option(nfs.PATH), item.file, ctx.INDEX)
|
can.onimport.tabview(can, can.Option(nfs.PATH), item.file, ctx.INDEX)
|
||||||
}}])
|
}}] })
|
||||||
})
|
})
|
||||||
})
|
can.runAction({}, code.FAVOR, ["_recent_file"], function(msg) {
|
||||||
can.runAction(can.request({}), code.FAVOR, ["_recent_file"], function(msg) {
|
show(msg, function(item, path) { return [{text: [path.split(ice.PS).slice(-2).join(ice.PS), html.DIV, html.ITEM], onclick: function(event) {
|
||||||
var list = {}; msg.Table(function(item) { list[item.path+item.file] = item }), can.core.Item(list, function(path, item) {
|
|
||||||
zone._total(++total)
|
|
||||||
can.page.Append(can, target, [{text: [path.split(ice.PS).slice(-2).join(ice.PS), html.DIV, html.ITEM], onclick: function(event) {
|
|
||||||
can.onimport.tabview(can, item.path, item.file)
|
can.onimport.tabview(can, item.path, item.file)
|
||||||
}}])
|
}}] })
|
||||||
})
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
source: function(can, target, zone, path) { var total = 0
|
source: function(can, target, zone, path) { var total = 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user