diff --git a/frame.js b/frame.js index fc8ccdb3..3d8c8577 100644 --- a/frame.js +++ b/frame.js @@ -1,5 +1,9 @@ _can_name = "/frame.js" Volcanos("onengine", {help: "搜索引擎", list: [], _init: function(can, meta, list, cb, target) { + + can.page.Select(can, document.body, "iframe", function(item) { + can.page.Remove(can, item) + }) can.run = function(event, cmds, cb) { var msg = can.request(event); cmds = cmds||[] return (can.onengine[cmds[0]]||can.onengine._remote)(event, can, msg, can, cmds, cb) } @@ -475,7 +479,10 @@ Volcanos("onlayout", {help: "页面布局", list: [], _init: function(can, targe }) can.user.isMobile || can.page.Select(can, target, html.FIELDSET_MAIN, function(field, index) { - can.page.style(can, field, html.HEIGHT, height, html.WIDTH, width-1) + var scroll = 1 + if (!can.user.isMobile && !can.user.isMacOSX) { scroll = 18 } + + can.page.style(can, field, html.HEIGHT, height, html.WIDTH, width-scroll) can.page.Select(can, target, [[html.FIELDSET_MAIN, html.DIV_OUTPUT]], function(output) { height -= can.page.Select(can, field, html.DIV_ACTION)[0].offsetHeight can.page.styleHeight(can, output, height) @@ -505,8 +512,8 @@ Volcanos("onlayout", {help: "页面布局", list: [], _init: function(can, targe if (layout.left+target.offsetWidth>window.innerWidth) { layout.right = 0, layout.left = "" } - if (top+target.offsetHeight>window.innerHeight-100) { - layout.bottom = window.innerHeight - event.clientY+event.offsetY, layout.top = "" + if (top+target.offsetHeight>window.innerHeight-32) { + layout.bottom = window.innerHeight - event.clientY+event.offsetY-(right? 32: 32), layout.top = "" if (right) { layout.bottom -= target.offsetHeight } } return can.page.style(can, target, layout), can.onmotion.move(can, target, layout), layout diff --git a/lib/user.js b/lib/user.js index 86c54d6d..94f943e1 100644 --- a/lib/user.js +++ b/lib/user.js @@ -210,15 +210,13 @@ Volcanos("user", {help: "用户操作", agent: { } } }) }] ); can.onlayout.figure(event, can, ui._target) + ui._target.onmouseover = function(event) { can.onkeymap.prevent(event) } var carte = {_target: ui._target, _parent: parent} - null && can.onmotion.float.add(can, chat.CARTE, carte) - ui._target.onmouseover = function(event) { - can.onkeymap.prevent(event) - } return can.onkeymap.prevent(event), carte }, carteRight: function(event, can, meta, list, cb, parent) { var carte = can.user.carte(event, can, meta, list, cb, parent) + // can.onlayout.figure(event, can, carte._target, true) can.page.Modify(can, carte._target, {style: { left: event.clientX-event.offsetX+event.target.offsetWidth-3, top: carte._target.offsetTop-event.target.offsetHeight+5, diff --git a/page/index.css b/page/index.css index 97005b4a..032eb904 100644 --- a/page/index.css +++ b/page/index.css @@ -131,12 +131,12 @@ fieldset.output>div.action { display:none; } fieldset.output>div.status { display:none; } fieldset.story>legend { display:block; padding:2px 20px; letter-spacing:4px; } fieldset.story>div.status { border-top:1px solid darkcyan; } -fieldset.float { background-color:#023531cf; margin:0px; padding:0px; position:absolute; } +fieldset.float { position:absolute; z-index:10; background-color:#023531cf; padding:0px; margin:0px; } fieldset.float>legend { float:left; } fieldset.float>div.action { display:block; float:none; height:2rem; overflow:auto; } fieldset.float table { color:white; } -fieldset.input { background-color:#0d4142a6; position:fixed; top:32px; } +fieldset.input { position:fixed; z-index:10; background-color:#0d4142a6; top:32px; } fieldset.input legend { display:none; } fieldset.input div.output { max-height:400px; } fieldset.input table { color:white; } @@ -144,7 +144,7 @@ fieldset.input td { word-break:keep-all; } fieldset.input.date table { text-align:center; width:280px; } fieldset.input.date>div.action { height:4rem; } -body>div.toast { background-color:#0e3369b3; color:yellow; padding:5px; overflow:auto; position:fixed; } +body>div.toast { position:fixed; z-index:10; background-color:#0e3369b3; color:yellow; padding:5px; overflow:auto; } body>div.toast div.title { float:left; cursor:copy; word-break:break-all; } body>div.toast div.duration { float:right; cursor:pointer; } body>div.toast div.content { text-align:center; white-space:pre; clear:both; } @@ -152,23 +152,17 @@ body>div.toast div.progress { height:10px; border:solid 2px green; margin-left:- body>div.toast div.progress div.current { height:10px; background-color:red; } body>div.toast div.action div.item { float:left; } -body>div.carte { background-color:#295b61; color:white; min-width:80px; padding:4px; position:fixed; z-index:10; } +body>div.carte { position:fixed; z-index:10; background-color:#295b61; color:white; padding:4px; min-width:80px; } body>div.carte div.item { padding:3px 12px; } -body>div.input { background-color:#0d4142a6; position:fixed; z-index:0; } +body>div.input { position:fixed; z-index:10; background-color:#0d4142a6; } body>div.input div.item { float:left; } body>div.input input[type=text] { width:171px; } body>div.input input[name=username] { width:171px; } body>div.input input[name=password] { width:171px; } -body>div.input textarea { - box-shadow:4px 4px 10px 1px #626bd0; - border:2px inset #14a58e; - width:171px; height:60px; - background-color:cyan; - padding:4px; -} +body>div.input textarea { box-shadow:4px 4px 10px 1px #626bd0; border:2px inset #14a58e; width:171px; height:60px; background-color:cyan; padding:4px; } body>div.input.login { padding:10px; } -body>div.upload { background-color:black; color:yellow; position:fixed; padding:5px; } +body>div.upload { position:fixed; z-index:10; background-color:black; color:yellow; padding:5px; } body>div.upload div.item { float:left; } body>div.upload div.output { border:solid 1px red; clear:both; } body>div.upload div.progress { background-color:red; width:0; height:10px; }