diff --git a/lib/misc.js b/lib/misc.js index 2087fff0..7145e2df 100644 --- a/lib/misc.js +++ b/lib/misc.js @@ -102,6 +102,8 @@ Volcanos("misc", { } try { xhr.send(data) } catch(e) { can.misc.Warn(e), cbs && cbs(e) } }, WSS: function(can, args, cb, onopen, onclose, onerror, _msg) { if (can.user.isIE) { return } + var msg = can.request(); can.page.exportValue(can, msg) + can.core.List(msg.Option(), function(value) { args[value] = msg.Option(value) }) var url = location.protocol.replace(ice.HTTP, "ws")+"//"+location.host+"/space/" if (url.indexOf(html.CHROME) == 0) { url = "ws://localhost:9020/space/" } try { var socket = new WebSocket(can.base.MergeURL(url, args)); _msg = _msg || can.request()._caller() } catch {} diff --git a/lib/user.js b/lib/user.js index 7649ba1d..0818c670 100644 --- a/lib/user.js +++ b/lib/user.js @@ -190,8 +190,7 @@ Volcanos("user", { } else { can.getActionSize(function(left, top, height) { can.page.style(can, ui._target, html.LEFT, left||0, html.TOP, (height/4||0)) }) } - can.onmotion.delay(can, function() { action.focus() }) - can.onmotion.resize(can, ui._target) + can.onmotion.resize(can, ui._target), can.onmotion.delay(can, function() { action.focus() }) return button === true && action.submit(event, can, html.SUBMIT), action }, select: function(event, can, type, fields, cb, cbs) { diff --git a/panel/header.js b/panel/header.js index a50ee039..d21a9ec6 100644 --- a/panel/header.js +++ b/panel/header.js @@ -65,8 +65,8 @@ Volcanos(chat.ONACTION, {_init: function(can) { } can.run(can.request({}, {_method: web.GET}), [], function(msg) { lang(msg) can.require(can.core.List(msg["theme.list"], function(item) { return "src/template/web.chat.header/theme/"+item })) - can.onaction._menus[1] = can.onaction._menus[1].concat(can.core.List(msg["theme.list"], function(item) { if (item == "mobile.css") { return } return can.base.trimSuffix(item, ".css") })) - can.onaction._menus[2] = can.onaction._menus[2].concat(can.core.List(msg["language.list"], function(item) { return can.base.trimSuffix(item, ".js") })) + can.onaction._menus[1] = [chat.THEME, ice.AUTO].concat(can.core.List(msg["theme.list"], function(item) { if (item == "mobile.css") { return } return can.base.trimSuffix(item, ".css") })) + can.onaction._menus[2] = [aaa.LANGUAGE, ice.AUTO].concat(can.core.List(msg["language.list"], function(item) { return can.base.trimSuffix(item, ".js") })) if (can.base.beginWith(location.pathname, "/wiki/portal/", "/chat/cmd/web.wiki.portal/", "/chat/cmd/web.chat.oauth.client", "/chat/pod/20230511-golang-story/cmd/web.code.gitea.client")) { return show(msg) } if (location.pathname == "/" && can.base.beginWith(msg.Option(ice.MAIN)||"", "/wiki/portal/", "/chat/cmd/web.wiki.portal/")) { return show(msg) } if (!can.Conf(aaa.USERNICK, msg.Option(aaa.USERNICK)||msg.Option(ice.MSG_USERNICK)||msg.Option(ice.MSG_USERNAME))) {