1
0
forked from x/volcanos
This commit is contained in:
harveyshao 2022-12-07 03:12:40 +08:00
parent d66000028c
commit ba256721af
2 changed files with 6 additions and 6 deletions

View File

@ -56,11 +56,6 @@ Volcanos(chat.ONFIGURE, {
var node
function add(list) {
can.core.List(list, function(item) { item._menu = shy({
trash: function(event) {
can.onaction._run(event, can, nfs.TRASH, [can.base.Path(path, item.path)], function() {
item._remove()
})
},
create: function(event) {
can.user.input(event, can, ["filename"], function(list) {
if (can.base.endWith(item.path, ice.PS)) {
@ -74,6 +69,11 @@ Volcanos(chat.ONFIGURE, {
})
})
},
trash: function(event) {
can.onaction._run(event, can, nfs.TRASH, [can.base.Path(path, item.path)], function() {
item._remove()
})
},
}), item._init = function(target) { item._remove = function() { can.page.Remove(can, target.parentNode), delete(node[item.path]) } } })
return can.onimport.tree(can, list, nfs.PATH, ice.PS, function(event, item) { can.onimport.tabview(can, path, item.path) }, target, node)
}

View File

@ -16,7 +16,7 @@ Volcanos(chat.ONIMPORT, {_init: function(can, msg, cb) { can.requireDraw(functio
item.min = rest - item.del
item.close = rest + item.add - item.del
begin = begin || value.date, count++
begin = begin || item.date, count++
rest = item.close, add += item.add, del += item.del
if (item.max - item.min > max) { max = item.max - item.min }