mirror of
https://shylinux.com/x/volcanos
synced 2025-04-26 01:04:06 +08:00
opt css
This commit is contained in:
parent
69e05ce1ab
commit
aaf6925782
5
frame.js
5
frame.js
@ -517,10 +517,11 @@ Volcanos("onlayout", {help: "页面布局", list: [], _init: function(can, targe
|
|||||||
})
|
})
|
||||||
|
|
||||||
can.page.Select(can, target, html.FIELDSET_LEFT, function(field, index) {
|
can.page.Select(can, target, html.FIELDSET_LEFT, function(field, index) {
|
||||||
|
var offset = can.user.isMobile? 100: 0
|
||||||
can.user.isMobile || (width -= field.offsetWidth)
|
can.user.isMobile || (width -= field.offsetWidth)
|
||||||
can.page.styleHeight(can, field, height)
|
can.page.styleHeight(can, field, height-offset)
|
||||||
can.page.Select(can, target, [[html.FIELDSET_LEFT, html.DIV_OUTPUT]], function(output) {
|
can.page.Select(can, target, [[html.FIELDSET_LEFT, html.DIV_OUTPUT]], function(output) {
|
||||||
can.page.styleHeight(can, output, height-html.ACTION_HEIGHT-1)
|
can.page.styleHeight(can, output, height-html.ACTION_HEIGHT-1-offset)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ div.code { background-color:#343a3445; color:white; padding:10px; border:solid 3
|
|||||||
div.story[data-type=spark] { background-color:#2169a9a6; color:white; padding:4px 10px; border-left:solid 4px blue; margin:10px 0px; }
|
div.story[data-type=spark] { background-color:#2169a9a6; color:white; padding:4px 10px; border-left:solid 4px blue; margin:10px 0px; }
|
||||||
|
|
||||||
form.option>div.item { margin-right:3px; }
|
form.option>div.item { margin-right:3px; }
|
||||||
form.option>div.item.select { background-color:none; }
|
form.option>div.item.select { background-color:#0000; }
|
||||||
form.option>div.item input.args.char { width:20px; }
|
form.option>div.item input.args.char { width:20px; }
|
||||||
form.option>div.item input.args.tiny { width:40px; }
|
form.option>div.item input.args.tiny { width:40px; }
|
||||||
form.option>div.item input.args.long { width:240px; }
|
form.option>div.item input.args.long { width:240px; }
|
||||||
@ -137,10 +137,14 @@ body.print fieldset.Header, body.print fieldset.River, body.print fieldset.Actio
|
|||||||
body.print fieldset.River>div.output div.item.select { background-color:white; border:solid 2px red; }
|
body.print fieldset.River>div.output div.item.select { background-color:white; border:solid 2px red; }
|
||||||
body.print fieldset.River>div.output div.list div.item { background-color:white; }
|
body.print fieldset.River>div.output div.list div.item { background-color:white; }
|
||||||
|
|
||||||
|
body.mobile>div.input input[name=username] { width:264px; }
|
||||||
|
body.mobile>div.input input[name=password] { width:264px; }
|
||||||
body.mobile legend { font-size:1.6rem; }
|
body.mobile legend { font-size:1.6rem; }
|
||||||
body.mobile input { font-size:1.4rem; }
|
body.mobile input { font-size:1.4rem; }
|
||||||
body.mobile input[type=text] { padding-top:3px; height:2.3rem; }
|
body.mobile textarea { font-size:1.2rem; }
|
||||||
body.mobile select { font-size:1.4rem; margin-top:3px; height:40px; }
|
body.mobile input[type=text] { padding-top:3px; height:2.35rem; }
|
||||||
|
body.mobile input[type=text] { padding-top:3px; height:2.47rem; }
|
||||||
|
body.mobile select { font-size:1.4rem; margin-top:3px; height:42px; }
|
||||||
body.mobile>div.carte { font-size:1.6rem; }
|
body.mobile>div.carte { font-size:1.6rem; }
|
||||||
body.mobile>div.carte div.item { font-size:1.6rem; }
|
body.mobile>div.carte div.item { font-size:1.6rem; }
|
||||||
body.mobile>div.input.login input { font-size:1.4rem; }
|
body.mobile>div.input.login input { font-size:1.4rem; }
|
||||||
@ -150,8 +154,9 @@ body.mobile fieldset.Header.head div.output { height:3rem; }
|
|||||||
body.mobile fieldset.Header.head>div.output div.menu { height:2.6rem; }
|
body.mobile fieldset.Header.head>div.output div.menu { height:2.6rem; }
|
||||||
body.mobile fieldset.Header.head div.state.time { display:none; }
|
body.mobile fieldset.Header.head div.state.time { display:none; }
|
||||||
body.mobile fieldset.River.left { background-color:#243950bf; font-size:2rem; min-width:240px; position:fixed; top:3rem; z-index:10; }
|
body.mobile fieldset.River.left { background-color:#243950bf; font-size:2rem; min-width:240px; position:fixed; top:3rem; z-index:10; }
|
||||||
|
body.mobile fieldset.River>div.output { width:320px; }
|
||||||
body.mobile fieldset.River>div.output div.item { font-size:1.6rem; }
|
body.mobile fieldset.River>div.output div.item { font-size:1.6rem; }
|
||||||
body.mobile fieldset.Action.main { margin-top:3rem; }
|
body.mobile fieldset.Action.main { margin-top:3rem; margin-bottom:3rem; }
|
||||||
body.mobile fieldset.Action.main.cmd { margin-top:0; margin-bottom:0; }
|
body.mobile fieldset.Action.main.cmd { margin-top:0; margin-bottom:0; }
|
||||||
body.mobile fieldset.Footer.foot { width:-webkit-fill-available; }
|
body.mobile fieldset.Footer.foot { width:-webkit-fill-available; }
|
||||||
body.mobile fieldset.Footer.foot { background-color:#000000b8; font-size:1.6rem; height:3rem; position:fixed; bottom:0; }
|
body.mobile fieldset.Footer.foot { background-color:#000000b8; font-size:1.6rem; height:3rem; position:fixed; bottom:0; }
|
||||||
|
@ -17,3 +17,4 @@ fieldset.Action div.output fieldset.plugin.Full>legend { float:left; }
|
|||||||
|
|
||||||
fieldset.panel.cmd>div.output>fieldset.plugin { padding:0; margin:0; }
|
fieldset.panel.cmd>div.output>fieldset.plugin { padding:0; margin:0; }
|
||||||
fieldset.panel.cmd>div.output>fieldset.plugin>legend { background-color:darkcyan; padding:0 10px; margin-right:3px; height:30px; float:left; }
|
fieldset.panel.cmd>div.output>fieldset.plugin>legend { background-color:darkcyan; padding:0 10px; margin-right:3px; height:30px; float:left; }
|
||||||
|
body.mobile fieldset.panel.cmd>div.output>fieldset.plugin>legend { height:42px; }
|
||||||
|
@ -21,7 +21,7 @@ Volcanos("onimport", {help: "导入数据", list: [], _init: function(can, msg)
|
|||||||
|
|
||||||
meta.id && (sub._option.dataset = sub._option.dataset||{}, sub._option.dataset.id = meta.id)
|
meta.id && (sub._option.dataset = sub._option.dataset||{}, sub._option.dataset.id = meta.id)
|
||||||
|
|
||||||
can.page.Modify(can, sub._output, {style: kit.Dict(html.MAX_WIDTH, meta.width-20)})
|
can.page.Modify(can, sub._output, {style: kit.Dict(html.MAX_WIDTH, meta.width-(can.user.isWindows? 20: 0))})
|
||||||
can.page.Append(can, can._action, [{view: [html.TABS, html.DIV, meta.name], onclick: function(event) {
|
can.page.Append(can, can._action, [{view: [html.TABS, html.DIV, meta.name], onclick: function(event) {
|
||||||
can.onmotion.select(can, can._output, html.FIELDSET_PLUGIN, sub._target)
|
can.onmotion.select(can, can._output, html.FIELDSET_PLUGIN, sub._target)
|
||||||
can.onmotion.select(can, can._action, html.DIV_TABS, event.target)
|
can.onmotion.select(can, can._action, html.DIV_TABS, event.target)
|
||||||
@ -240,7 +240,9 @@ Volcanos("onexport", {help: "导出数据", list: [],
|
|||||||
msg.Option(html.TOP, can._target.offsetTop)
|
msg.Option(html.TOP, can._target.offsetTop)
|
||||||
msg.Option(html.LEFT, can._target.offsetLeft)
|
msg.Option(html.LEFT, can._target.offsetLeft)
|
||||||
msg.Option(html.WIDTH, can._target.offsetWidth)
|
msg.Option(html.WIDTH, can._target.offsetWidth)
|
||||||
msg.Option(html.HEIGHT, can._target.offsetHeight-can._action.offsetHeight)
|
if (msg.Option(html.HEIGHT, can._target.offsetHeight-can._action.offsetHeight) > window.innerHeight) {
|
||||||
|
msg.Option(html.HEIGHT, window.innerHeight-2*html.ACTION_HEIGHT)
|
||||||
|
}
|
||||||
msg.Option(html.SCROLL, can.user.isMobile? can._target.parentNode.parentNode.scrollTop: can._output.scrollTop)
|
msg.Option(html.SCROLL, can.user.isMobile? can._target.parentNode.parentNode.scrollTop: can._output.scrollTop)
|
||||||
msg.Option(html.MARGIN_X, can.Conf(html.MARGIN_X))
|
msg.Option(html.MARGIN_X, can.Conf(html.MARGIN_X))
|
||||||
msg.Option(html.MARGIN_Y, can.Conf(html.MARGIN_Y))
|
msg.Option(html.MARGIN_Y, can.Conf(html.MARGIN_Y))
|
||||||
|
@ -63,3 +63,5 @@ body.white fieldset.inner>div.output div.content td.text span.string { color:#a7
|
|||||||
user-select:none;
|
user-select:none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
body.mobile fieldset.inner.float legend { height:42px; }
|
||||||
|
body.mobile fieldset.inner>form.option input[name=file] { width:90px; }
|
||||||
|
@ -24,6 +24,7 @@ Volcanos("onimport", {help: "导入数据", _init: function(can, msg, cb, target
|
|||||||
}, function() { can.onimport.tabview(can, paths[0], files[0]) })
|
}, function() { can.onimport.tabview(can, paths[0], files[0]) })
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
can.user.isMobile && !can.user.isLandscape() && can.onmotion.hidden(can, can.ui.project)
|
||||||
},
|
},
|
||||||
_simple: function(can, target) {
|
_simple: function(can, target) {
|
||||||
can.Conf(html.HEIGHT, ""), can.ui.project._toggle()
|
can.Conf(html.HEIGHT, ""), can.ui.project._toggle()
|
||||||
@ -182,7 +183,10 @@ Volcanos("onimport", {help: "导入数据", _init: function(can, msg, cb, target
|
|||||||
}, can.base.isFunc(cb) && cb(sub)
|
}, can.base.isFunc(cb) && cb(sub)
|
||||||
}, target)
|
}, target)
|
||||||
},
|
},
|
||||||
layout: function(can) { var height = can.ConfHeight()-(can.user.isWindows? 20: 0), width = can.ConfWidth()-(can.user.isWindows && !can.user.mod.isCmd? 20: 0)
|
layout: function(can) {
|
||||||
|
var height = can.ConfHeight()-(can.user.isMobile && can.user.mod.isCmd? (can.user.isLandscape()? 14: 54): 0)-(can.user.isWindows? 20: 0),
|
||||||
|
width = can.ConfWidth()-(can.user.isWindows && !can.user.mod.isCmd? 20: 0)+(can.user.isMobile && can.user.mod.isCmd && can.user.isLandscape()? 16: 0)
|
||||||
|
|
||||||
can.page.styleWidth(can, can.ui.profile_output, can.profile_size[can.onexport.keys(can)]||(width-can.ui.project.offsetWidth)/2)
|
can.page.styleWidth(can, can.ui.profile_output, can.profile_size[can.onexport.keys(can)]||(width-can.ui.project.offsetWidth)/2)
|
||||||
can.page.styleWidth(can, can.ui.content, width-can.ui.project.offsetWidth-can.ui.profile.offsetWidth)
|
can.page.styleWidth(can, can.ui.content, width-can.ui.project.offsetWidth-can.ui.profile.offsetWidth)
|
||||||
|
|
||||||
|
@ -8,6 +8,7 @@ Volcanos("onimport", {help: "导入数据", list: [], _init: function(can, msg,
|
|||||||
can.page.Modify(can, can.ui.profile, {style: {"max-height": can.ui.content.offsetHeight}})
|
can.page.Modify(can, can.ui.profile, {style: {"max-height": can.ui.content.offsetHeight}})
|
||||||
can.page.Modify(can, can.ui.profile, {style: {display: "block"}})
|
can.page.Modify(can, can.ui.profile, {style: {display: "block"}})
|
||||||
can.base.isFunc(cb) && cb(msg)
|
can.base.isFunc(cb) && cb(msg)
|
||||||
|
can.user.isMobile && !can.user.isLandscape() && can.onmotion.hidden(can, can.ui.project)
|
||||||
},
|
},
|
||||||
_content: function(can, msg, head, list, key, get, set) {
|
_content: function(can, msg, head, list, key, get, set) {
|
||||||
var hash = {}; msg.Table(function(value, index) { var k = key(can.base.Date(value.begin_time)); hash[k] = (hash[k]||[]).concat([value]) })
|
var hash = {}; msg.Table(function(value, index) { var k = key(can.base.Date(value.begin_time)); hash[k] = (hash[k]||[]).concat([value]) })
|
||||||
|
@ -104,7 +104,7 @@ Volcanos("onimport", {help: "导入数据", _init: function(can, msg, cb, target
|
|||||||
can.run(event, can.misc.concat(can, [ctx.ACTION, chat.STORY, data.type, data.name, data.text], cmds), cb, true)
|
can.run(event, can.misc.concat(can, [ctx.ACTION, chat.STORY, data.type, data.name, data.text], cmds), cb, true)
|
||||||
}
|
}
|
||||||
sub.ConfHeight(can.ConfHeight())
|
sub.ConfHeight(can.ConfHeight())
|
||||||
sub.ConfWidth(item.width = (width||can.ConfWidth())-40)
|
sub.ConfWidth(item.width = (width||can.ConfWidth())-(can.user.isWindows? 40: 20))
|
||||||
|
|
||||||
can.core.Value(item, "auto.cmd") && can.core.Timer300ms(function() {
|
can.core.Value(item, "auto.cmd") && can.core.Timer300ms(function() {
|
||||||
var msg = sub.request({}, can.core.Value(item, "opts")); msg.Option(ice.MSG_HANDLE, ice.TRUE)
|
var msg = sub.request({}, can.core.Value(item, "opts")); msg.Option(ice.MSG_HANDLE, ice.TRUE)
|
||||||
|
@ -1 +1,2 @@
|
|||||||
fieldset.draw.spide div.output div.toggle { display:none; }
|
fieldset.draw.spide div.output div.toggle { display:none; }
|
||||||
|
fieldset.draw.spide div.output div.toggle.project { display:block; }
|
||||||
|
@ -178,10 +178,10 @@ Volcanos("ondetail", {help: "用户交互", list: [],
|
|||||||
},
|
},
|
||||||
figure: function(can, sub, msg, cb) {
|
figure: function(can, sub, msg, cb) {
|
||||||
can.getActionSize(function(left, top, width, height) { left = left||0
|
can.getActionSize(function(left, top, width, height) { left = left||0
|
||||||
var top = 120; if (can.user.isMobile) { top = can.user.isLandscape()? 24: 48 }
|
var top = 120; if (can.user.isMobile) { top = can.user.isLandscape()? 0: 48 }
|
||||||
if (height > window.innerHeight) { height = window.innerHeight-top }
|
sub.ConfHeight(height-top-html.ACTION_HEIGHT-(can.user.isMobile&&!can.user.isLandscape()? 2*html.ACTION_HEIGHT: 0)), sub.ConfWidth(width)
|
||||||
|
|
||||||
can.onmotion.move(can, sub._target, {position: html.FIXED, left: left, top: top})
|
can.onmotion.move(can, sub._target, {position: html.FIXED, left: left, top: top})
|
||||||
sub.ConfHeight(height-top-2*html.ACTION_HEIGHT), sub.ConfWidth(width)
|
|
||||||
can.page.style(can, sub._output, html.MAX_WIDTH)
|
can.page.style(can, sub._output, html.MAX_WIDTH)
|
||||||
can.base.isFunc(cb) && cb(msg)
|
can.base.isFunc(cb) && cb(msg)
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user