diff --git a/lib/page.js b/lib/page.js index 249fc9ca..fb673a8d 100644 --- a/lib/page.js +++ b/lib/page.js @@ -38,7 +38,7 @@ Volcanos("page", {help: "网页模块", "left": true, "right": true, "top": true, "bottom": true, "margin-top": true, "margin-left": true, } - if (size[sub] && value && (typeof value == "number" || !value.endsWith("px"))) { + if (size[sub] && value && (typeof value == "number" || value.indexOf("px") == -1)) { value += "px" } target[key] && (target[key][sub] = value) diff --git a/page/index.css b/page/index.css index d7c21fcc..36d143e9 100644 --- a/page/index.css +++ b/page/index.css @@ -90,6 +90,21 @@ option { font-family:monospace; } +table.layout { + margin:0; border:0; padding:0; + border-spacing:0; +} +table.layout tr { + margin:0;border:0;padding:0; +} +table.layout td { + margin:0; border:0; padding:0; + vertical-align:top; +} +table.layout th { + margin:0;border:0;padding:0; +} + table.content { width:-webkit-fill-available; border:0; white-space:pre; @@ -104,9 +119,8 @@ table.content th { padding:2px 6px; } table.content td { - /* max-width:1200px; */ - overflow:auto; padding:2px 6px; + overflow:auto; } table.content td.select { background-color:red; @@ -217,21 +231,6 @@ fieldset>div.status>div.item>label { font-size:10px; color:gray; } -table.layout { - margin:0; border:0; padding:0; - border-spacing:0; -} -table.layout tr { - margin:0;border:0;padding:0; -} -table.layout td { - margin:0; border:0; padding:0; - vertical-align:top; -} -table.layout th { - margin:0;border:0;padding:0; -} - fieldset>div.output td.project { background-color:#435f8c8c; } diff --git a/plugin/local/code/inner.css b/plugin/local/code/inner.css index df96637d..068d8fc0 100644 --- a/plugin/local/code/inner.css +++ b/plugin/local/code/inner.css @@ -21,10 +21,13 @@ fieldset.editor>div.output div.project { } fieldset.editor>div.output div.content { font-size:16px; font-family:monospace; - overflow:auto; padding-right:20px; + overflow:auto; padding-right:25px; position:relative; color:white; } +fieldset.editor>div.output div.content table.layout { + width:-webkit-fill-available; +} fieldset.editor>div.output div.content tr.select td.line { border:solid 1px red; border-right:solid 2px red; @@ -80,3 +83,6 @@ body.white fieldset.editor>div.output div.content td.text span.string { color:#a703a7; } +body.white fieldset.editor>div.output div.content tr { + background-color:#e1f1ff00; +} diff --git a/plugin/local/code/inner.js b/plugin/local/code/inner.js index f7e4899a..b82eb610 100644 --- a/plugin/local/code/inner.js +++ b/plugin/local/code/inner.js @@ -1,8 +1,9 @@ Volcanos("onimport", {help: "导入数据", _init: function(can, msg, list, cb, target) { can.history = can.history || [] can.onmotion.clear(can), can.ui = can.onlayout.profile(can) - can.page.Modify(can, can.ui.content, {style: {"max-height": can.Conf("height")-320}}) can.page.Modify(can, can.ui.project, {style: {"max-height": can.Conf("height")-320}}) + can.page.Modify(can, can.ui.content, {style: {"max-height": can.Conf("height")-320}}) + can.page.Modify(can, can.ui.content, {style: {"min-width": can.Conf("width")-170}}) can.page.Modify(can, can.ui.display, {style: {display: "none"}}) msg.Option({path: can.Option("path"), file: can.Option("file"), line: can.Option("line")||1}) @@ -12,7 +13,6 @@ Volcanos("onimport", {help: "导入数据", _init: function(can, msg, list, cb, can.onimport.project(can, msg.Option("path")) typeof cb == "function" && cb(msg) - can.onaction.project({}, can) var ui = can.page.Append(can, target, [ {view: "search", style: {display: "none"}, list: [ {view: "action", list: [