diff --git a/frame.js b/frame.js index fb28f81b..67ddfb95 100644 --- a/frame.js +++ b/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) { + var offset = can.user.isMobile? 100: 0 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.styleHeight(can, output, height-html.ACTION_HEIGHT-1) + can.page.styleHeight(can, output, height-html.ACTION_HEIGHT-1-offset) }) }) diff --git a/page/index.css b/page/index.css index fbf8741c..127fad98 100644 --- a/page/index.css +++ b/page/index.css @@ -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; } 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.tiny { width:40px; } 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.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 input { font-size:1.4rem; } -body.mobile input[type=text] { padding-top:3px; height:2.3rem; } -body.mobile select { font-size:1.4rem; margin-top:3px; height:40px; } +body.mobile textarea { font-size:1.2rem; } +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 div.item { font-size:1.6rem; } 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.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>div.output { width:320px; } 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.Footer.foot { width:-webkit-fill-available; } body.mobile fieldset.Footer.foot { background-color:#000000b8; font-size:1.6rem; height:3rem; position:fixed; bottom:0; } diff --git a/panel/action.css b/panel/action.css index 880cb91a..6db4277a 100644 --- a/panel/action.css +++ b/panel/action.css @@ -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>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; } diff --git a/panel/action.js b/panel/action.js index 9a96fc8c..d44ff816 100644 --- a/panel/action.js +++ b/panel/action.js @@ -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) - 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.onmotion.select(can, can._output, html.FIELDSET_PLUGIN, sub._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.LEFT, can._target.offsetLeft) 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.MARGIN_X, can.Conf(html.MARGIN_X)) msg.Option(html.MARGIN_Y, can.Conf(html.MARGIN_Y)) diff --git a/plugin/local/code/inner.css b/plugin/local/code/inner.css index 7124784b..18ad2072 100644 --- a/plugin/local/code/inner.css +++ b/plugin/local/code/inner.css @@ -63,3 +63,5 @@ body.white fieldset.inner>div.output div.content td.text span.string { color:#a7 user-select:none; } +body.mobile fieldset.inner.float legend { height:42px; } +body.mobile fieldset.inner>form.option input[name=file] { width:90px; } diff --git a/plugin/local/code/inner.js b/plugin/local/code/inner.js index 7dfacefc..dd2d92be 100644 --- a/plugin/local/code/inner.js +++ b/plugin/local/code/inner.js @@ -24,6 +24,7 @@ Volcanos("onimport", {help: "导入数据", _init: function(can, msg, cb, target }, 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) { 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) }, 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.content, width-can.ui.project.offsetWidth-can.ui.profile.offsetWidth) diff --git a/plugin/local/team/plan.js b/plugin/local/team/plan.js index ec686c3d..f4fc48b9 100644 --- a/plugin/local/team/plan.js +++ b/plugin/local/team/plan.js @@ -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: {display: "block"}}) 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) { var hash = {}; msg.Table(function(value, index) { var k = key(can.base.Date(value.begin_time)); hash[k] = (hash[k]||[]).concat([value]) }) diff --git a/plugin/local/wiki/word.js b/plugin/local/wiki/word.js index 5daae708..f2957086 100644 --- a/plugin/local/wiki/word.js +++ b/plugin/local/wiki/word.js @@ -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) } 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() { var msg = sub.request({}, can.core.Value(item, "opts")); msg.Option(ice.MSG_HANDLE, ice.TRUE) diff --git a/plugin/story/spide.css b/plugin/story/spide.css index 12f9f1b8..adecc35a 100644 --- a/plugin/story/spide.css +++ b/plugin/story/spide.css @@ -1 +1,2 @@ fieldset.draw.spide div.output div.toggle { display:none; } +fieldset.draw.spide div.output div.toggle.project { display:block; } diff --git a/plugin/story/spide.js b/plugin/story/spide.js index ac98f775..e8ec4fbf 100644 --- a/plugin/story/spide.js +++ b/plugin/story/spide.js @@ -178,10 +178,10 @@ Volcanos("ondetail", {help: "用户交互", list: [], }, figure: function(can, sub, msg, cb) { can.getActionSize(function(left, top, width, height) { left = left||0 - var top = 120; if (can.user.isMobile) { top = can.user.isLandscape()? 24: 48 } - if (height > window.innerHeight) { height = window.innerHeight-top } + var top = 120; if (can.user.isMobile) { top = can.user.isLandscape()? 0: 48 } + 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}) - sub.ConfHeight(height-top-2*html.ACTION_HEIGHT), sub.ConfWidth(width) can.page.style(can, sub._output, html.MAX_WIDTH) can.base.isFunc(cb) && cb(msg) })