diff --git a/frame.js b/frame.js index 6f4263ce..65422ed4 100644 --- a/frame.js +++ b/frame.js @@ -157,6 +157,7 @@ Volcanos("onengine", {help: "解析引擎", list: [], _init: function(can, meta, "web.code.tmux.session", ]}, "os": {name: "os", action: [ + {name: "文件系统", help: "fs", index: "nfs.dir", args: ["", "time,size,path,link"]}, {name: "操作系统", help: "os", index: "web.wiki.word", args: ["usr/learning/自然/编程/system.shy"]}, ]}, }}, @@ -431,7 +432,8 @@ Volcanos("onlayout", {help: "页面布局", list: [], _init: function(can, targe can.Action._width = width, can.Action._height = height - if (can.user.isMobile) { return } + if (can.user.isMobile || can.user.Search(can, "pod") || can.user.Search(can, "share")) { return } + can.page.Select(can, target, ["fieldset.middle"], function(field, index) { can.page.Modify(can, field, {style: {height: height}}) }) @@ -589,8 +591,10 @@ Volcanos("onkeypop", {help: "键盘交互", list: [], _init: function(can, targe }, }) Volcanos("onmotion", {help: "动态交互", list: [], _init: function(can) { + if ((can.user.Search(can, "topic")||"").indexOf("print") > -1) { return } + var count = 0, add = true - can.user.isMobile || can.core.Timer({interval: 100}, function() { + can.user.isMobile || can.user.Search(can, "share") || can.core.Timer({interval: 100}, function() { add? count++: count-- count < 0 && (add = true) count > 100 && (add = false) diff --git a/index.css b/index.css index 7c292487..6948b477 100644 --- a/index.css +++ b/index.css @@ -323,3 +323,29 @@ body.white table input[type=button][value=停止] { body.white table input[type=button][value=启动] { background:#52ce78; } + +body.print { + background-color:white; + color:black; +} +body.print legend { + box-shadow:0px 0px 0px 0px #626bd0; +} +body.print input[type=text] { + box-shadow:0px 0px 0px 0px #626bd0; +} +body.print select { + box-shadow:0px 0px 0px 0px #626bd0; +} +body.print fieldset.Action { + background-color:white; +} +body.print fieldset.Action fieldset.plugin { + padding-left:40px; +} +body.print fieldset.Action fieldset.plugin>legend { + display:none; +} +body.print fieldset.Action fieldset.plugin>form.option { + display:none; +} diff --git a/index.html b/index.html index f60dd445..02a42439 100644 --- a/index.html +++ b/index.html @@ -7,6 +7,7 @@ +
diff --git a/page/share.html b/page/share.html index 8e4bc2d1..d03645ba 100644 --- a/page/share.html +++ b/page/share.html @@ -7,6 +7,7 @@ + diff --git a/pane/Action.js b/pane/Action.js index 3d55a947..97c25d9c 100644 --- a/pane/Action.js +++ b/pane/Action.js @@ -21,6 +21,7 @@ Volcanos("onimport", {help: "导入数据", list: [], _init: function(can, msg, // 添加插件 value.width = parseInt(can.Conf("width")), value.height = parseInt(can.Conf("height")) can.onappend._init(can, value, ["/plugin/state.js"], function(plugin) { + plugin._option.dataset.id = value.id can._plugins = (can._plugins||[]).concat([plugin]) plugin.run = function(event, cmds, cb, silent) { var msg = plugin.request(event); cmds = cmds || [] can.run(event, can.onengine[cmds[0]]? cmds: [river, storm, value.action].concat(cmds), function(msg) { @@ -55,6 +56,7 @@ Volcanos("onaction", {help: "交互操作", list: [], _init: function(can, msg, var share = can.user.Search(can, "share"); if (share) { can.run({}, ["_share", share], function(msg) { can.user.title(msg.Option("title")) + can.user.topic(can, can.user.Search(can, "topic")||msg.Option("topic")||"white print") can.Conf(RIVER, "_share"), can.Conf(STORM, share) can.onimport._init(can, msg, [], cb, can._output) }) diff --git a/pane/Header.js b/pane/Header.js index ab6724cc..fe411cd0 100644 --- a/pane/Header.js +++ b/pane/Header.js @@ -7,6 +7,7 @@ Volcanos("onimport", {help: "导入数据", list: [], _init: function(can, msg, "pack": "打包页面", "white": "白色主题", "black": "黑色主题", + "print": "打印主题", "logout": "退出", } can.onmotion.clear(can) @@ -167,11 +168,12 @@ Volcanos("onaction", {help: "交互数据", list: [], _init: function(can, msg, river: function(event, can) { can.run(event, ["search", "River.onmotion.toggle"]) }, setting: function(event, can) { - var ui = can.user.carte(event, can, can.onaction, ["pack", "white", "black"]) + var ui = can.user.carte(event, can, can.onaction, ["pack", "white", "black", "print"]) can.page.Modify(can, ui.first, {style: {top: can._target.offsetHeight}}) }, black: function(event, can, button) { can.onimport.topic(can, button) }, white: function(event, can, button) { can.onimport.topic(can, button) }, + print: function(event, can, button) { can.onimport.topic(can, "white print") }, River: function(can) { can.run({}, ["search", "River.onmotion.toggle"]) }, Footer: function(can) { can.run({}, ["search", "River.onmotion.autosize"]) }, diff --git a/pane/River.js b/pane/River.js index 3a6a35d3..b3530089 100644 --- a/pane/River.js +++ b/pane/River.js @@ -166,7 +166,7 @@ Volcanos("ondetail", {help: "菜单交互", list: ["共享群组", "添加用户 "保存参数": function(event, can, button, river, storm) { can.run(event, ["search", "Action.onexport.args"], function(item, next) { var msg = can.request({}, {hash: storm, id: item.dataset.id}) - can.run({}, [river, "tool", "action", "modify", "arg", item.dataset.args], function(msg) { + can.run(msg._event, [river, "tool", "action", "modify", "arg", item.dataset.args], function(msg) { next() }) })