mirror of
https://shylinux.com/x/volcanos
synced 2025-04-26 09:14:06 +08:00
opt mall
This commit is contained in:
parent
d29978c582
commit
254ed07ce0
11
frame.js
11
frame.js
@ -343,12 +343,19 @@ Volcanos("onappend", {help: "渲染引擎", list: [], _init: function(can, meta,
|
||||
var table = can.page.AppendTable(can, msg, target||can._output, msg.append, cb||function(value, key, index, line, array) {
|
||||
if (key == "value") { key = line.key||line.name, line = {}
|
||||
can.core.List(array, function(item, index) { line[item.key||line.name] = item.value })
|
||||
if (key == "extra.cmd") {
|
||||
can.onappend.plugin(can, {ctx: line["extra.ctx"], cmd: line["extra.cmd"], arg: line["extra.arg"]}, function(sub) {
|
||||
sub.run = function(event, cmds, cb) {
|
||||
can.run(event, [ctx.ACTION, cli.RUN].concat(cmds), cb, true)
|
||||
}
|
||||
}, target)
|
||||
}
|
||||
}
|
||||
|
||||
return {text: [value, "td"], onclick: function(event) { var target = event.target
|
||||
if (target.tagName == "INPUT" && target.type == "button") { var msg = can.sup.request(event, can.Option())
|
||||
key == "value"? can.core.List(array, function(item, index) { msg.Option(item.key, item.value) }): msg.Option(line)
|
||||
return can.run(event, ["action", target.name], function(msg) { can.run() }, true)
|
||||
return can.run(event, [ctx.ACTION, target.name], function(msg) { can.run() }, true)
|
||||
}
|
||||
|
||||
can.sup.onaction.change(event, can.sup, key, value, function(msg) {
|
||||
@ -357,7 +364,7 @@ Volcanos("onappend", {help: "渲染引擎", list: [], _init: function(can, meta,
|
||||
}, ondblclick: function(event) { var target = event.target
|
||||
can.onmotion.modify(can, target, function(event, value, old) { var msg = can.sup.request(event, can.Option())
|
||||
key == "value"? can.core.List(array, function(item, index) { msg.Option(item.key, item.value) }): msg.Option(line)
|
||||
can.run(event, ["action", "modify", key == "value"? line.key||line.name: key, value], function(msg) { can.run() }, true)
|
||||
can.run(event, [ctx.ACTION, mdb.MODIFY, key == "value"? line.key||line.name: key, value], function(msg) { can.run() }, true)
|
||||
})
|
||||
}}
|
||||
}); table && can.page.Modify(can, table, {className: "content"})
|
||||
|
@ -128,6 +128,7 @@ input[type=button]:hover {
|
||||
}
|
||||
td>input[type=button][name=remove] {
|
||||
background-color:red;
|
||||
|
||||
}
|
||||
td>input[type=button][name=create] {
|
||||
background-color:blue;
|
||||
@ -357,6 +358,9 @@ fieldset>form.option {
|
||||
fieldset>div.action {
|
||||
float:left;
|
||||
}
|
||||
fieldset>div.status {
|
||||
border-top:1px solid darkcyan;
|
||||
}
|
||||
fieldset>form.option>div.item {
|
||||
float:left; margin-right:3px;
|
||||
min-height:25px; vertical-align:middle;
|
||||
|
Loading…
x
Reference in New Issue
Block a user