mirror of
https://shylinux.com/x/volcanos
synced 2025-04-26 01:04:06 +08:00
add some
This commit is contained in:
parent
6d39c2ff34
commit
f1d2863645
@ -589,7 +589,7 @@ Volcanos(chat.ONEXPORT, {
|
||||
path: function(can) { return can.Option(nfs.PATH)+can.Option(nfs.FILE) },
|
||||
line: function(can, line) { return parseInt(can.core.Value(can.page.SelectOne(can, line, "td.line"), "innerText")) },
|
||||
text: function(can, line) { return can.core.Value(can.page.SelectOne(can, line, "td.text"), "innerText") },
|
||||
content: function(can) { return can.page.Select(can, can.current&&can.current.content||can.ui.content, "td.text", function(item) { return item.innerText }).join(lex.NL) },
|
||||
content: function(can) { return can.page.Select(can, can.current&&can.current.content||can.ui.content, "td.text", function(item) { return item.innerText.trimEnd() }).join(lex.NL) },
|
||||
position: function(can, index, total) { total = total||can.ui.content._max; return (parseInt(index))+nfs.PS+parseInt(total)+" = "+parseInt((index)*100/total)+"%" },
|
||||
size: function(can, size, full) { if (size > 1) { return size } if (size > 0) { return size*full } },
|
||||
keys: function(can, path, file) { return [path||can.Option(nfs.PATH), file||can.Option(nfs.FILE)].join(nfs.DF) },
|
||||
|
@ -5,7 +5,7 @@ Volcanos(chat.ONIMPORT, {
|
||||
can.onimport._tabs(can, msg) // can.onimport._full(can, msg)
|
||||
},
|
||||
_tabs: function(can, msg) { can.onappend.style(can, web.STUDIO)
|
||||
msg.Table(function(value, index) { value.nick = value.help||value.name.split(lex.SP)[0]
|
||||
msg.Table(function(value, index) { value.nick = can.user.trans(can, value.index.split(nfs.PT).pop(), value.help)
|
||||
var target = can.onimport.item(can, value, function() {
|
||||
if (value._plugin) { return can.onmotion.select(can, can._output, html.FIELDSET, value._plugin._target) }
|
||||
can.onappend.plugin(can, value, function(sub) { value._plugin = sub
|
||||
|
@ -86,7 +86,9 @@ Volcanos(chat.ONIMPORT, {_init: function(can, msg, target) { can.onmotion.clear(
|
||||
can.base.isFunc(button)? button(event, button): can.onaction[button](event, can, button), can.onkeymap.prevent(event)
|
||||
}}]) },
|
||||
icon: function(can, msg, target, cb) { return msg.Table(function(value) {
|
||||
var space = value.space||can.ConfSpace()||can.misc.Search(can, ice.POD); value.icon && (value.icon = can.base.MergeURL(value.icon, ice.POD, space))
|
||||
var space = can.core.Keys(can.misc.Search(can, ice.POD), value.space||can.ConfSpace())
|
||||
// var space = value.space||can.ConfSpace()||can.misc.Search(can, ice.POD)
|
||||
; value.icon && (value.icon = can.base.MergeURL(value.icon, ice.POD, space))
|
||||
value.icon = can.misc.PathJoin(value.icon||can.page.drawText(can, value.name, 80))
|
||||
return can.page.Append(can, target, [{view: html.ITEM, list: [{view: html.ICON, list: [{img: value.icon}]}, {view: [mdb.NAME, "", value.name]}], _init: function(target) {
|
||||
cb && cb(target, value)
|
||||
|
Loading…
x
Reference in New Issue
Block a user