mirror of
https://shylinux.com/x/volcanos
synced 2025-04-25 08:48:06 +08:00
opt some
This commit is contained in:
parent
46b73fe181
commit
b64e0bfa8a
12
frame.js
12
frame.js
@ -694,12 +694,14 @@ Volcanos(chat.ONMOTION, {help: "动态特效", _init: function(can, target) {
|
||||
}
|
||||
return status
|
||||
},
|
||||
select: function(can, target, name, which) {
|
||||
var old = can.page.Select(can, target, name, function(item, index) {
|
||||
if (can.page.ClassList.has(can, item, html.SELECT)) { return index }
|
||||
select: function(can, target, name, which, cb) {
|
||||
var old = can.page.Select(can, target, name, function(target, index) {
|
||||
if (can.page.ClassList.has(can, target, html.SELECT)) { return index }
|
||||
})[0]
|
||||
can.page.Select(can, target, name, function(item, index) {
|
||||
can.page.ClassList.set(can, item, html.SELECT, item == which || which == index)
|
||||
can.page.Select(can, target, name, function(target, index) {
|
||||
if (can.page.ClassList.set(can, target, html.SELECT, target == which || which == index)) {
|
||||
can.base.isFunc(cb) && cb(target)
|
||||
}
|
||||
})
|
||||
return old
|
||||
},
|
||||
|
@ -265,8 +265,7 @@ Volcanos("user", {help: "用户操作", info: {}, agent: {
|
||||
},
|
||||
|
||||
input: function(event, can, form, cb, button) { if (!form || form.length == 0) { return cb() }
|
||||
var msg = can.request(event); event = event._event||event
|
||||
var need = {}
|
||||
var msg = can.request(event); event = event._event||event; var need = {}
|
||||
var ui = can.page.Append(can, document.body, [{view: [html.INPUT], style: {left: 0, top: 0}, list: [
|
||||
{view: "content", list: [{view: [html.OPTION, html.TABLE], list: can.core.List(form, function(item) {
|
||||
item = can.base.isString(item)? {type: html.TEXT, name: item}: item.length > 0? {type: html.SELECT, name: item[0], values: item.slice(1)}: item
|
||||
|
@ -11,6 +11,7 @@ fieldset.Action.tabs>div.output>fieldset.plugin { display:none; }
|
||||
fieldset.Action.tabs>div.output>fieldset.plugin.select { display:block; }
|
||||
|
||||
fieldset.Action.tabview>div.output { overflow:hidden; }
|
||||
fieldset.Action.tabview>div.output fieldset.plugin.iframe div.output{ overflow:hidden; }
|
||||
fieldset.Action.tabview>div.output>fieldset>legend { display:none; }
|
||||
fieldset.Action.tabview>div.output>fieldset.plugin { display:none; overflow:auto; margin:0; padding:0; }
|
||||
fieldset.Action.tabview>div.output>fieldset.plugin.select { display:block; }
|
||||
|
@ -8,7 +8,7 @@ Volcanos(chat.ONIMPORT, {help: "导入数据", _init: function(can, msg) {
|
||||
})
|
||||
})
|
||||
},
|
||||
_plugin: function(can, river, storm, sub, meta) { sub._target._meta = meta
|
||||
_plugin: function(can, river, storm, sub, meta) { sub._target._meta = meta, sub._target._plugin = sub
|
||||
meta.id && (sub._option.dataset = sub._option.dataset||{}, sub._option.dataset.id = meta.id)
|
||||
can.page.style(can, sub._output, html.MAX_WIDTH, can.ConfWidth())
|
||||
|
||||
@ -209,7 +209,6 @@ Volcanos(chat.ONACTION, {help: "操作数据", _init: function(can, cb, target)
|
||||
can.core.Next(can._plugins, function(sub, next) { can.onmotion.delay(can, function() {
|
||||
sub.onaction._resize(sub, button == "" || button == ice.AUTO, can.ConfHeight(), can.ConfWidth()), next()
|
||||
if (button == "" || button == ice.AUTO) { can.page.style(can, sub._output, html.MAX_HEIGHT, "") }
|
||||
sub._delay_refresh = true
|
||||
}, 10) })
|
||||
},
|
||||
help: function(can, button) { can.user.open("/help/"+button+".shy") },
|
||||
@ -222,12 +221,20 @@ Volcanos(chat.ONLAYOUT, {help: "界面布局",
|
||||
if (can.page.Select(can, can._output, "fieldset.plugin.select").length > 0) { return }
|
||||
can.onmotion.select(can, can._action, html.DIV_TABS, 0), can.onmotion.select(can, can._output, html.FIELDSET_PLUGIN, 0)
|
||||
},
|
||||
tabview: function(can) {
|
||||
can.onmotion.toggle(can, can._header_tabs, true)
|
||||
tabview: function(can) { can.onmotion.toggle(can, can._header_tabs, true)
|
||||
can.onmotion.hidden(can, can._root.River._target), can.onmotion.hidden(can, can._root.Footer._target), can.onlayout._init(can)
|
||||
can.getActionSize(function(height, width) { can.ConfHeight(height-html.ACTION_HEIGHT), can.ConfWidth(width) })
|
||||
if (can.page.Select(can, can._output, "fieldset.plugin.select").length > 0) { return }
|
||||
can.onmotion.select(can, can._header_tabs, html.DIV_TABS, 0), can.onmotion.select(can, can._output, html.FIELDSET_PLUGIN, 0)
|
||||
|
||||
can.core.List(can._plugins, function(sub) { sub._delay_refresh = true })
|
||||
if (can.page.Select(can, can._output, "fieldset.plugin.select", function(target) {
|
||||
target._plugin._header_tabs.click()
|
||||
return target
|
||||
}).length == 0) {
|
||||
can.onmotion.select(can, can._header_tabs, html.DIV_TABS, 0, function(target) {
|
||||
target.click()
|
||||
}), can.onmotion.select(can, can._output, html.FIELDSET_PLUGIN, 0)
|
||||
}
|
||||
return true
|
||||
},
|
||||
horizon: function(can) {
|
||||
can.onmotion.hidden(can, can._root.River._target), can.onmotion.hidden(can, can._root.Footer._target), can.onlayout._init(can)
|
||||
|
@ -314,6 +314,8 @@ Volcanos(chat.ONACTION, {help: "控件交互", _trans: {link: "链接", width: "
|
||||
})
|
||||
},
|
||||
"打开": function(event, can) {
|
||||
can.request()
|
||||
can.request(event, {path: can.sup.paths.join(",")})
|
||||
can.user.input(event, can, [nfs.FILE], function(list) { can.onimport.tabview(can, can.Option(nfs.PATH), list[0]) })
|
||||
},
|
||||
show: function(event, can) { can.request(event, {_toast: "渲染中..."})
|
||||
|
Loading…
x
Reference in New Issue
Block a user