forked from x/icebergs
add some
This commit is contained in:
parent
e220f82568
commit
b98b3052d4
@ -78,7 +78,6 @@ Volcanos(chat.ONIMPORT, {
|
|||||||
if (can.ConfHeight() > 800) { item.height = can.base.Min(can.ConfHeight()-200, 320, 800), item.top = 50 }
|
if (can.ConfHeight() > 800) { item.height = can.base.Min(can.ConfHeight()-200, 320, 800), item.top = 50 }
|
||||||
if (can.user.isMobile) { item.height = can.ConfHeight()-125, item.top = 25, item.width = can.ConfWidth(), item.left = 0 }
|
if (can.user.isMobile) { item.height = can.ConfHeight()-125, item.top = 25, item.width = can.ConfWidth(), item.left = 0 }
|
||||||
item.height = can.base.Max(html.DESKTOP_HEIGHT, item.height), item.width = can.base.Max(html.DESKTOP_WIDTH, item.width)
|
item.height = can.base.Max(html.DESKTOP_HEIGHT, item.height), item.width = can.base.Max(html.DESKTOP_WIDTH, item.width)
|
||||||
// if (can.base.isIn(item.index, web.CODE_VIMER)) { item.width = can.base.Max(1600, can.ConfWidth()), item.left = (can.ConfWidth()-item.width)/2 }
|
|
||||||
item.type = html.PLUGIN, item.style = {left: item.left, top: item.top, height: item.height, width: item.width}
|
item.type = html.PLUGIN, item.style = {left: item.left, top: item.top, height: item.height, width: item.width}
|
||||||
can.onappend.plugin(can, item, function(sub) { can.onappend.style(can, html.FLOAT, sub._target), can.ondetail.select(can, sub._target)
|
can.onappend.plugin(can, item, function(sub) { can.onappend.style(can, html.FLOAT, sub._target), can.ondetail.select(can, sub._target)
|
||||||
can.page.style(can, sub._target, html.HEIGHT, item.height, html.WIDTH, item.width)
|
can.page.style(can, sub._target, html.HEIGHT, item.height, html.WIDTH, item.width)
|
||||||
@ -105,9 +104,10 @@ Volcanos(chat.ONIMPORT, {
|
|||||||
can.onmotion.move(can, sub._target, {top: item.top, left: item.left})
|
can.onmotion.move(can, sub._target, {top: item.top, left: item.left})
|
||||||
sub.Conf("style.left", ""), sub.Conf("style.top", "")
|
sub.Conf("style.left", ""), sub.Conf("style.top", "")
|
||||||
sub.onmotion.resize(can, sub._target, function(height, width) {
|
sub.onmotion.resize(can, sub._target, function(height, width) {
|
||||||
|
can.page.style(sub, sub._target, html.HEIGHT, height, html.WIDTH, width)
|
||||||
sub.onimport.size(sub, item.height = height, item.width = width, false)
|
sub.onimport.size(sub, item.height = height, item.width = width, false)
|
||||||
sub._target._meta.height = height, sub._target._meta.width = width, can.onexport.tabs(can)
|
sub._target._meta.height = height, sub._target._meta.width = width, can.onexport.tabs(can)
|
||||||
}, 25)
|
}, 25, 0, can.ui.desktop)
|
||||||
sub._target.onclick = function(event) { can.ondetail.select(can, sub._target) }
|
sub._target.onclick = function(event) { can.ondetail.select(can, sub._target) }
|
||||||
sub._target._meta = {index: sub.ConfIndex(), args: sub.Conf(ctx.ARGS)}, can.onexport.tabs(can)
|
sub._target._meta = {index: sub.ConfIndex(), args: sub.Conf(ctx.ARGS)}, can.onexport.tabs(can)
|
||||||
cb && cb(sub)
|
cb && cb(sub)
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
Volcanos(chat.ONIMPORT, {
|
Volcanos(chat.ONIMPORT, {
|
||||||
_init: function(can, msg, cb) {
|
_init: function(can, msg, cb) { can.require(["/plugin/local/wiki/word.js"])
|
||||||
can.require(["/plugin/local/wiki/word.js"]), can.isCmdMode() && can.onappend.style(can, html.OUTPUT)
|
|
||||||
var p = "/cmd/"+web.PORTAL; can.db.prefix = location.pathname.indexOf(p) > -1? location.pathname.split(p)[0]+p: nfs.WIKI_PORTAL
|
var p = "/cmd/"+web.PORTAL; can.db.prefix = location.pathname.indexOf(p) > -1? location.pathname.split(p)[0]+p: nfs.WIKI_PORTAL
|
||||||
var p = "/c/"+web.PORTAL; can.db.prefix = location.pathname.indexOf(p) > -1? location.pathname.split(p)[0]+p: nfs.WIKI_PORTAL
|
var p = "/c/"+web.PORTAL; can.db.prefix = location.pathname.indexOf(p) > -1? location.pathname.split(p)[0]+p: nfs.WIKI_PORTAL
|
||||||
can.db.current = can.isCmdMode()? can.base.trimPrefix(location.pathname, can.db.prefix+nfs.PS, can.db.prefix): can.Option(nfs.PATH)
|
can.db.current = can.isCmdMode()? can.base.trimPrefix(location.pathname, can.db.prefix+nfs.PS, can.db.prefix): can.Option(nfs.PATH)
|
||||||
@ -54,13 +53,12 @@ Volcanos(chat.ONIMPORT, {
|
|||||||
title: function(can, meta, target) { can.isCmdMode() && can.page.tagis(target, html.H1) && can.onexport && can.onexport.title(can, meta.text) },
|
title: function(can, meta, target) { can.isCmdMode() && can.page.tagis(target, html.H1) && can.onexport && can.onexport.title(can, meta.text) },
|
||||||
button: function(can, meta, target) { var item = can.base.Obj(meta.meta); target.onclick = function(event) { can.onaction.route(event, can, item.route) } },
|
button: function(can, meta, target) { var item = can.base.Obj(meta.meta); target.onclick = function(event) { can.onaction.route(event, can, item.route) } },
|
||||||
layout: function(can, height, width) { if (!can.ui.layout || !can.ui.main) { return }
|
layout: function(can, height, width) { if (!can.ui.layout || !can.ui.main) { return }
|
||||||
can.ui.layout(height, width), can.ConfHeight(can.ui.main.offsetHeight), can.ConfWidth(can.ui.main.offsetWidth)
|
can.ui.layout(height, width), can.ConfWidth(can.ui.main.offsetWidth), padding = can.Conf(html.PADDING)
|
||||||
if (can.user.isMobile && can.isCmdMode()) {
|
if (can.user.isMobile && can.isCmdMode()) {
|
||||||
can.page.style(can, can.ui.nav, html.HEIGHT, "", html.WIDTH, can.page.width())
|
can.page.style(can, can.ui.nav, html.HEIGHT, "", html.WIDTH, can.page.width())
|
||||||
can.page.style(can, can.ui.main, html.HEIGHT, "", html.WIDTH, can.page.width())
|
can.page.style(can, can.ui.main, html.HEIGHT, "", html.WIDTH, can.page.width())
|
||||||
}
|
}
|
||||||
padding = can.Conf(html.PADDING)
|
can.core.List(can._plugins, function(sub) { sub.onimport.size(sub, can.base.Min(html.FLOAT_HEIGHT, can.ConfHeight()/2, can.ConfHeight()), sub.Conf("_width")||(can.ConfWidth()-2*padding), true) })
|
||||||
can.core.List(can._plugins, function(sub) { sub.onimport.size(sub, can.base.Min(can.ConfHeight()/2, 300, 600), sub.Conf("_width")||(can.ConfWidth()-2*padding), true) })
|
|
||||||
},
|
},
|
||||||
}, [""])
|
}, [""])
|
||||||
Volcanos(chat.ONACTION, {
|
Volcanos(chat.ONACTION, {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user