From b06d3440828564ab18c2fede6d8e5f93cfb8a821 Mon Sep 17 00:00:00 2001 From: shy Date: Tue, 26 Nov 2024 23:12:56 +0800 Subject: [PATCH] add some --- index.css | 2 +- lib/user.js | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/index.css b/index.css index 9f3d9fb5..2eb316ef 100644 --- a/index.css +++ b/index.css @@ -478,7 +478,7 @@ body>div.upload div.status div.size { text-align:center; } body.width1>div.input { margin:10px; width:calc(100% - 20px); left:0 !important; } body.width1>div.input table { width:100%; } body.width1>div.input td { padding:0; } -body.width1 div.input.float table input { width:100% !important; } +body.width1 div.input.float table input[type=text] { width:100% !important; } /* display */ fieldset:not(.Action) { position:relative; } fieldset>form.option:not(.hide) { float:left; display:contents; } diff --git a/lib/user.js b/lib/user.js index b787b5d9..c9e507ca 100644 --- a/lib/user.js +++ b/lib/user.js @@ -269,8 +269,12 @@ Volcanos("user", { ], onclick: function(event) { if (!can.page.tagis(event.target, html.INPUT, html.TEXTAREA)) { can.onmotion.clearCarte(can) } }}]) var action = can.onappend._action(can, button||[html.SUBMIT, html.CANCEL], ui.action, { _trans: {submit: msg.Option(web.SUBMIT)}, - focus: function() { can.onmotion.focus(can, can.page.Select(can, ui._target, html.INPUT_ARGS)[0]) }, + focus: function(key) { can.onmotion.focus(can, can.page.Select(can, ui._target, key? "input.args[name="+key+"]": html.INPUT_ARGS)[0]) }, Option: function(key, value, hidden) { + if (!key) { var data = kit.Dict(msg.OptionSimple()) + can.page.Select(can, ui._target, "input.args", function(target) { data[target.name] = target.value }) + return data + } var target = can.page.Select(can, ui._target, "input.args[name="+key+"]")[0] if (!target) { return } if (value != undefined) { target.value = target.value||value }