mirror of
https://shylinux.com/x/volcanos
synced 2025-04-26 01:04:06 +08:00
opt inner.js
This commit is contained in:
parent
f7090d6ba2
commit
7692d4069f
@ -360,6 +360,14 @@ Volcanos("page", {help: "用户界面", ClassList: {
|
|||||||
return input
|
return input
|
||||||
},
|
},
|
||||||
|
|
||||||
|
styleHeight: function(can, target, value) {
|
||||||
|
can.page.style(can, target, html.HEIGHT, value)
|
||||||
|
return target.offsetHeight
|
||||||
|
},
|
||||||
|
styleWidth: function(can, target, value) {
|
||||||
|
can.page.style(can, target, html.WIDTH, value)
|
||||||
|
return target.offsetWidth
|
||||||
|
},
|
||||||
style: function(can, target, style) { var value = {}
|
style: function(can, target, style) { var value = {}
|
||||||
for (var i = 2; i < arguments.length; i += 2) {
|
for (var i = 2; i < arguments.length; i += 2) {
|
||||||
if (typeof arguments[i] == lang.OBJECT) {
|
if (typeof arguments[i] == lang.OBJECT) {
|
||||||
|
@ -1,15 +1,3 @@
|
|||||||
fieldset.inner.full>div.legend {
|
|
||||||
display:none;
|
|
||||||
}
|
|
||||||
fieldset.inner.full>div.action {
|
|
||||||
display:none;
|
|
||||||
}
|
|
||||||
fieldset.inner.full>form.option {
|
|
||||||
display:none;
|
|
||||||
}
|
|
||||||
fieldset.inner.full>div.status {
|
|
||||||
display:none;
|
|
||||||
}
|
|
||||||
fieldset.inner>div.action {
|
fieldset.inner>div.action {
|
||||||
float:none; display:block;
|
float:none; display:block;
|
||||||
height:26px; overflow:auto;
|
height:26px; overflow:auto;
|
||||||
@ -173,6 +161,28 @@ fieldset.inner>div.status legend:hover {
|
|||||||
background:green;
|
background:green;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fieldset.inner.full>div.legend {
|
||||||
|
display:none;
|
||||||
|
}
|
||||||
|
fieldset.inner.full>div.action {
|
||||||
|
display:none;
|
||||||
|
}
|
||||||
|
fieldset.inner.full>form.option {
|
||||||
|
display:none;
|
||||||
|
}
|
||||||
|
fieldset.inner.full>div.status {
|
||||||
|
display:none;
|
||||||
|
}
|
||||||
|
fieldset.inner.full>div.status {
|
||||||
|
display:none;
|
||||||
|
}
|
||||||
|
fieldset.inner.full>div.output div.profile>div.action {
|
||||||
|
display:none;
|
||||||
|
}
|
||||||
|
fieldset.inner.full>div.output div.display>div.action {
|
||||||
|
display:none;
|
||||||
|
}
|
||||||
|
|
||||||
body.white fieldset.inner>div.output div.project {
|
body.white fieldset.inner>div.output div.project {
|
||||||
color:#a2dad2;
|
color:#a2dad2;
|
||||||
}
|
}
|
||||||
|
@ -88,19 +88,21 @@ Volcanos("onimport", {help: "导入数据", _init: function(can, msg, cb, target
|
|||||||
line == ctx.INDEX? show(can.request({}, {index: file, line: line})): can.run({}, [path, file], show, true)
|
line == ctx.INDEX? show(can.request({}, {index: file, line: line})): can.run({}, [path, file], show, true)
|
||||||
},
|
},
|
||||||
profile: function(can, msg) {
|
profile: function(can, msg) {
|
||||||
if (msg) {
|
if (msg) { can.onmotion.clear(can, can.ui.profile_output)
|
||||||
// can.onappend.table(can, msg, null, can.ui.profile_output)
|
// can.onappend.table(can, msg, null, can.ui.profile_output)
|
||||||
can.onappend.board(can, msg.Result(), can.ui.profile_output)
|
can.onappend.board(can, msg.Result(), can.ui.profile_output)
|
||||||
|
can.user.toastSuccess(can)
|
||||||
}
|
}
|
||||||
can.page.style(can, can.ui.profile_output, html.WIDTH, (can.ConfWidth()-can.ui.project.offsetWidth)/2)
|
can.page.styleWidth(can, can.ui.profile_output, (can.ConfWidth()-can.ui.project.offsetWidth)/2)
|
||||||
can.onmotion.hidden(can, can.ui.profile, true), can.onimport.layout(can)
|
can.onmotion.hidden(can, can.ui.profile, true), can.onimport.layout(can)
|
||||||
},
|
},
|
||||||
display: function(can, msg) {
|
display: function(can, msg) {
|
||||||
if (msg) {
|
if (msg) { can.onmotion.clear(can, can.ui.display_output)
|
||||||
// can.onappend.table(can, msg, null, can.ui.display_output)
|
// can.onappend.table(can, msg, null, can.ui.display_output)
|
||||||
can.onappend.board(can, msg.Result(), can.ui.display_output)
|
can.onappend.board(can, msg.Result(), can.ui.display_output)
|
||||||
|
can.user.toastSuccess(can)
|
||||||
}
|
}
|
||||||
can.page.style(can, can.ui.display_output, html.HEIGHT, can.ConfHeight()/4)
|
can.page.style(can, can.ui.display_output, html.MAX_HEIGHT, can.ConfHeight()/4)
|
||||||
can.onmotion.hidden(can, can.ui.display, true), can.onimport.layout(can)
|
can.onmotion.hidden(can, can.ui.display, true), can.onimport.layout(can)
|
||||||
},
|
},
|
||||||
toolkit: function(can, meta, cb) {
|
toolkit: function(can, meta, cb) {
|
||||||
@ -134,13 +136,17 @@ Volcanos("onimport", {help: "导入数据", _init: function(can, msg, cb, target
|
|||||||
layout: function(can) { var height = can.ConfHeight(), width = can.ConfWidth()
|
layout: function(can) { var height = can.ConfHeight(), width = can.ConfWidth()
|
||||||
can.page.style(can, can.ui.content, can.user.mod.isCmd? html.HEIGHT: html.MAX_HEIGHT, height)
|
can.page.style(can, can.ui.content, can.user.mod.isCmd? html.HEIGHT: html.MAX_HEIGHT, height)
|
||||||
if (can.ui.project.style.display != html.NONE) {
|
if (can.ui.project.style.display != html.NONE) {
|
||||||
can.page.style(can, can.ui.project, html.HEIGHT, can.ui.content.offsetHeight)
|
can.page.styleHeight(can, can.ui.project, can.ui.content.offsetHeight)
|
||||||
}
|
}
|
||||||
if (can.user.mod.isCmd) {
|
if (can.user.mod.isCmd) {
|
||||||
can.page.style(can, can.ui.content, html.HEIGHT, (can.ui.project.offsetHeight||height)-can.ui.display.offsetHeight)
|
can.page.styleHeight(can, can.ui.content, (can.ui.project.offsetHeight||height)-can.ui.display.offsetHeight)
|
||||||
|
}
|
||||||
|
can.page.styleWidth(can, can.ui.content, width-can.ui.project.offsetWidth-can.ui.profile.offsetWidth-25)
|
||||||
|
if (can.page.ClassList.has(can, can._fields, "full")) {
|
||||||
|
can.page.styleHeight(can, can.ui.profile_output, can.ui.content.offsetHeight)
|
||||||
|
} else {
|
||||||
|
can.page.styleHeight(can, can.ui.profile_output, can.ui.content.offsetHeight-html.ACTION_HEIGHT)
|
||||||
}
|
}
|
||||||
can.page.style(can, can.ui.content, html.WIDTH, width-can.ui.project.offsetWidth-can.ui.profile.offsetWidth-25)
|
|
||||||
can.page.style(can, can.ui.profile_output, html.HEIGHT, can.ui.content.offsetHeight-html.ACTION_HEIGHT)
|
|
||||||
},
|
},
|
||||||
exts: function(can, url, cb) {
|
exts: function(can, url, cb) {
|
||||||
can.require([url], function() {}, function(can, name, sub) { sub._init(can, can.base.ParseURL(sub._path), function(sub) {
|
can.require([url], function() {}, function(can, name, sub) { sub._init(can, can.base.ParseURL(sub._path), function(sub) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user