1
0
mirror of https://shylinux.com/x/volcanos synced 2025-04-25 16:58:06 +08:00
This commit is contained in:
IT 老营长 @云轩领航-创始人 2023-10-27 00:19:13 +08:00
parent a123b51e68
commit dcc5f9062d
3 changed files with 5 additions and 3 deletions

View File

@ -99,7 +99,7 @@ Volcanos(chat.ONDAEMON, {_init: function(can, name) { if (can.user.isLocalFile)
}) })
Volcanos(chat.ONAPPEND, {_init: function(can, meta, list, cb, target, field) { Volcanos(chat.ONAPPEND, {_init: function(can, meta, list, cb, target, field) {
meta.index && (meta.name = meta.index), meta.name = can.core.Split(meta.name||"", "\t .\n").pop()||can.Conf(mdb.NAME) meta.index && (meta.name = meta.index), meta.name = can.core.Split(meta.name||"", "\t .\n").pop()||can.Conf(mdb.NAME)
field = field||can.onappend.field(can, meta.type, meta, target)._target, can.isCmdMode() && can.onmotion.hidden(can, field) field = field||can.onappend.field(can, meta.type, meta, target)._target
var legend = can.page.SelectOne(can, field, html.LEGEND); legend.innerHTML = legend.innerHTML || meta.index var legend = can.page.SelectOne(can, field, html.LEGEND); legend.innerHTML = legend.innerHTML || meta.index
var option = can.page.SelectOne(can, field, html.FORM_OPTION) var option = can.page.SelectOne(can, field, html.FORM_OPTION)
var action = can.page.SelectOne(can, field, html.DIV_ACTION) var action = can.page.SelectOne(can, field, html.DIV_ACTION)
@ -238,8 +238,8 @@ Volcanos(chat.ONAPPEND, {_init: function(can, meta, list, cb, target, field) {
} }
sub.db.hash = can.isCmdMode()? can.misc.SearchHash(can): [] sub.db.hash = can.isCmdMode()? can.misc.SearchHash(can): []
can.page.requireModules(can, can.Conf("modules"), function() { if (sub.Mode() != "result") { can.onmotion.clear(can, output) } can.page.requireModules(can, can.Conf("modules"), function() { if (sub.Mode() != "result") { can.onmotion.clear(can, output) }
can.onexport._output(sub, msg)
can.core.CallFunc([sub, chat.ONIMPORT, chat._INIT], {can: sub, msg: msg, cb: function(msg) { can.core.CallFunc([sub, chat.ONIMPORT, chat._INIT], {can: sub, msg: msg, cb: function(msg) {
can.onmotion.toggle(can, can._target, true)
if (action !== false) { can.onkeymap._build(sub) if (action !== false) { can.onkeymap._build(sub)
can.onmotion.clear(can, can._action), sub.onappend._action(sub, can.Conf(ice.MSG_ACTION)||msg.Option(ice.MSG_ACTION), action||can._action) can.onmotion.clear(can, can._action), sub.onappend._action(sub, can.Conf(ice.MSG_ACTION)||msg.Option(ice.MSG_ACTION), action||can._action)
sub.onappend._status(sub, sub.onexport&&sub.onexport.list||msg.Option(ice.MSG_STATUS)), can.user.isMobile || sub.onappend.tools(sub, msg) sub.onappend._status(sub, sub.onexport&&sub.onexport.list||msg.Option(ice.MSG_STATUS)), can.user.isMobile || sub.onappend.tools(sub, msg)
@ -448,8 +448,10 @@ Volcanos(chat.ONAPPEND, {_init: function(can, meta, list, cb, target, field) {
append(can.page.Append(can, target, [html.LAYOUT])._target, type==FLOW? FLEX: FLOW, item) append(can.page.Append(can, target, [html.LAYOUT])._target, type==FLOW? FLEX: FLOW, item)
} else if (can.base.isObject(item)) { } else if (can.base.isObject(item)) {
if (item.index) { item._index = count++, ui.size[item._index] = item.height||item.width if (item.index) { item._index = count++, ui.size[item._index] = item.height||item.width
can.onmotion.hidden(can, target)
can.onappend.plugin(can, item, function(sub) { can._plugins = (can._plugins||[]).concat([sub]) can.onappend.plugin(can, item, function(sub) { can._plugins = (can._plugins||[]).concat([sub])
item.layout = function(height, width) { sub.onimport.size(sub, height, width) } item.layout = function(height, width) { sub.onimport.size(sub, height, width) }
sub.onexport._output = function() { can.onmotion.toggle(can, target, true) }
}, target, ui[item._index] = can.onappend.field(can, item.type, {index: item.index, name: item.index.split(nfs.PT).pop(), help: item.help}, target)._target) }, target, ui[item._index] = can.onappend.field(can, item.type, {index: item.index, name: item.index.split(nfs.PT).pop(), help: item.help}, target)._target)
} else { can.page.Append(can, target, [item]) } } else { can.page.Append(can, target, [item]) }
} }

View File

@ -1,6 +1,5 @@
(function() { const TABS = "tabs", TABVIEW = "tabview", HORIZON = "horizon", VERTICAL = "vertical", GRID = "grid", FREE = "free", FLOW = "flow", PAGE = "page", CAN_LAYOUT = "can.layout" (function() { const TABS = "tabs", TABVIEW = "tabview", HORIZON = "horizon", VERTICAL = "vertical", GRID = "grid", FREE = "free", FLOW = "flow", PAGE = "page", CAN_LAYOUT = "can.layout"
Volcanos(chat.ONIMPORT, {_init: function(can, msg) { var river = can.Conf(chat.RIVER), storm = can.Conf(chat.STORM), list = can.misc.SearchHash(can) Volcanos(chat.ONIMPORT, {_init: function(can, msg) { var river = can.Conf(chat.RIVER), storm = can.Conf(chat.STORM), list = can.misc.SearchHash(can)
// can.isCmdMode() || can.page.style(can, can._output, "visibility", "hidden")
can.onmotion.clear(can), can.core.Next(msg.Table(), function(item, next) { item.type = chat.PLUGIN, item.mode = can.Mode(); if (item.deleted == ice.TRUE) { return next() } can.onmotion.clear(can), can.core.Next(msg.Table(), function(item, next) { item.type = chat.PLUGIN, item.mode = can.Mode(); if (item.deleted == ice.TRUE) { return next() }
can.onappend.plugin(can, item, function(sub, meta, skip) { can._plugins = (can._plugins||[]).concat([sub]), can.onimport._tabs(can, sub, meta), skip || next() can.onappend.plugin(can, item, function(sub, meta, skip) { can._plugins = (can._plugins||[]).concat([sub]), can.onimport._tabs(can, sub, meta), skip || next()
sub.onaction._close = function() { can.onengine.signal(can, chat.ONACTION_REMOVE, can.request({river: river, storm: storm}, item)), can.page.Remove(can, sub._target) } sub.onaction._close = function() { can.onengine.signal(can, chat.ONACTION_REMOVE, can.request({river: river, storm: storm}, item)), can.page.Remove(can, sub._target) }

View File

@ -195,6 +195,7 @@ Volcanos(chat.ONACTION, {list: [
}) }, }) },
}) })
Volcanos(chat.ONEXPORT, { Volcanos(chat.ONEXPORT, {
_output: function(can, msg) {},
output: function(can, msg) {}, action: function(can, button, data) {}, record: function(can, value, key, data) {}, output: function(can, msg) {}, action: function(can, button, data) {}, record: function(can, value, key, data) {},
title: function(can, title) { can.isCmdMode() && can.user.title(title) }, title: function(can, title) { can.isCmdMode() && can.user.title(title) },
marginTop: function() { return 0 }, marginBottom: function() { return 0 }, marginTop: function() { return 0 }, marginBottom: function() { return 0 },