diff --git a/frame.js b/frame.js index 0d2048fb..f837dbee 100644 --- a/frame.js +++ b/frame.js @@ -317,7 +317,7 @@ Volcanos("onappend", {help: "渲染引擎", list: [], _init: function(can, meta, } meta.style && sub.page.Modify(sub, sub._target, {style: meta.style}) - can.onmotion.float.add(can, "input", sub) + can.onmotion.float.add(can, chat.INPUT, sub) on(event, sub, meta, cb, target) }, document.body) } @@ -437,6 +437,9 @@ Volcanos("onlayout", {help: "页面布局", list: [], _init: function(can, targe if (top+target.offsetHeight>window.innerHeight-100) { top = window.innerHeight - target.offsetHeight - 100 } var layout = {left: left, top: top} + if (layout.left < 0) { layout.left = 0 } + if (layout.top < 0) { layout.top = 0 } + can.page.Modify(can, target, {style: layout}) can.onmotion.move(can, target, layout) }, diff --git a/lib/user.js b/lib/user.js index dcf682da..dcbf2cbc 100644 --- a/lib/user.js +++ b/lib/user.js @@ -43,7 +43,9 @@ Volcanos("user", {help: "用户操作", agent: { return can.base.Time(time, (fmt||"%y-%m-%d %H:%M:%S").replace("%w", list[now.getDay()])) }, - title: function(text) { return text && (document.title = text), document.title }, + title: function(text) { + return text && (document.title = text), document.title + }, topic: function(can, name) { can.user.isMobile && (name += " mobile") && can.user.isLandscape && (name += " landscape") can.page.Modify(can, document.body, {className: name}) diff --git a/panel/river.js b/panel/river.js index 32f21757..404175bc 100644 --- a/panel/river.js +++ b/panel/river.js @@ -16,7 +16,7 @@ Volcanos("onimport", {help: "导入数据", list: [], _init: function(can, msg, if (can.user.isMobile) { can._main_river = "product", can._main_storm = "office" } if (can.user.isWeiXin) { can._main_river = "service", can._main_storm = "wx" } - can._main_title = can.user.Search(can, chat.TITLE)||msg.Option(ice.MSG_TITLE)||Volcanos.meta.args.title||can.user.mod.isPod||can._main_title + can._main_title = can.user.Search(can, chat.TITLE)||msg.Option(ice.MSG_TITLE)||Volcanos.meta.args.title||can.user.Search(can, ice.POD)||can._main_title can._main_river = can.user.Search(can, chat.RIVER)||msg.Option(ice.MSG_RIVER)||Volcanos.meta.args.river||can._main_river can._main_storm = can.user.Search(can, chat.STORM)||msg.Option(ice.MSG_STORM)||Volcanos.meta.args.storm||can._main_storm },