diff --git a/panel/action.js b/panel/action.js index ffb8b49a..e9f3cab6 100644 --- a/panel/action.js +++ b/panel/action.js @@ -220,7 +220,7 @@ Volcanos(chat.ONPLUGIN, { plugin: shy("默认插件", [mdb.NAME, ice.LIST, ice.BACK]), layout: shy("界面布局", { _init: function(can) { - can.Option(chat.LAYOUT, can.getAction(chat.LAYOUT)) + can.Option(chat.LAYOUT, can.getAction(chat.LAYOUT)||ice.AUTO) }, }, ["layout:select=auto,tabs,tabview,horizon,vertical,free,grid,flow,page", ice.RUN], function(can, msg, arg) { can.onaction.layout(can, arg[0], true) }), diff --git a/plugin/state.js b/plugin/state.js index 6fe5258c..6d78f1d2 100644 --- a/plugin/state.js +++ b/plugin/state.js @@ -33,7 +33,8 @@ Volcanos(chat.ONIMPORT, {_process: function(can, msg) { sub.run = function(event, cmds, cb) { var res = can.request(event, can.Option(), opts, {pid: msg.Option("pid")}) for (var i = 0; i < opt.length; i += 2) { res.Option(opt[i], opt[i+1]) } - can.run(event, (msg.Option("_index")==can._index? []: [ice.RUN, msg.Option("_index")]).concat(msg[ice.MSG_PREFIX]||[]).concat(cmds), cb, true) + // can.run(event, (msg.Option("_index")==can._index? []: [ice.RUN, msg.Option("_index")]).concat(msg[ice.MSG_PREFIX]||[]).concat(cmds), cb, true) + can.run(event, (msg.Option("_index")==can._index? msg[ice.MSG_PREFIX]||[]: [ice.RUN, msg.Option("_index")]).concat(cmds), cb, true) } }) }); return true }, @@ -116,8 +117,8 @@ Volcanos(chat.ONACTION, {list: [ _resize: function(can, auto, height, width) { can.onimport.size(can, height, width, auto) }, _output: function(can, msg) {}, - "刷新界面": function(event, can, button, sub) { sub.onlayout._init(sub) }, - "刷新数据": function(event, can) { can.Update(event, can.Input()) }, + "刷新界面": function(event, can, button, sub) { sub.onlayout._init(sub), can.user.toastSuccess(can) }, + "刷新数据": function(event, can) { can.Update(event, can.Input()), can.user.toastSuccess(can) }, "切换浮动": function(event, can, button, sub) { can.onaction._switch(can, sub, chat.FLOAT, function() { can.onmotion.hidden(can, can._action), can.onmotion.hidden(can, can._status) can.ConfHeight(can.page.height()/2-2*html.ACTION_HEIGHT-can.onexport.statusHeight(can)), html.WIDTH, can.ConfWidth(can.page.width()/(can.user.isMobile? 1: 2))