diff --git a/lib/user.js b/lib/user.js index 92b7f98d..5c65e2b6 100644 --- a/lib/user.js +++ b/lib/user.js @@ -3,7 +3,7 @@ Volcanos("user", {help: "用户模块", confirm: function(text) {return confirm(JSON.stringify(text))}, prompt: function(text, cb, def, silent) {(text = silent? def: prompt(text, def||"")) != undefined && typeof cb == "function" && cb(text); return text}, reload: function(force) {(force || confirm("重新加载页面?")) && location.reload()}, - title: function(text) {document.title = text}, + title: function(text) {return text && (document.title = text), document.title}, input: function(event, can, form, cb) { var view = can.page.Append(can, document.body, [{view: ["input", "fieldset"], style: {left: event.clientX+"px", top: event.clientY+"px"}, list: [ diff --git a/pane/Login.js b/pane/Login.js index b6cbbb45..ff15ae86 100644 --- a/pane/Login.js +++ b/pane/Login.js @@ -1,7 +1,7 @@ Volcanos("onimport", {help: "导入数据", list: [], _init: function(can, conf, output, action, option, field) { can.user.login = function(cb) { - can.misc.WSS(can, "", {node: "active"}, function(event, msg, cmd, arg) { + can.misc.WSS(can, "", {node: "active", user: can.user.title()}, function(event, msg, cmd, arg) { switch (cmd) { case "space": can._share = arg[1]