diff --git a/panel/action.js b/panel/action.js index b434a600..70e7b930 100644 --- a/panel/action.js +++ b/panel/action.js @@ -191,3 +191,4 @@ Volcanos("onexport", {help: "导出数据", list: [], }) }, }) + diff --git a/panel/cmd.js b/panel/cmd.js index 188139f5..5449d168 100644 --- a/panel/cmd.js +++ b/panel/cmd.js @@ -25,3 +25,4 @@ Volcanos("onaction", {help: "交互操作", list: [], _init: function(can, msg, }) }, }) + diff --git a/panel/header.js b/panel/header.js index 43f9869f..f3473fd0 100644 --- a/panel/header.js +++ b/panel/header.js @@ -10,6 +10,7 @@ Volcanos("onimport", {help: "导入数据", list: [], _init: function(can, msg, can.onimport._state(can, msg, target) can.onimport._search(can, msg, target) can.onimport._background(can, msg, target) + can.onimport._avatar(can, msg, target) can.onimport._menus(can, msg, target) can.base.isFunc(cb) && cb(msg) }, @@ -43,8 +44,9 @@ Volcanos("onimport", {help: "导入数据", list: [], _init: function(can, msg, }, _state: function(can, msg, target) { can.core.List(can.base.Obj(msg.Option(chat.STATE)||can.Conf(chat.STATE), [kit.MDB_TIME, aaa.USERNAME]), function(item) { - if (item == aaa.AVATAR) { - can.page.Append(can, target, [{view: can.base.join([chat.STATE, item]), list: [{img: can.Conf(item)||ice.SP}], onmouseenter: function(event) { + if (item == aaa.AVATAR ) { + if (can.user.isExtension || can.user.isLocalFile) { return } + can.page.Append(can, target, [{view: can.base.join([chat.STATE, item]), list: [{img: ice.SP}], onmouseenter: function(event) { can.onaction.carte(event, can, [can.page.Format(html.IMG, can.Conf(item), 160)]) }}]) return @@ -67,7 +69,13 @@ Volcanos("onimport", {help: "导入数据", list: [], _init: function(can, msg, }, _background: function(can, msg) { if (can.user.isExtension || can.user.isLocalFile) { return } - can.onlayout.background(can, msg.Option(aaa.BACKGROUND), document.body) + // can.onlayout.background(can, msg.Option(aaa.BACKGROUND), document.body) + can.onlayout.background(can, "/share/local/background", document.body) + }, + _avatar: function(can, msg) { + if (can.user.isExtension || can.user.isLocalFile) { return } + // can.page.Modify(can, "div.output div.state.avatar>img", {src: can.Conf(aaa.AVATAR, msg.Option(aaa.AVATAR))}) + can.page.Modify(can, "div.output div.state.avatar>img", {src: "/share/local/avatar"}) }, _menus: function(can, msg, target) { var menus = can.base.Obj(msg.Option(chat.MENUS)||can.Conf(chat.MENUS), [chat.HEADER, ["setting", chat.BLACK, chat.WHITE, chat.PRINT]]) @@ -104,9 +112,6 @@ Volcanos("onimport", {help: "导入数据", list: [], _init: function(can, msg, }) }) }) }, - _avatar: function(can, msg) { - can.page.Modify(can, "div.output div.state.avatar>img", {src: can.Conf(aaa.AVATAR, msg.Option(aaa.AVATAR))}) - }, _time: function(can, target) { can.core.Timer({interval: 500}, function() { can.onimport.time(can, target) }) can.onappend.figure(can, {style: {"min-width": 306}, action: "date"}, target, function(sub) { @@ -171,7 +176,7 @@ Volcanos("onaction", {help: "交互数据", list: [], _init: function(can, meta, "print": "打印主题", "shareuser": "共享用户", - "language": "语言", + "language": "语言地区", "chinese": "中文", "clear": "清除背景", }, @@ -253,3 +258,4 @@ Volcanos("onexport", {help: "导出数据", list: [], height: function(can) { return can._target.offsetHeight }, topic: function(can) { return can._topic }, }) + diff --git a/panel/river.js b/panel/river.js index 401a64ed..075cbd3a 100644 --- a/panel/river.js +++ b/panel/river.js @@ -183,7 +183,7 @@ Volcanos("ondetail", {help: "菜单交互", list: ["共享群组", "添加应用 }, "删除群组": function(event, can, button, river) { var msg = can.request(event, {hash: river}) - can.run(event, [mdb.REMOVE], function(msg) { + can.run(event, [ctx.ACTION, mdb.REMOVE], function(msg) { can.user.Search(can, {}) }) }, @@ -305,3 +305,4 @@ Volcanos("onexport", {help: "导出数据", list: [], }) }, }) + diff --git a/plugin/input.js b/plugin/input.js index 646392c5..d36d234c 100644 --- a/plugin/input.js +++ b/plugin/input.js @@ -1,4 +1,3 @@ -_can_name = "/plugin/input.js" Volcanos("onimport", {help: "导入数据", list: [], _init: function(can, meta, list, cb, target) { }, }) @@ -38,4 +37,4 @@ Volcanos("onaction", {help: "控件交互", list: [], _init: function(can, meta, }, }) Volcanos("onexport", {help: "导出数据", list: []}) -_can_name = "" + diff --git a/plugin/input/date.js b/plugin/input/date.js index 5ffefc5c..7959cb83 100644 --- a/plugin/input/date.js +++ b/plugin/input/date.js @@ -1,5 +1,5 @@ Volcanos("onfigure", {help: "控件详情", list: [], date: {onclick: function(event, can, meta, cb, target) { - function set(now) { target.value = can.base.Time(now), can.page.Remove(can, can._target) + function set(now) { target.value = can.user.time(can, now), can.page.Remove(can, can._target) meta && meta.action == ice.AUTO && can.run({}) } @@ -56,7 +56,7 @@ Volcanos("onfigure", {help: "控件详情", list: [], date: {onclick: function(e for (var day = new Date(one); day < end; day.setDate(day.getDate()+1)) {add(day, "main")} for (var day = new Date(end); end.getDay() != 0 && day < tail; day.setDate(day.getDate()+1)) {add(day, "next")} - return can.onlayout.figure(event, can), cb(can), now + return can.onlayout.figure(event, can), can.base.isFunc(cb) && cb(can), now }; show(now) }} }, ["/plugin/input/date.css"]) diff --git a/plugin/local/chat/div.js b/plugin/local/chat/div.js index 3832c2c5..5d5abae0 100644 --- a/plugin/local/chat/div.js +++ b/plugin/local/chat/div.js @@ -91,3 +91,4 @@ Volcanos("onaction", {help: "操作数据", list: [], }, }) Volcanos("onexport", {help: "导出数据", list: []}) + diff --git a/plugin/local/chat/media.js b/plugin/local/chat/media.js index 62e486f5..e93af71e 100644 --- a/plugin/local/chat/media.js +++ b/plugin/local/chat/media.js @@ -34,3 +34,4 @@ Volcanos("onaction", {help: "操作数据", list: [], _init: function(can, msg, }) Volcanos("onexport", {help: "导出数据", list: [], }) + diff --git a/plugin/local/code/vimer.js b/plugin/local/code/vimer.js index db88cd63..bd68165d 100644 --- a/plugin/local/code/vimer.js +++ b/plugin/local/code/vimer.js @@ -305,3 +305,4 @@ Volcanos("onaction", {help: "控件交互", list: ["autogen", "compile"], }, }) Volcanos("onexport", {help: "导出数据", list: ["文件数", "模式", "按键", "解析器", "文件名", "当前行", "跳转数"]}) + diff --git a/plugin/state.js b/plugin/state.js index 76f0e6ab..e7595d11 100644 --- a/plugin/state.js +++ b/plugin/state.js @@ -1,4 +1,3 @@ -_can_name = "/plugin/state.js" Volcanos("onimport", {help: "导入数据", list: [], _init: function(can, conf, list, cb, target) { }, _process: function(can, msg) { @@ -237,4 +236,4 @@ Volcanos("onaction", {help: "交互操作", list: [ close: function(event, can) { can.page.Remove(can, can._target) }, }) Volcanos("onexport", {help: "导出数据", list: []}) -_can_name = "" + diff --git a/plugin/story/spide.js b/plugin/story/spide.js index 5b52e1eb..390a0bb9 100644 --- a/plugin/story/spide.js +++ b/plugin/story/spide.js @@ -169,3 +169,4 @@ Volcanos("ondetail", {help: "用户交互", list: [], }) }, }) + diff --git a/plugin/table.js b/plugin/table.js index 1eb18822..d01ff42c 100644 --- a/plugin/table.js +++ b/plugin/table.js @@ -1,4 +1,3 @@ -_can_name = "/plugin/table.js" Volcanos("onimport", {help: "导入数据", list: [], _init: function(can, msg, list, cb, target) { can.onmotion.clear(can) can.onappend.table(can, msg) @@ -14,4 +13,4 @@ Volcanos("onimport", {help: "导入数据", list: [], _init: function(can, msg, }) Volcanos("onaction", {help: "控件交互", list: []}) Volcanos("onexport", {help: "导出数据", list: []}) -_can_name = "" + diff --git a/proto.js b/proto.js index 6ed410c9..557a7440 100644 --- a/proto.js +++ b/proto.js @@ -216,9 +216,9 @@ var Volcanos = shy("火山架", {iceberg: "/chat/", volcano: "/frame.js", args: }, set: function(name, key, value) { var msg = can.request({}); msg.Option(key, value) - return can.search(msg._event, [can.base.Keys(name, "onimport", key)]) + return can.search(msg._event, [can.core.Keys(name, "onimport", key)]) }, - get: function(name, key) { return can.search({}, [can.base.Keys(name, "onexport", key)]) }, + get: function(name, key) { return can.search({}, [can.core.Keys(name, "onexport", key)]) }, search: function(event, cmds, cb) { return can.run && can.run(event, ["_search"].concat(cmds), cb, true) }, Conf: function(key, value) { return can.core.Value(can._conf, key, value) }, _conf: {},