1
0
forked from x/volcanos
This commit is contained in:
IT 老营长 @云轩领航-创始人 2022-01-26 02:51:05 +08:00
parent 3865cbb3b9
commit 73d4c76f1c
41 changed files with 6413 additions and 6417 deletions

View File

@ -81,7 +81,7 @@ Volcanos("misc", {help: "通信协议", Message: function(event, can) { var msg
}, },
}; };
return can.misc.proto(msg, proto) return can.misc.proto(msg, proto)
}, },
POST: function(can, msg, url, form, cb) { // _method _accept _upload _progress POST: function(can, msg, url, form, cb) { // _method _accept _upload _progress
var xhr = new XMLHttpRequest(); msg._xhr = xhr var xhr = new XMLHttpRequest(); msg._xhr = xhr
xhr.open(msg._method||"POST", url), xhr.onreadystatechange = function() { xhr.open(msg._method||"POST", url), xhr.onreadystatechange = function() {

View File

@ -235,9 +235,9 @@ body.white table.content tr:hover { background-color:green; }
body.white fieldset.Action fieldset.plugin legend:hover { background-color:#6ee4e4; } body.white fieldset.Action fieldset.plugin legend:hover { background-color:#6ee4e4; }
body.print fieldset.River>div.output div.item.select { background-color:white; border:solid 2px red; } body.print fieldset.River>div.output div.item.select { background-color:white; border:solid 2px red; }
body.mobile select { font-size:1.6rem; height:1.6em; } body.mobile select { font-size:1.4rem; height:1.4em; margin-top:3px; }
body.mobile legend { font-size:2rem; } body.mobile legend { font-size:2rem; }
body.mobile input { font-size:1.6rem; } body.mobile input { font-size:1.2rem; }
body.mobile input[type=text] { margin-top:5px; height:1.2em; } body.mobile input[type=text] { margin-top:5px; height:1.2em; }
body.mobile fieldset.Header.head { width:-webkit-fill-available; } body.mobile fieldset.Header.head { width:-webkit-fill-available; }
body.mobile fieldset.Header.head { background-color:#000000b8; font-size:2rem; height:2em; position:fixed; top:0; } body.mobile fieldset.Header.head { background-color:#000000b8; font-size:2rem; height:2em; position:fixed; top:0; }

View File

@ -115,5 +115,4 @@ Volcanos({name: "chat", panels: [
"cat", "dir", "tail", "trash", "cat", "dir", "tail", "trash",
]}, ]},
}}, }},
}, }})
})

View File

@ -37,12 +37,12 @@ Volcanos("onimport", {help: "导入数据", list: [], _init: function(can, msg)
_share: function(can, share) { share && can.run({}, ["_share", share], function(msg) { _share: function(can, share) { share && can.run({}, ["_share", share], function(msg) {
can.user.title(msg.OptionOrSearch(chat.TITLE)) can.user.title(msg.OptionOrSearch(chat.TITLE))
can.setHeader(chat.TOPIC, msg.OptionOrSearch(chat.TOPIC)) can.setHeader(chat.TOPIC, msg.OptionOrSearch(chat.TOPIC))
can.page.Select(can, document.body, html.FIELDSET_PANEL, function(item) { // can.page.Select(can, document.body, html.FIELDSET_PANEL, function(item) {
item != can._target && can.onmotion.hidden(can, item) // item != can._target && can.onmotion.hidden(can, item)
}) // })
can.Conf(html.MARGIN_X, 0, html.MARGIN_Y, 2*html.ACTION_HEIGHT) can.Conf(html.MARGIN_X, 0, html.MARGIN_Y, 2*html.ACTION_HEIGHT)
can.page.ClassList.add(can, can._target, ice.CMD) // can.page.ClassList.add(can, can._target, ice.CMD)
can.onlayout._init(can) can.onlayout._init(can)
can.Conf(chat.RIVER, "_share", chat.STORM, share) can.Conf(chat.RIVER, "_share", chat.STORM, share)
@ -77,8 +77,7 @@ Volcanos("onengine", {help: "解析引擎", list: [], _engine: function(event, p
}), can.base.isFunc(cb) && cb(msg) }), can.base.isFunc(cb) && cb(msg)
} }
return true return true
}, }})
})
Volcanos("onaction", {help: "交互操作", list: [], _init: function(can, cb, target) { Volcanos("onaction", {help: "交互操作", list: [], _init: function(can, cb, target) {
can.Conf(html.MARGIN_Y, 4*html.PLUGIN_MARGIN+2*html.ACTION_HEIGHT+html.ACTION_MARGIN) can.Conf(html.MARGIN_Y, 4*html.PLUGIN_MARGIN+2*html.ACTION_HEIGHT+html.ACTION_MARGIN)
can.Conf(html.MARGIN_X, 4*html.PLUGIN_MARGIN) can.Conf(html.MARGIN_X, 4*html.PLUGIN_MARGIN)

View File

@ -67,8 +67,7 @@ Volcanos("onengine", {help: "解析引擎", list: [], _engine: function(event, c
can.core.Item(river.storm, function(key, value) { can.core.Item(river.storm, function(key, value) {
msg.Push({hash: key, name: can.user.language(can) == "en"? key: value.name}) // 应用列表 msg.Push({hash: key, name: can.user.language(can) == "en"? key: value.name}) // 应用列表
}), can.base.isFunc(cb) && cb(msg); return true }), can.base.isFunc(cb) && cb(msg); return true
}, }})
})
Volcanos("onaction", {help: "控件交互", list: [], _init: function(can, cb, target) { Volcanos("onaction", {help: "控件交互", list: [], _init: function(can, cb, target) {
can.onengine.plugin(can, "info", shy("信息", {}, ["text", "list", "back"], function(msg, cmds) { can.onengine.plugin(can, "info", shy("信息", {}, ["text", "list", "back"], function(msg, cmds) {
msg.Echo(JSON.stringify(can)) msg.Echo(JSON.stringify(can))

View File

@ -44,6 +44,7 @@ Volcanos("onimport", {help: "导入数据", list: [], _init: function(can, msg,
}, },
}) })
Volcanos("onaction", {help: "交互操作", list: [cli.CLEAR, cli.CLOSE, cli.DONE], _init: function(can, cb, target) { Volcanos("onaction", {help: "交互操作", list: [cli.CLEAR, cli.CLOSE, cli.DONE], _init: function(can, cb, target) {
can.onmotion.hidden(can, can._target)
can.base.isFunc(cb) && cb() can.base.isFunc(cb) && cb()
}, },
onlogin: function(can, msg) { onlogin: function(can, msg) {

View File

@ -4,7 +4,6 @@ Volcanos("onaction", {help: "控件交互", list: [], _init: function(can, meta,
case html.BUTTON: meta.action == ice.AUTO && target.click(); break case html.BUTTON: meta.action == ice.AUTO && target.click(); break
} }
}, },
run: function(event, can) { run: function(event, can) {
var title = can.sup._name+ice.SP+can.sup.Input([], true) var title = can.sup._name+ice.SP+can.sup.Input([], true)
var toast = can.user.toast(can, "执行中...", title, -1) var toast = can.user.toast(can, "执行中...", title, -1)

View File

@ -15,7 +15,6 @@ Volcanos("onimport", {help: "导入数据", list: [], _init: function(can, msg,
}, },
}) })
Volcanos("onaction", {help: "操作数据", list: [], _init: function(can, msg, list, cb, target) { Volcanos("onaction", {help: "操作数据", list: [], _init: function(can, msg, list, cb, target) {
}, },
open: function(event, can) { open: function(event, can) {

View File

@ -184,13 +184,13 @@ var chat = {ONIMPORT: "onimport", ONACTION: "onaction", ONKEYMAP: "onkeymap", ON
"/plugin/input/province.js", "/plugin/input/province.js",
], ],
ACTION_LAYOUT_FMT: ` ACTION_LAYOUT_FMT: `
fieldset.Action.grid>div.output fieldset.plugin { fieldset.Action.grid>div.output fieldset.plugin {
width:_width; height:_height; width:_width; height:_height;
} }
fieldset.Action.grid>div.output fieldset.plugin>div.output { fieldset.Action.grid>div.output fieldset.plugin>div.output {
width:_width; height:_height; width:_width; height:_height;
} }
`, `,
} }
var team = { var team = {
TASK: "task", PLAN: "plan", TASK: "task", PLAN: "plan",