diff --git a/frame.js b/frame.js index dabe6b35..c70fc277 100644 --- a/frame.js +++ b/frame.js @@ -174,6 +174,11 @@ Volcanos(chat.ONAPPEND, {_init: function(can, meta, list, cb, target, field) { _target: can.onappend.input(can, item, args[index]||opts[item.name], option||can._option), _option: option||can._option, _action: can._action, _output: can._output, _status: can._status, CloneField: can.Clone, CloneInput: function() { can.onmotion.focus(can, add(item)._target) }, Input: can.Input, Option: can.Option, Action: can.Action, Status: can.Status, }, [item.display, chat.PLUGIN_INPUT_JS], function(sub) { sub.Conf(item) + if (item.type == html.BUTTON && can.base.isIn(item.name, mdb.CREATE, mdb.INSERT)) { + can.onappend.style(can, "icons", sub._target.parentNode) + can.page.Append(can, sub._target.parentNode, [{icon: item.name, onclick: function(event) { + can.Update(event, [ctx.ACTION, item.name]) + }}]) } if (item.type == html.TEXT) { can.page.Append(can, sub._target.parentNode, [{text: [sub._target.value, html.SPAN, mdb.VALUE]}]) } sub.run = function(event, cmds, cb, silent) { var msg = can.request(event, kit.Dict(chat._TOAST, ice.PROCESS))._caller() msg.RunAction(event, sub, cmds) || msg.RunAction(event, can.core.Value(can, chat._OUTPUTS_CURRENT), cmds) || can.Update(event, can.Input(cmds, !silent), cb, silent) diff --git a/index.css b/index.css index 8a4a6894..19b0dee9 100644 --- a/index.css +++ b/index.css @@ -162,6 +162,9 @@ form.option>div.icon.next { font-size:18px; } form.option>div.icon.prev { font-size:18px; } form.option>div.icon.lt { font-size:20px; line-height:30px; } form.option>div.icon:hover { background-color:white; } +form.option>div.item.button>span.icon { line-height:30px; font-size:26px; padding:0 5px; height:32px; display:none; } +fieldset.cmd>form.option>div.item.button>span.icon { display:unset; } +fieldset.story>form.option>div.item.button>span.icon { display:unset; } fieldset:not(.float)>form.option>div.text>span.value { display:none; } fieldset.float div.item.text:hover>span.icon.delete { visibility:hidden; } fieldset.float>form.option>div.text>input { display:none; } diff --git a/lib/page.js b/lib/page.js index b33ea2e7..4836b0f2 100644 --- a/lib/page.js +++ b/lib/page.js @@ -249,7 +249,8 @@ Volcanos("page", { unicode: { menu: "☰", prev: "❮", next: "❯", play: "▸", push: "⇈", pull: "⇊", refresh: "↻", goback: "↺", - create: "+", delete: "✕", open: "▾", close: "▸", + create: "+", remove: "✕", insert: "+", delete: "✕", + open: "▾", close: "▸", select: "▿", inner: "..", back: "◀", reback: "▶", lt: "❮", gt: "❯", diff --git a/plugin/local/code/inner.js b/plugin/local/code/inner.js index 94e50873..79638ff2 100644 --- a/plugin/local/code/inner.js +++ b/plugin/local/code/inner.js @@ -182,7 +182,7 @@ Volcanos(chat.ONIMPORT, {_init: function(can, msg, cb, target) { can.onmotion.cl can.onimport.process(can, msg, can.ui.display, height, width, function(sub) { if (sub.ConfHeight() < can.ui.content.offsetHeight-100) { can.page.style(can, sub._output, html.MAX_HEIGHT, "") } can.onmotion.delay(can, function() { var _height = can.base.Max(sub._target.offsetHeight, height) _msg.Option(html.HEIGHT, _height), can.onimport.layout(can), sub.onimport.size(sub, _height == height? _height-1: _height, width, true) - }, 300) + }) }) }, process: function(can, msg, target, height, width, cb) { can.onmotion.clear(can, target)