mirror of
https://shylinux.com/x/volcanos
synced 2025-04-25 16:58:06 +08:00
opt portal
This commit is contained in:
parent
98be025830
commit
c846b98501
4
frame.js
4
frame.js
@ -117,7 +117,7 @@ Volcanos(chat.ONAPPEND, {_init: function(can, meta, list, cb, target, field) {
|
||||
var action = can.page.SelectOne(can, field, html.DIV_ACTION)
|
||||
var output = can.page.SelectOne(can, field, html.DIV_OUTPUT)
|
||||
var status = can.page.SelectOne(can, field, html.DIV_STATUS)
|
||||
can.base.isIn(meta.index, web.WIKI_PORTAL) && can.onappend.style(can, html.OUTPUT, field)
|
||||
can.user.mod.isCmd && can.base.isIn(meta.index, web.WIKI_PORTAL) && can.onappend.style(can, html.OUTPUT, field)
|
||||
var sub = Volcanos(meta.name, {_root: can._root||can, _follow: can.core.Keys(can._follow, meta.name), _target: field,
|
||||
_legend: legend, _option: option, _action: action, _output: output, _status: status, _history: [],
|
||||
Status: function(key, value) { if (can.base.isObject(key)) { return can.core.Item(key, sub.Status), key }
|
||||
@ -450,7 +450,7 @@ Volcanos(chat.ONAPPEND, {_init: function(can, meta, list, cb, target, field) {
|
||||
var defer = [], content_height, content_width; function layout(type, list, height, width) { var _width = width, _height = height; can.core.List(list, function(item) {
|
||||
if (can.base.isArray(item)) { return } if (can.base.isObject(item)) { var meta = item; item = item._index }
|
||||
var target = ui[item]; if (!can.page.isDisplay(target)) { return }
|
||||
if (item == html.CONTENT) { return defer.push(function() { can.page.style(can, target, html.HEIGHT, content_height = height, html.WIDTH, content_width = width) }) }
|
||||
if (item == html.CONTENT || item == "main") { return defer.push(function() { can.page.style(can, target, html.HEIGHT, content_height = height, html.WIDTH, content_width = width) }) }
|
||||
if (type == FLOW) { var h = calc(item, target.offsetHeight, height)
|
||||
if (can.base.isObject(meta) && meta.layout) { meta.layout(h, width) }
|
||||
can.page.style(can, target, html.WIDTH, width), height -= h
|
||||
|
@ -19,7 +19,7 @@ Volcanos(chat.ONIMPORT, {_init: function(can, msg, target) {
|
||||
// window.parent == window? can.onlayout.background(can, can.onexport.background(can)): can.page.style(can, document.body, html.BACKGROUND_COLOR, "transparent")
|
||||
},
|
||||
_search: function(can, msg, target) {
|
||||
can._search = can.onappend.input(can, {type: html.TEXT, icon: "bi bi-search", name: mdb.SEARCH, onkeydown: function(event) { can.onkeymap.input(event, can)
|
||||
can._search = can.onappend.input(can, {type: html.TEXT, icon: "bi bi-search", name: mdb.SEARCH, value: can.misc.Search(can, "_search"), onkeydown: function(event) { can.onkeymap.input(event, can)
|
||||
event.key == lang.ENTER && can.onengine.signal(can, chat.ONOPENSEARCH, can.request(event, {type: mdb.FOREACH, word: event.target.value||""}))
|
||||
}}, "", target, [chat.TITLE])
|
||||
can.onimport.menu(can, mdb.SEARCH, function() { can.onengine.signal(can, chat.ONOPENSEARCH, can.request(event, {type: mdb.FOREACH, word: can._search.value||""})) })
|
||||
|
@ -30,6 +30,7 @@ Volcanos(chat.ONACTION, {_init: function(can) { can.onmotion.hidden(can) }, list
|
||||
} if (event.ctrlKey) { return event.key == "0"? can.onaction.clear(event, can): can.onkeymap.selectCtrlN(event, can, can.ui.content, [html.TBODY, html.TR], function(target) { target.firstChild.click() }) }
|
||||
event.key.length == 1 && can.onmotion.delayOnce(can, function() { can.onmotion.tableFilter(can, can.ui.content, event.target.value) }, 100, can._delay_filter = can._delay_filter||[])
|
||||
}}))
|
||||
var key = can.misc.Search(can, "_search"); key && can.onmotion.delay(can, function() { can.onaction.onopensearch(can, can.request({}), "*", key) }, 1000)
|
||||
},
|
||||
onopensearch: function(can, msg, type, word) { can.onimport.select(can, msg, [type||mdb.FOREACH, word||""]) },
|
||||
close: function(event, can) { can.onmotion.hidden(can) },
|
||||
|
Loading…
x
Reference in New Issue
Block a user