forked from x/volcanos
add some
This commit is contained in:
parent
6fd4389ace
commit
3e53826abf
3
frame.js
3
frame.js
@ -475,8 +475,7 @@ Volcanos(chat.ONAPPEND, {_init: function(can, meta, list, cb, target, field) {
|
||||
can.page.Modify(can, sub._legend, data.index.split(nfs.PT).pop())
|
||||
}, can._output, target)
|
||||
}) } else if (text.indexOf("<iframe") == 0) { can.page.Select(can, code, html.IFRAME, function(target) { var data = target.dataset
|
||||
var height = can.ConfHeight(); can.page.SelectChild(can, can._output, html.TABLE, function(target) { height -= target.offsetHeight })
|
||||
can.page.style(can, target, html.HEIGHT, can.base.Min(height, 420), html.WIDTH, can.ConfWidth())
|
||||
var height = can.base.Max(720, can.ConfHeight()); can.page.style(can, target, html.HEIGHT, height, html.WIDTH, can.ConfWidth())
|
||||
}) } else if (text.indexOf("<svg") > 0) { can.page.Select(can, code, html.SVG, function(target) {
|
||||
can.page.style(can, target, html.MIN_HEIGHT, can.ConfHeight(), html.MIN_WIDTH, can.ConfWidth())
|
||||
}) } else { can.page.Select(can, code, html.INPUT_BUTTON, function(target) {
|
||||
|
@ -130,7 +130,9 @@ Volcanos(chat.ONEXPORT, {width: function(can) { return can._target.offsetWidth }
|
||||
}
|
||||
}) },
|
||||
})
|
||||
Volcanos(chat.ONENGINE, {_engine: function(event, can, msg, panel, cmds, cb) { var list = can.river
|
||||
Volcanos(chat.ONENGINE, {_engine: function(event, can, msg, panel, cmds, cb) {
|
||||
if (typeof can.river == code.FUNCTION) { can.river = can.river(can) }
|
||||
var list = can.river
|
||||
cmds.length == 0 && can.core.ItemOrder(list, mdb.ORDER, function(key, value) {
|
||||
if (can.user.info.userrole == aaa.ROOT || can.base.isIn(value.type||"", "", aaa.VOID, can.user.info.userrole)) {
|
||||
can.core.Item(value.storm).length > 0 && msg.Push({hash: key, name: can.user.isEnglish(can)? key: value.name, icon: value.icon||""})
|
||||
|
@ -1,6 +1,7 @@
|
||||
Volcanos(chat.ONIMPORT, {_init: function(can, msg) { can.db.current = msg.TableDetail()
|
||||
can.ui.target = can.page.Appends(can, can._output, [{type: html.IFRAME, src: can.db.current.link, height: can.ConfHeight(), width: can.ConfWidth()}])._target
|
||||
can.page.style(can, can._output, "overflow-y", html.HIDDEN)
|
||||
can.sup.onexport.link = function() { return can.db.current.link }
|
||||
},
|
||||
layout: function(can) {
|
||||
var item = can.db.current; can.sup.onexport.title(can, item.name||item.link.split(mdb.QS)[0])
|
||||
|
@ -23,10 +23,12 @@ Volcanos(chat.ONIMPORT, {
|
||||
},
|
||||
_field: function(can, msg, cb) { var height = can.base.Max(html.STORY_HEIGHT, can.ConfHeight()), width = can.ConfWidth()
|
||||
msg.Table(function(item) { can.onappend._plugin(can, item, {_space: can.ConfSpace(), index: item.index, args: can.base.Obj(item.args||item.arg, []), height: height, width: width}, function(sub) {
|
||||
if (can.base.isIn(sub.ConfIndex(), web.CODE_VIMER, web.CHAT_MACOS_DESKTOP, web.WIKI_PORTAL)) { height = can.base.Max(can.onexport.outputHeight(can), can.ConfHeight()) }
|
||||
if (can.base.isIn(sub.ConfIndex(),
|
||||
web.WIKI_PORTAL, web.CHAT_IFRAME, web.CHAT_MACOS_DESKTOP, web.CODE_VIMER,
|
||||
)) { height = can.base.Max(can.base.Min(can.onexport.outputHeight(can), 640), can.ConfHeight()) }
|
||||
can.onmotion.delay(can, function() { can.onmotion.scrollIntoView(can, sub._target) }, 300)
|
||||
sub.run = function(event, cmds, cb) { var index = msg.Option(ice.MSG_INDEX)
|
||||
can.run(event, (!index || index == can._index || index.indexOf("can.") == 0? msg[ice.MSG_PREFIX]||[]: [ctx.RUN, index]).concat(cmds), cb, true)
|
||||
can.run(event, (msg[ice.MSG_PREFIX]? msg[ice.MSG_PREFIX]: index? [ctx.RUN, index]: []).concat(cmds), cb, true)
|
||||
}, can.page.ClassList.has(can, sub._target, html.FLOAT)? can.onmotion.float(sub): sub.onimport.size(sub, height, width, true), cb && cb(sub)
|
||||
}) })
|
||||
},
|
||||
|
@ -8,12 +8,12 @@ Volcanos(chat.ONIMPORT, {_init: function(can, msg, target) {
|
||||
can.onappend.table(can, msg, null, target), can.onappend.board(can, msg, target), can.onmotion.story.auto(can, target)
|
||||
}
|
||||
},
|
||||
card: function(can, msg, target) { can.sup.onexport.outputMargin = function() { return 211 }
|
||||
card: function(can, msg, target) { can.sup.onexport.outputMargin = function() { return 240 }
|
||||
can.page.Appends(can, target||can._output, msg.Table(function(value) { value.icon = value.icon||value.image
|
||||
return {view: [[html.ITEM, value.status]], list: [
|
||||
{view: [wiki.TITLE, html.DIV], list: [value.icon && {img: can.misc.Resource(can, value.icon, value.name)}, {text: value.name}]},
|
||||
{view: [wiki.CONTENT, html.DIV, value.text]},
|
||||
{view: html.ACTION, inner: value.action, _init: function(target) { can.onappend.mores(can, target, value, html.TABLE_BUTTON) }},
|
||||
{view: html.ACTION, inner: value.action, _init: function(target) { can.onappend.mores(can, target, value, 5) }},
|
||||
]}
|
||||
})), can.onimport.layout = function() { can.onlayout.expand(can, can._output, 320) }, can.onappend.scroll(can, can._output)
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user