forked from x/volcanos
opt some
This commit is contained in:
parent
b70e92c19d
commit
a63f1d4dab
1
const.js
1
const.js
@ -362,6 +362,7 @@ var html = {
|
|||||||
FLOAT_HEIGHT: 480, FLOAT_WIDTH: 1200,
|
FLOAT_HEIGHT: 480, FLOAT_WIDTH: 1200,
|
||||||
PLUGIN_PADDING: 0, PLUGIN_MARGIN: 0,
|
PLUGIN_PADDING: 0, PLUGIN_MARGIN: 0,
|
||||||
|
|
||||||
|
IFRAME_HEIGHT: 420,
|
||||||
HEADER_HEIGHT: 48, ACTION_HEIGHT: 32, STATUS_HEIGHT: 32,
|
HEADER_HEIGHT: 48, ACTION_HEIGHT: 32, STATUS_HEIGHT: 32,
|
||||||
QRCODE_HEIGHT: 363, QRCODE_WIDTH: 360,
|
QRCODE_HEIGHT: 363, QRCODE_WIDTH: 360,
|
||||||
CARD_HEIGHT: 160, CARD_WIDTH: 280,
|
CARD_HEIGHT: 160, CARD_WIDTH: 280,
|
||||||
|
@ -253,7 +253,10 @@ Volcanos("misc", {
|
|||||||
Resource: function(can, path, space, serve) { if (!path) { return "" }
|
Resource: function(can, path, space, serve) { if (!path) { return "" }
|
||||||
if (!can.base.beginWith(path, web.HTTP, nfs.PS)) { path = nfs.P+path+(path.indexOf("usr/icons/") == -1? (space? can.core.Split(_version, "&")[0]: _version): "") }
|
if (!can.base.beginWith(path, web.HTTP, nfs.PS)) { path = nfs.P+path+(path.indexOf("usr/icons/") == -1? (space? can.core.Split(_version, "&")[0]: _version): "") }
|
||||||
if (!can.base.beginWith(path, web.HTTP)) { if (serve && serve.indexOf(location.origin) == -1) { var u = can.base.ParseURL(serve); path = u.origin + path } }
|
if (!can.base.beginWith(path, web.HTTP)) { if (serve && serve.indexOf(location.origin) == -1) { var u = can.base.ParseURL(serve); path = u.origin + path } }
|
||||||
if (!space && can.base.beginWith(path, web.HTTP)) { return path }
|
if (!space && can.base.beginWith(path, web.HTTP)) {
|
||||||
|
debugger
|
||||||
|
return location.origin+path
|
||||||
|
}
|
||||||
if (!space && path.indexOf("pod=") > 0) { return path }
|
if (!space && path.indexOf("pod=") > 0) { return path }
|
||||||
if (can.base.beginWith(path, "/") && path.indexOf("pod=") > 0) { return path }
|
if (can.base.beginWith(path, "/") && path.indexOf("pod=") > 0) { return path }
|
||||||
return can.base.MergeURL(path, ice.POD, space||can.ConfSpace()||can.misc.Search(can, ice.POD))
|
return can.base.MergeURL(path, ice.POD, space||can.ConfSpace()||can.misc.Search(can, ice.POD))
|
||||||
|
@ -394,7 +394,7 @@ Volcanos("user", {
|
|||||||
}
|
}
|
||||||
} else if (value.type == mdb.PLUGIN) {
|
} else if (value.type == mdb.PLUGIN) {
|
||||||
_list.push(value.name), list[value.name] = function(target) {
|
_list.push(value.name), list[value.name] = function(target) {
|
||||||
can.onappend.plugin(can, {space: value.space, index: value.index, args: can.core.Split(value.args), height: html.QRCODE_HEIGHT, width: 420, style: html.OUTPUT}, function(sub) {
|
can.onappend.plugin(can, {space: value.space, index: value.index, args: can.core.Split(value.args), height: html.QRCODE_HEIGHT, width: html.IFRAME_HEIGHT, style: html.OUTPUT}, function(sub) {
|
||||||
var run = sub.run; sub.run = function(event, cmds, cb) { var msg = can.request(event, {space: arg[0]}); can.page.exportValue(can, msg), run(event, cmds, cb) }
|
var run = sub.run; sub.run = function(event, cmds, cb) { var msg = can.request(event, {space: arg[0]}); can.page.exportValue(can, msg), run(event, cmds, cb) }
|
||||||
}, ui.output)
|
}, ui.output)
|
||||||
}
|
}
|
||||||
@ -422,7 +422,7 @@ Volcanos("user", {
|
|||||||
]}]), window.parent != window && window.innerHeight < 480 && can.onmotion.hidden(can, ui.output)
|
]}]), window.parent != window && window.innerHeight < 480 && can.onmotion.hidden(can, ui.output)
|
||||||
can.page.style(can, ui._target, {
|
can.page.style(can, ui._target, {
|
||||||
left: (can.page.width()-ui._target.offsetWidth)/2,
|
left: (can.page.width()-ui._target.offsetWidth)/2,
|
||||||
top: can.user.isMobile? 20: can.page.height() < 480? (can.page.height()-ui._target.offsetHeight)/2: (can.page.height()-can.base.Min(ui._target.offsetHeight, 420)-html.HEADER_HEIGHT-html.ACTION_HEIGHT)/4+html.HEADER_HEIGHT,
|
top: can.user.isMobile? 20: can.page.height() < 480? (can.page.height()-ui._target.offsetHeight)/2: (can.page.height()-can.base.Min(ui._target.offsetHeight, html.IFRAME_HEIGHT)-html.HEADER_HEIGHT-html.ACTION_HEIGHT)/4+html.HEADER_HEIGHT,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user