diff --git a/frame.js b/frame.js index cee6c361..00b168a3 100644 --- a/frame.js +++ b/frame.js @@ -251,7 +251,9 @@ Volcanos(chat.ONAPPEND, {help: "渲染引擎", _init: function(can, meta, list, can.Update(event, cmds.slice(0, 2).concat(args), cb||function() { if (can.core.CallFunc([can.sup, chat.ONIMPORT, ice.MSG_PROCESS], {can: can.sup, msg: msg})) { return } if (can.core.CallFunc([can, chat.ONIMPORT, ice.MSG_PROCESS], {can: can, msg: msg})) { return } - if (msg.Result().length > 0 || msg.Length() > 0) { + if (cmds[1] == mdb.CREATE || cmds[1] == mdb.INSERT) { + can.Update() + } else if (msg.Result().length > 0 || msg.Length() > 0) { can.onappend.table(can, msg), can.onappend.board(can, msg) } else { can.Update() diff --git a/page/index.css b/page/index.css index 924f481a..7730882a 100644 --- a/page/index.css +++ b/page/index.css @@ -65,7 +65,7 @@ fieldset.float>form.option input[type=button][name=close]{ display:block; } fieldset.full>form.option input[type=button][name=close]{ display:block; } fieldset.plug>form.option input[type=button][name=close]{ display:block; } -fieldset.plugin>div.status { border-top:1px solid darkcyan; } +fieldset.plugin>div.status { border-top:1px solid darkcyan; height:30px; } fieldset.story>div.status { border-top:1px solid darkcyan; } fieldset.output>form.option { display:none; } fieldset.output>div.action { display:none; } @@ -327,7 +327,7 @@ body.white.simple div.carte div.item:hover { background-color:#e3e6f1; } body.white.simple fieldset.plugin div.output.json div.item span { color:black; } body.white.simple fieldset.plugin div.output.json div.item span.key { color:blue; } body.white.simple fieldset.plugin div.output.json div.item span.nonce { color:lightgray; } -body.white.simple div.output.card input[type=button] { background-color:#0152d9; font-size:0.8rem; padding:5px 10px; box-shadow:2px 2px 6px 1px gray; } +body.white.simple div.output.card input[type=button] { background-color:#0152d9; color:black; font-size:0.8rem; padding:5px 10px; box-shadow:2px 2px 6px 1px gray; } body.white.simple div.output.card input[type=button]:hover { box-shadow:2px 2px 8px 2px gray; } body.white.simple div.output div.project div.zone>div.action>div.item input[type=text] { color:black; } diff --git a/plugin/input.js b/plugin/input.js index 85a350d1..0a8ea726 100644 --- a/plugin/input.js +++ b/plugin/input.js @@ -1,7 +1,7 @@ Volcanos(chat.ONACTION, {help: "控件交互", _init: function(can, meta, cb, target) { can.base.isFunc(cb) && cb(); switch (meta.type) { case html.SELECT: meta.value && (target.value = meta.value); break - case html.BUTTON: meta.action == ice.AUTO && target.click(); break + case html.BUTTON: !can.sup._delay_init && meta.action == ice.AUTO && target.click(); break } }, run: function(event, can) { can.run(can.request(event, {_toast: "执行中..."})) }, diff --git a/plugin/local/code/inner.css b/plugin/local/code/inner.css index a9feb68b..98e88650 100644 --- a/plugin/local/code/inner.css +++ b/plugin/local/code/inner.css @@ -39,7 +39,7 @@ fieldset.inner>div.output fieldset.toolkit>div.output fieldset { display:none; } fieldset.inner>div.output fieldset.toolkit>div.output fieldset.select { background-color:#0e3369b3; color:white; display:block; z-index:10; } fieldset.inner div.output fieldset.toolkit>div.output { position:unset; } -fieldset>div.output>fieldset.plug { position:inherit; bottom:0px; right:0px; } +fieldset>div.output>fieldset.plug { position:sticky; bottom:0px; right:0px; } fieldset>div.output>fieldset.plug { display:none; } fieldset>div.output>fieldset.plug.select { background-color:#0e3369b3; color:white; display:block; z-index:10; } fieldset>div.status legend { float:right; height:30px; } diff --git a/plugin/local/code/inner.js b/plugin/local/code/inner.js index d37d01ef..52473bc5 100644 --- a/plugin/local/code/inner.js +++ b/plugin/local/code/inner.js @@ -265,7 +265,10 @@ Volcanos(chat.ONIMPORT, {help: "导入数据", process: function(can, msg, target, height, width) { can.onmotion.clear(can, target), can.user.toastSuccess(can) if (msg.Option(ice.MSG_PROCESS) == "_field") { msg.Table(function(item) { item.display = msg.Option(ice.MSG_DISPLAY) - can.onimport.plug(can, item, target, function(sub) { height && sub.ConfHeight(height-3*html.ACTION_HEIGHT), width && sub.ConfWidth(width), sub.Focus() }) + can.onimport.plug(can, item, target, function(sub) { + sub.onaction.close = function() { can.onmotion.hidden(can, target.parentNode), can.onimport.layout(can) } + height && sub.ConfHeight(height-3*html.ACTION_HEIGHT), width && sub.ConfWidth(width), sub.Focus() + }) }) } else if (msg.Option(ice.MSG_DISPLAY) != "") { can.onappend._output(can, msg, msg.Option(ice.MSG_DISPLAY), target, false, function(msg) { can.onmotion.delay(can, function() { can.onimport.layout(can) }) }) diff --git a/plugin/local/team/plan.js b/plugin/local/team/plan.js index bfb4b21e..6993e4e1 100644 --- a/plugin/local/team/plan.js +++ b/plugin/local/team/plan.js @@ -6,6 +6,7 @@ Volcanos(chat.ONIMPORT, {help: "导入数据", _init: function(can, msg, cb, tar can.user.isMobile && !can.user.isLandscape() && can.onmotion.hidden(can, can.ui.project) !can.user.isMobile && can.onmotion.toggle(can, can.ui.profile, true) !can.user.isMobile && can.onmotion.toggle(can, can.ui.display, true) + can.onappend.tools(can, msg) }, _content: function(can, msg, head, list, key, get, set) { var hash = {}; msg.Table(function(value, index) { var k = key(can.base.Date(value.begin_time)); hash[k] = (hash[k]||[]).concat([value]) }) diff --git a/plugin/table.js b/plugin/table.js index 7cf154ec..80385747 100644 --- a/plugin/table.js +++ b/plugin/table.js @@ -157,6 +157,11 @@ Volcanos(chat.ONIMPORT, {help: "导入数据", _init: function(can, msg, cb, tar }}, ]} })) + can.page.Select(can, target, "input[type=button]", function(target) { + if (target.value == target.name) { + target.value = can.user.trans(can, target.name) + } + }) }, plug: function(can, meta, target, cb) { if (!meta || !meta.index) { return } meta.type = "plug", can.onappend.plugin(can, meta, function(sub) { sub.sup = can @@ -168,7 +173,7 @@ Volcanos(chat.ONIMPORT, {help: "导入数据", _init: function(can, msg, cb, tar }, tool: function(can, list, cb, target) { target = target||can._output can.core.List(list, function(meta) { typeof meta == "string" && (meta = {index: meta}) - can.onimport.plug(can, meta, target, function(sub) { + can.onimport.plug(can, meta, target, function(sub) { sub._delay_init = true sub.ConfHeight(can.ConfHeight()-4*html.ACTION_HEIGHT), sub.ConfWidth(can.ConfWidth()) sub.page.style(sub, sub._output, html.MAX_HEIGHT, sub.ConfHeight()) sub.page.style(sub, sub._output, html.MAX_WIDTH, sub.ConfWidth())