mirror of
https://shylinux.com/x/volcanos
synced 2025-04-25 08:48:06 +08:00
add some
This commit is contained in:
parent
dcc5f9062d
commit
51cd8ca01a
5
frame.js
5
frame.js
@ -346,7 +346,7 @@ Volcanos(chat.ONAPPEND, {_init: function(can, meta, list, cb, target, field) {
|
||||
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 }) }
|
||||
function run(event, cmd, arg) { can.misc.Event(event, can, function(msg) { can.run(can.request(event, data, can.Option()), [ctx.ACTION, cmd].concat(arg)) }) }
|
||||
if (key == web.SPACE && value) { value = can.page.Format(html.A, can.misc.MergePodCmd(can, {pod: value}), value) }
|
||||
return {text: [value, html.TD], onclick: function(event) { var target = event.target
|
||||
return {text: [msg.IsDetail() && key == mdb.KEY? can.user.trans(can, value, null, html.INPUT): value, html.TD], onclick: function(event) { var target = event.target
|
||||
if (can.page.tagis(target, html.INPUT) && target.type == html.BUTTON) { can.requestAction(event, target.name)
|
||||
meta && meta[target.name]? can.user.input(event, can, meta[target.name], function(args) { run(event, target.name, args) }): run(event, target.name)
|
||||
} else { can.sup.onimport.change(event, can.sup, key, event.target.innerText) || can.sup.onexport.record(can.sup, value, key, data, event) }
|
||||
@ -522,8 +522,7 @@ Volcanos(chat.ONAPPEND, {_init: function(can, meta, list, cb, target, field) {
|
||||
}, target._can = sub, can.base.Copy(sub, can.onfigure[input], true), sub._name = sub._path = path
|
||||
sub._target._close = sub.close = function() { can.page.Remove(can, sub._target), delete(target._can) }, sub.hidden = function() { return !can.page.isDisplay(sub._target) }
|
||||
meta.mode && can.onappend.style(sub, meta.mode), can.page.style(sub, sub._target, meta.style), can.base.isFunc(meta._init) && meta._init(sub, sub._target)
|
||||
// can.onmotion.delay(can, function() { show(sub, cb) }, 300)
|
||||
can.onmotion.delay(can, function() { show(sub, cb) }, 0)
|
||||
show(sub, cb)
|
||||
}, can._root._target)
|
||||
}})
|
||||
}) } }), can.onfigure[input]._init && can.onfigure[input]._init(can, meta, target, _cb)
|
||||
|
@ -145,7 +145,7 @@ Volcanos("misc", {
|
||||
},
|
||||
Template(can, path, file) { return can.base.Path(nfs.SRC_TEMPLATE, can.ConfIndex(), path, file) },
|
||||
MergePath: function(can, file, path) { return file.indexOf(nfs.PS) == 0 || file.indexOf(ice.HTTP) == 0? file: can.base.Path(path, file) },
|
||||
MergeCache: function(can, hash) { return can.misc.MergeURL(can, {_path: can.base.Path(web.SHARE_CACHE, hash)}, true) },
|
||||
MergeCache: function(can, hash, pod) { return can.base.MergeURL(can.misc.MergeURL(can, {_path: can.base.Path(web.SHARE_CACHE, hash)}, true), ice.POD, pod) },
|
||||
MergePodCmd: function(can, obj) {
|
||||
if (can.base.beginWith(obj.pod, nfs.PS, web.HTTP)) {
|
||||
if (location.search.indexOf("debug=true") > 0 && obj.pod.indexOf("debug=true") == -1) {
|
||||
|
@ -180,7 +180,7 @@ Volcanos("user", {
|
||||
item._init = function(target) { if (item.type == html.SELECT) { target.value = item.value||item.values[0]
|
||||
return can.onmotion.delay(can, function() { can.onappend.select(can, target, item) }) }
|
||||
if (item.name && item.name != ctx.ACTION) { target.value = msg.Option(item.name)||can.Option(item.name)||target.value||"" }
|
||||
item.mode = chat.SIMPLE, can.onappend.figure(can, can.base.Copy({run: function(event, cmds, cb) { var _msg = can.request(event, {_handle: ice.TRUE, action: msg.Option(html.ACTION)}, msg, can.Option())
|
||||
item.mode = chat.SIMPLE, can.onappend.figure(can, can.base.Copy({space: msg.Option(web.SPACE), run: function(event, cmds, cb) { var _msg = can.request(event, {_handle: ice.TRUE, action: msg.Option(html.ACTION)}, msg, can.Option())
|
||||
can.page.Select(can, ui.table, html.OPTION_ARGS, function(item) { item.name && item.value && _msg.Option(item.name, item.value) })
|
||||
can.run(event, cmds, cb, true)
|
||||
}, _enter: function(event) { return action.submit(event, can, html.SUBMIT), true }}, item), target)
|
||||
|
@ -1,7 +1,7 @@
|
||||
Volcanos(chat.ONFIGURE, {img: {
|
||||
_init: function(can, meta, target) { target.value == meta.value && (target.value = ""); var images = can.core.Split(target.value)
|
||||
var count = parseInt(meta.value||"1"), width = target.parentNode.offsetWidth-22; for (var n = 1; n < 10; n++) { if (n*n >= count) { width = width/n; break } } width -= 1
|
||||
function add(target, hash) { target._hash = hash, can.page.Appends(can, target, [{img: can.misc.MergeURL(can, {_path: web.SHARE_CACHE+hash}, true), height: width, width: width}]) }
|
||||
function add(target, hash) { target._hash = hash, can.page.Appends(can, target, [{img: can.base.MergeURL(can.misc.MergeURL(can, {_path: web.SHARE_CACHE+hash}, true), ice.POD, meta.space), height: width, width: width}]) }
|
||||
function set() { target.value = can.page.SelectChild(can, target.parentNode, html.DIV, function(target) { return target._hash }).join(mdb.FS) }
|
||||
can.onmotion.hidden(can, target)
|
||||
for (var i = 0; i < count; i++) {
|
||||
|
@ -4,7 +4,7 @@ Volcanos(chat.ONIMPORT, {
|
||||
can.page.Appends(can, can.ui.content, msg.Table(function(item) {
|
||||
if (!list[item.zone]) { list[item.zone] = item, can.onimport.item(can, {name: item.zone}, function() {}) }
|
||||
return {view: html.ITEM, list: [
|
||||
{view: wiki.IMAGE, list: [{img: can.misc.MergeCache(can, can.core.Split(item.image)[0])}]},
|
||||
{view: wiki.IMAGE, list: [{img: can.misc.MergeCache(can, can.core.Split(item.image)[0], item.space)}]},
|
||||
{view: wiki.CONTENT, list: [
|
||||
{view: [html.TITLE, html.DIV, item.name]},
|
||||
{view: [html.CONTENT, html.DIV, item.text]},
|
||||
|
Loading…
x
Reference in New Issue
Block a user