From 42b032c451cd749a376912f5ddab9d18b146371a Mon Sep 17 00:00:00 2001 From: shy Date: Thu, 8 May 2025 11:58:57 +0800 Subject: [PATCH] add some --- frame.js | 8 ++++---- plugin/table.js | 17 +++++++++++++---- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/frame.js b/frame.js index a5946e7a..4b8ac0a3 100644 --- a/frame.js +++ b/frame.js @@ -368,7 +368,9 @@ Volcanos(chat.ONAPPEND, { can.onmotion.clear(can, can._action), sub.onappend._action(sub, [{view: "_space"}].concat(list), action||can._action) sub.onappend._status(sub, sub.onexport&&sub.onexport.list||msg.Option(ice.MSG_STATUS), null, msg), can.user.isMobile || sub.onappend.tools(sub, msg) // if (msg.Option("sess.online") == ice.TRUE) { can.ondaemon._online(can) } - if (msg.Length() > 9 && !sub.ui.project && !can.user.isMobile) { can.onmotion.delay(can, function() { can.onappend._filter(can) }, 300) } + if (!msg.IsDetail() && msg.Length() > 9 && !sub.ui.project && !can.user.isMobile) { + can.onmotion.delay(can, function() { can.onappend._filter(can) }, 300) + } } if (can.onimport.size) { @@ -540,9 +542,7 @@ Volcanos(chat.ONAPPEND, { can.page.insertBefore(can, can.onappend.filter(can, can._action, can.ui.content||can._output).parentNode, (can.page.SelectOne(can, can._action, "div.item._space")||{}).nextSibling, can._action) }, filter: function(can, target, output) { output = output||can.ui.content||target - if (can.page.SelectOne(can, target, "div.item.filter")) { - return {} - } + if (can.page.SelectOne(can, target, "div.item.filter")) { return {} } return can.onappend.input(can, {type: html.TEXT, name: web.FILTER, icon: icon.SEARCH, placeholder: can.user.trans(can, "search in n items", "搜索"), onkeydown: function() {}, onkeyup: function(event) { var value = (event.currentTarget? event.currentTarget.value: "").trim() if (can.sub && can.sub.onaction && can.sub.onaction.filter && can.sub.onaction.filter(event, can.sub, value)) { diff --git a/plugin/table.js b/plugin/table.js index ef4ba00f..f69fe8aa 100644 --- a/plugin/table.js +++ b/plugin/table.js @@ -396,6 +396,7 @@ Volcanos(chat.ONIMPORT, { function reload(event) { sub.Update(sub.request(event, {_toast: "reload"})) } sub.onimport._field = function(msg) { msg.Table(function(value) { can.onimport.myStory(can, value) }) } sub.onexport.output = function(_sub, msg) { sub.sub.onaction._goback = goback, sub._select() + msg.IsDetail() || can.onappend.filter(can, _action, sub._output) if (can.base.endWith(sub.ConfIndex(), ".portal")) { return } msg.Option(ice.MSG_ACTION) && can.onappend._action(sub, msg.Option(ice.MSG_ACTION), _action, null, true) if (!msg.IsDetail()) { @@ -406,7 +407,6 @@ Volcanos(chat.ONIMPORT, { var list = [can.page.button(can, can.user.trans(can, "goback", "返回"), function(event) { goback(event) }), can.page.button(can, can.user.trans(can, "reload", "刷新"), function(event) { reload(event) })] // var list = [can.page.button(can, can.user.trans(can, "goback", "返回"), function(event) { goback(event) })] can.page.Appends(can, _action, list) - can.onappend.filter(can, _action, sub._output) can.page.style(can, _action, html.DISPLAY, html.FLEX) can.user.isMobile && sub.onimport.size(sub, window.innerHeight-ACTION_HEIGHT, window.innerWidth, false) } @@ -423,18 +423,24 @@ Volcanos(chat.ONIMPORT, { }, myPlaceInfo: function(can, msg, action) { if (!can.user.isMobile) { return } can.core.List(can._stacks_current.concat([]).reverse(), function(sub) { - if (sub._output == can._target) { - can.onappend.style(can, "market_uid", can._fields) + if (sub._output == can._target) { can.onappend.style(can, "market_uid", can._fields) can.page.Append(can, can._output, [{view: "place_info", _init: function(target) { can.run({}, [ctx.ACTION, action], function(msg) { can.onimport.itemcards(can, msg, function(value) { return [ - {view: html.TITLE, list: [value.user_name]}, + {view: html.TITLE, list: [value.user_name, can.onimport.titleAction(can, value)]}, {view: html.STATUS, list: [value.city_name, value.street_name, value.place_name, value.service_name]}, ] }, function(event, value) { can.onimport.myStory(can, { index: can.ConfIndex().split(".").slice(0, 3).concat("portal").join("."), args: [value.place_uid], }) }, target) + can.page.Select(can, target, html.INPUT_BUTTON, function(target) { + target.onclick = function(event) { + can.onimport.myStory(can, { + index: can.ConfIndex().split(".").slice(0, 3).concat("portal").join("."), args: [msg.Append("place_uid")], + }) + } + }) }) }}]) } @@ -522,6 +528,9 @@ Volcanos(chat.ONIMPORT, { unitView: function(can, value, key, unit) { if (!value[key] || value[key] == "0") { return } return {text: [[can.user.trans(can, key, null, html.INPUT)+":", value[key]].concat(unit? [unit]: []).join(" "), "", key]} }, + beginTime: function(can, value) { + return (value.process_time||value.begin_time).split(" ")[0]+" ~ "+(value.finish_time||value.end_time).split(" ")[0] + }, typeStyle: function(can, value, key) { return can.Conf("_trans.value."+key+".style."+value[key])||"" }, roleStyle: function(can, value, key) { return can.Conf("_trans.value."+key+".style."+value[key])||"" }, shareTitle: function(can, msg, title, content, icons) { if (msg.IsDetail()) { var value = msg.TableDetail()