mirror of
https://shylinux.com/x/volcanos
synced 2025-04-25 16:58:06 +08:00
opt some
This commit is contained in:
parent
ff625f8782
commit
2dd2a70384
@ -236,10 +236,17 @@ Volcanos(chat.ONACTION, {help: "交互操作", _init: function(can, cb, target)
|
||||
})
|
||||
Volcanos(chat.ONLAYOUT, {help: "导出数据",
|
||||
grid: function(can, silent) {
|
||||
var ACTION_LAYOUT_FMT = " fieldset.Action.grid>div.output fieldset.plugin { width:_width; height:_height; } fieldset.Action.grid>div.output fieldset.plugin>div.output { width:_width; height:_height; } "
|
||||
var ACTION_LAYOUT_FMT = " fieldset.Action.grid>div.output fieldset.plugin { width:_width; height:_height; } "
|
||||
can.user.input(event, can, [{name: "m", value: 2}, {name: "n", value: 2}], function(data) {
|
||||
can.getActionSize(function(height, width) { var m = parseInt(data.m)||2, n = parseInt(data.n)||2
|
||||
can.page.css(can.base.replaceAll(ACTION_LAYOUT_FMT, "_width", (width-(4*m+1)*html.PLUGIN_MARGIN)/m+"px", "_height", (height-(4*n+1)*html.PLUGIN_MARGIN)/n+"px"))
|
||||
var h = (height-(4*n+1)*html.PLUGIN_MARGIN)/n, w = (width-(4*m+1)*html.PLUGIN_MARGIN)/m
|
||||
can.page.css(can.base.replaceAll(ACTION_LAYOUT_FMT, "_height", h+"px", "_width", w+"px"))
|
||||
can.core.List(can._plugins, function(sub) {
|
||||
can.page.style(can, sub._output, html.HEIGHT, sub.ConfHeight(h-2*html.ACTION_HEIGHT-3*html.PLUGIN_MARGIN), html.WIDTH, sub.ConfWidth(w))
|
||||
sub.onaction["刷新数据"]({}, sub)
|
||||
can.ConfHeight(sub.ConfHeight())
|
||||
can.ConfWidth(sub.ConfWidth())
|
||||
})
|
||||
})
|
||||
}, silent)
|
||||
},
|
||||
|
@ -2,7 +2,7 @@ Volcanos(chat.ONIMPORT, {help: "导入数据", _init: function(can, msg, cb) {
|
||||
can.current = msg.TableDetail(), can.onimport.layout(can), can.base.isFunc(cb) && cb(msg)
|
||||
},
|
||||
layout: function(can) { var item = can.current; can.onmotion.clear(can)
|
||||
can.page.Append(can, can._output, [{type: html.IFRAME, src: item.link, height: can.ConfHeight()-4, width: can.ConfWidth(), style: {border: 0}}])
|
||||
can.page.Append(can, can._output, [{type: html.IFRAME, src: item.link, height: can.ConfHeight(), width: can.ConfWidth(), style: {border: 0}}])
|
||||
},
|
||||
})
|
||||
Volcanos(chat.ONACTION, {help: "操作数据",
|
||||
|
Loading…
x
Reference in New Issue
Block a user