mirror of
https://shylinux.com/x/volcanos
synced 2025-04-25 08:48:06 +08:00
opt color
This commit is contained in:
parent
cb617cd499
commit
46c792fc94
@ -14,6 +14,11 @@ fieldset.item.select {
|
|||||||
/* background-color:gold; */
|
/* background-color:gold; */
|
||||||
border:ridge 2px red;
|
border:ridge 2px red;
|
||||||
}
|
}
|
||||||
|
fieldset.item legend {
|
||||||
|
color:cyan;
|
||||||
|
border:ridge 2px cyan;
|
||||||
|
margin-bottom:4px;
|
||||||
|
}
|
||||||
|
|
||||||
fieldset.input {
|
fieldset.input {
|
||||||
border:solid 2px yellow;
|
border:solid 2px yellow;
|
||||||
|
@ -1,14 +1,19 @@
|
|||||||
Volcanos("onimport", {help: "导入数据", list: [],
|
Volcanos("onimport", {help: "导入数据", list: [],
|
||||||
_init: function(can, conf, output, action, option, field) {output.innerHTML = "";
|
_init: function(can, conf, output, action, option, field) {output.innerHTML = "";
|
||||||
conf.title && can.page.Append(can, output, [{view: "title",
|
can.run({}, [], function(msg) {
|
||||||
list: [{text: conf.title, className: "title"}], click: function(event) {can.Export(event, conf.title, "title")}}])
|
can.core.List(msg.result, function(title) {
|
||||||
|
can.page.Append(can, output, [{view: "title", list: [{text: title, className: "title"}],
|
||||||
|
click: function(event) {can.Export(event, conf.title, "title")},
|
||||||
|
}])
|
||||||
|
})
|
||||||
|
|
||||||
can.ui = can.page.Append(can, output, [{view: "state", list: can.core.List(conf.state, function(item) {
|
can.ui = can.page.Append(can, output, [{view: "state", list: can.core.List(conf.state, function(item) {
|
||||||
return {text: conf[item]||"", className: item, click: function(event) {can.Export(event, conf[item], item)}};
|
return {text: conf[item]||"", className: item, click: function(event) {can.Export(event, conf[item], item)}};
|
||||||
})}])
|
})}])
|
||||||
|
|
||||||
can.timer = can.Timer({interval: 1000, length: -1}, function(event) {
|
can.timer = can.Timer({interval: 1000, length: -1}, function(event) {
|
||||||
can.onimport.time(event, can, can.base.Time().split(" ")[1], "time")
|
can.onimport.time(event, can, can.base.Time().split(" ")[1], "time")
|
||||||
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
title: function(event, can, value, cmd, field) {
|
title: function(event, can, value, cmd, field) {
|
||||||
|
@ -3,7 +3,11 @@ Volcanos("onimport", {help: "导入数据", list: [],
|
|||||||
var input = {type: "input", name: name, data: item};
|
var input = {type: "input", name: name, data: item};
|
||||||
switch (item.type = item.type || item._type || item._input) {
|
switch (item.type = item.type || item._type || item._input) {
|
||||||
case "upfile": item.type = "file"; break
|
case "upfile": item.type = "file"; break
|
||||||
case "button": item.value = item.value || item.name; break
|
case "button":
|
||||||
|
item.cb = item.cb || item.value;
|
||||||
|
item.action = item.action || item.value
|
||||||
|
item.value = item.name || item.value;
|
||||||
|
break
|
||||||
case "select":
|
case "select":
|
||||||
item.values = typeof item.values == "string"? item.values.split(" "): item.values;
|
item.values = typeof item.values == "string"? item.values.split(" "): item.values;
|
||||||
input.type = "select", input.list = item.values.map(function(value) {
|
input.type = "select", input.list = item.values.map(function(value) {
|
||||||
@ -17,6 +21,7 @@ Volcanos("onimport", {help: "导入数据", list: [],
|
|||||||
case "password":
|
case "password":
|
||||||
// no break
|
// no break
|
||||||
case "text":
|
case "text":
|
||||||
|
item.cb = item.cb || item.value || "";
|
||||||
item.className || can.page.ClassList.add(can, item, item.position||"args");
|
item.className || can.page.ClassList.add(can, item, item.position||"args");
|
||||||
item.value = value || item.value || "";
|
item.value = value || item.value || "";
|
||||||
item.autocomplete = "off";
|
item.autocomplete = "off";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user