1
0
forked from x/volcanos
This commit is contained in:
shylinux@163.com 2022-09-16 12:44:09 +08:00
parent 5bf4b85ca0
commit 9c472a98b0
4 changed files with 19 additions and 8 deletions

View File

@ -207,6 +207,7 @@ body.white div.item.select { background-color:#4682b46b; }
/* print */ /* print */
body.print { background-color:white; color:black; } body.print { background-color:white; color:black; }
body.print legend, body.print select, body.print input, body.print input[type=button] { background-color:lightgray; color:black; box-shadow:0px 0px 0px 0px #626bd0; } body.print legend, body.print select, body.print input, body.print input[type=button] { background-color:lightgray; color:black; box-shadow:0px 0px 0px 0px #626bd0; }
body.print input[type=text] { background-color:lightgray; }
body.print table.content th { background-color:lightgray; } body.print table.content th { background-color:lightgray; }
body.print table.content.action td:last-child { background-color:lightgray; } body.print table.content.action td:last-child { background-color:lightgray; }
body.print div.project div.zone>div.name { background-color:lightgray; } body.print div.project div.zone>div.name { background-color:lightgray; }

View File

@ -184,7 +184,7 @@ Volcanos(chat.ONIMPORT, {help: "导入数据", _init: function(can, msg, cb, tar
}, },
tabview: function(can, path, file, line, cb, skip, skip2) { var key = can.onexport.keys(can, file, path) tabview: function(can, path, file, line, cb, skip, skip2) { var key = can.onexport.keys(can, file, path)
if (can.isCmdMode()) { (location.hash = location.pathname.indexOf(file) > -1? "": file+ice.FS+(line||1)) } if (can.isCmdMode()) { (location.hash = location.pathname.indexOf(file) > -1? "": file+ice.FS+(line||1)) }
if (!skip && can.tabview[key]) { can.isCmdMode() && can.user.title(path+file) if (!skip && can.tabview[key]) { if (can.isCmdMode()) { can.onimport._title(can, path+file) }
can._msg && can._msg.Option(nfs.LINE, can.Option(nfs.LINE)), can._msg = can.tabview[key] can._msg && can._msg.Option(nfs.LINE, can.Option(nfs.LINE)), can._msg = can.tabview[key]
can.Option({path: path, file: file, line: line||can._msg.Option(nfs.LINE)||1}) can.Option({path: path, file: file, line: line||can._msg.Option(nfs.LINE)||1})
return can._msg.Option(can.Option()), can.onsyntax._init(can, can._msg, cb, skip2) return can._msg.Option(can.Option()), can.onsyntax._init(can, can._msg, cb, skip2)

View File

@ -1,7 +1,7 @@
Volcanos(chat.ONIMPORT, {help: "导入数据", _init: function(can, msg) { can.onmotion.clear(can) Volcanos(chat.ONIMPORT, {help: "导入数据", _init: function(can, msg) { can.onmotion.clear(can)
can.requireModules(["xterm/css/xterm.css", "xterm", "xterm-addon-fit", "xterm-addon-web-links"], function() { can.requireModules(["xterm/css/xterm.css", "xterm", "xterm-addon-fit", "xterm-addon-web-links"], function() {
var item = {hash: can.Option(mdb.HASH)}; msg.Table(function(value) { can.core.Value(item, value.key, value.value) }) var item = {hash: can.Option(mdb.HASH)}; msg.Table(function(value) { can.core.Value(item, value.key, value.value) })
can.onimport.layout(can), can.onappend._status(can), can.onimport._connect(can, item) can.onimport.layout(can, item), can.onappend._status(can), can.onimport._connect(can, item)
can.isCmdMode() && can.misc.Search(can, "hash") && can.onaction.full({}, can) can.isCmdMode() && can.misc.Search(can, "hash") && can.onaction.full({}, can)
}) })
}, },
@ -26,8 +26,12 @@ Volcanos(chat.ONIMPORT, {help: "导入数据", _init: function(can, msg) { can.o
can.runAction(can.request({}, item, {"log.disable": ice.TRUE}), "input", [btoa(val)], function() {}) can.runAction(can.request({}, item, {"log.disable": ice.TRUE}), "input", [btoa(val)], function() {})
// can.runAction(can.request({}, item, {}), "input", [btoa(val)], function() {}) // can.runAction(can.request({}, item, {}), "input", [btoa(val)], function() {})
}, },
layout: function(can) { layout: function(can, item) {
can.page.style(can, can._output, html.HEIGHT, can.ConfHeight()+(can.ConfHeight() == window.innerHeight? 10: 0), html.WIDTH, can.ConfWidth()+20, html.MAX_WIDTH, "") if (can.isCmdMode()) { item && can.onimport._title(can, item.name)
can.page.style(can, can._output, html.HEIGHT, can.ConfHeight()+10, html.WIDTH, can.ConfWidth()+20, html.MAX_WIDTH, "")
} else {
can.page.style(can, can._output, html.HEIGHT, can.ConfHeight(), html.WIDTH, can.ConfWidth(), html.MAX_WIDTH, "")
}
can._current && can._current._fit.fit() can._current && can._current._fit.fit()
}, },
grow: function(can, msg) { grow: function(can, msg) {

View File

@ -13,7 +13,9 @@ Volcanos(chat.ONIMPORT, {help: "导入数据", _init: function(can, msg, cb, tar
can.onmotion.story.auto(can, target) can.onmotion.story.auto(can, target)
can.base.isFunc(cb) && cb(msg) can.base.isFunc(cb) && cb(msg)
}, },
_title: function(can, title) {
can.user.title(title+ice.SP+(can.misc.Search(can, ice.POD)||location.host))
},
zone: function(can, list, target) { var color = [""] zone: function(can, list, target) { var color = [""]
return can.page.Append(can, target, can.core.List(list, function(zone, index) { can.base.isString(zone) && (zone = {name: zone}); return zone && {view: html.ZONE+" "+zone.name, list: [ return can.page.Append(can, target, can.core.List(list, function(zone, index) { can.base.isString(zone) && (zone = {name: zone}); return zone && {view: html.ZONE+" "+zone.name, list: [
{view: html.NAME, inner: can.user.trans(can, zone.name), style: {background: color[index%color.length]}, onclick: function() { {view: html.NAME, inner: can.user.trans(can, zone.name), style: {background: color[index%color.length]}, onclick: function() {
@ -133,8 +135,12 @@ Volcanos(chat.ONIMPORT, {help: "导入数据", _init: function(can, msg, cb, tar
Volcanos(chat.ONACTION, {help: "操作数据", Volcanos(chat.ONACTION, {help: "操作数据",
_trans: {"full": "全屏"}, _trans: {"full": "全屏"},
full: function(event, can) { full: function(event, can) {
can.onmotion.hidden(can, can._legend), can.onmotion.hidden(can, can._option), can.onmotion.hidden(can, can._action), can.onmotion.hidden(can, can._status) if (can.isCmdMode()) {
can.ConfHeight(window.innerHeight), can.ConfWidth(window.innerWidth) can.onmotion.hidden(can, can._legend), can.onmotion.hidden(can, can._option), can.onmotion.hidden(can, can._action), can.onmotion.hidden(can, can._status)
can.onimport.layout(can) can.ConfHeight(window.innerHeight), can.ConfWidth(window.innerWidth)
can.onimport.layout(can)
} else {
can.sup.onaction["切换全屏"](event, can.sup)
}
}, },
}) })