forked from x/volcanos
opt some
This commit is contained in:
parent
ae2ea11c4f
commit
877acf5ba8
4
frame.js
4
frame.js
@ -185,7 +185,7 @@ Volcanos(chat.ONAPPEND, {_init: function(can, meta, list, cb, target, field) {
|
||||
item.length > 0? /* 列表 */ {type: html.SELECT, name: item[0], values: item.slice(1), onchange: function(event) { var button = item[event.target.selectedIndex+1]
|
||||
meta[item[0]]? can.core.CallFunc(meta[item[0]], [event, can, item[0], button]): meta[button] && can.core.CallFunc(meta[button], [event, can, button])
|
||||
}}: /* 其它 */ (item.onclick = item.onclick||function(event) {
|
||||
var cb = meta[item.name]||meta[chat._ENGINE]; cb? can.core.CallFunc(cb, {event: event, can: can, button: item.name}): can.run(event, [ctx.ACTION, item.name].concat(can.sup.Input()))
|
||||
var cb = meta[item.name]||meta[chat._ENGINE]; cb? can.core.CallFunc(cb, {event: event, can: can, button: item.name}): can.run(event, [ctx.ACTION, item.name].concat((can.sup||can).Input()))
|
||||
}, (item.type == html.BUTTON && (item.value = item.value||can.user.trans(can, item.name, meta._trans))), item), "", action)
|
||||
}), meta
|
||||
},
|
||||
@ -235,7 +235,7 @@ Volcanos(chat.ONAPPEND, {_init: function(can, meta, list, cb, target, field) {
|
||||
|
||||
style: function(can, style, target) { can.page.ClassList.add(can, target||can._fields||can._target, style) },
|
||||
field: function(can, type, item, target) { type = type||html.STORY, item = item||{}
|
||||
var name = (item.nick||item.name||"").split(ice.SP)[0], title = !item.help || can.user.language(can) == "en"? name: name+"("+item.help.split(ice.SP)[0]+")"
|
||||
var name = (item.nick||item.name||"").split(ice.SP)[0], title = !item.help || item.help == name || can.user.language(can) == "en"? name: name+"("+item.help.split(ice.SP)[0]+")"
|
||||
return can.page.Append(can, target||can._output, [{view: [can.base.join([type||"", item.name||"", item.pos||""]), html.FIELDSET], list: [
|
||||
(name||title)&&{text: [name == "word"? item.help.split(ice.SP)[0]: title, html.LEGEND]}, {view: [html.OPTION, html.FORM]}, html.ACTION, html.OUTPUT, html.STATUS,
|
||||
]}])
|
||||
|
@ -151,7 +151,7 @@ Volcanos("user", {info: {}, agent: {
|
||||
var ui = can.page.Append(can, document.body, [{view: [[html.UPLOAD, chat.FLOAT]], list: [
|
||||
html.ACTION, {view: html.OUTPUT, list: ["progress"]}, {view: html.STATUS, list: [ice.SHOW, cli.COST, nfs.SIZE]},
|
||||
]}]); can.onlayout.figure(event, can, ui._target)
|
||||
var action = can.onappend._action(can, [{type: html.UPLOAD, onchange: function(event) { action.show(event, 0, event.target.files[0].size, 0) }}, cli.CLOSE], ui.action, {
|
||||
var action = can.onappend._action(can, [{type: html.UPLOAD, onchange: function(event) { action.show(event, 0, event.target.files[0].size, 0) }}, {type: html.BUTTON, name: cli.CLOSE}], ui.action, {
|
||||
begin: function(event) { begin = new Date()
|
||||
var upload = can.page.Select(can, ui.action, html.INPUT_FILE)[0]; if (upload.files.length == 0) { return upload.focus() }
|
||||
var msg = can.request(event, can.Option(), {_handle: ice.TRUE}); msg._upload = upload.files[0], msg._progress = action.show
|
||||
|
@ -3,7 +3,7 @@ body { background-color:black; color:cyan; font-size:16px; }
|
||||
legend { background-color:cadetblue; color:white; padding:0 20px; margin-right:5px; }
|
||||
select { background-color:black; color:cyan; padding:0 10px; margin-right:5px; }
|
||||
textarea { background-color:cyan; padding:5px; width:400px; resize:vertical; }
|
||||
input { background-color:cyan; padding:0 5px; margin-right:5px; }
|
||||
input:not([type=file]) { background-color:cyan; padding:0 5px; margin-right:5px; }
|
||||
input:not([type=button]) { width:120px; }
|
||||
input[name=date] { width:150px; }
|
||||
input[name=text] { width:160px; }
|
||||
@ -125,7 +125,7 @@ ul { padding-left:40px; margin:20px 0; }
|
||||
legend:hover { background-color:skyblue; }
|
||||
select:hover { background-color:gray; color:cyan; }
|
||||
input[type=button]:hover { background-color:gray; }
|
||||
input:not([type=button]):hover { background-color:white; }
|
||||
input:not([type=button]):not([type=file]):hover { background-color:white; }
|
||||
input[name=cmd]:hover { background-color:cyan; color:black; }
|
||||
div.tabs:hover, div.tabs.select, div.item:hover, div.item.select, table.content tr:hover, table.content tr.select, h1:hover, h2:hover, h3:hover, .select { background-color:steelblue; }
|
||||
div.story[data-type=spark] span:hover { background-color:deepskyblue; box-shadow:4px 4px 20px 4px #29318e; }
|
||||
|
@ -21,7 +21,7 @@ Volcanos(chat.ONIMPORT, {_init: function(can, msg, cb, target) {
|
||||
Volcanos(chat.ONFIGURE, {
|
||||
create: function(can, target, zone, path) {
|
||||
can.isCmdMode()? can.onappend._action(can, can.base.Obj(can._msg.Option(ice.MSG_ACTION)).concat(
|
||||
["favor", "git", "首页", "官网" , "文档" , "百度"], window.webview? ["浏览器", "录屏", "日志", "编辑器"]: []
|
||||
["首页", "官网" , "文档" , "git"], window.webview? ["浏览器", "录屏", "日志", "编辑器"]: []
|
||||
), target): can.onmotion.hidden(can, target.parentNode)
|
||||
can.sup.onexport.link = function(can) { var args = can.Option(); args.topic = chat.BLACK
|
||||
var meta = can.Conf(); args.cmd = meta.index||can.core.Keys(meta.ctx, meta.cmd)
|
||||
|
Loading…
x
Reference in New Issue
Block a user