diff --git a/frame.js b/frame.js index 84cf3682..360f9376 100644 --- a/frame.js +++ b/frame.js @@ -244,8 +244,8 @@ Volcanos(chat.ONAPPEND, {_init: function(can, meta, list, cb, target, field) { can.isCmdMode() && can.onappend.style(can, can.misc.Search(can, ctx.STYLE), can._target) can.page.style(can, can._output, html.HEIGHT, "", html.WIDTH, "") can.onappend.style(sub, sub.Conf(ctx.STYLE)) - // if (can.isCmdMode()) { can.onimport.size(can, can.page.height(), can.page.width(), true) } - can.core.List([chat.FLOAT, chat.FULL, chat.CMD], function(mode) { can.page.ClassList.has(can, can._target, mode) && sub.onlayout[mode](sub) }) + if (can.isFullMode() || can.isCmdMode()) { can.onimport.size(can, can.page.height(), can.page.width(), true) } + // can.core.List([chat.FLOAT], function(mode) { can.page.ClassList.has(can, can._target, mode) && sub.onlayout[mode](sub) }) can.onmotion.story.auto(can, can._output), can.onexport.output(can, msg), can.base.isFunc(cb) && cb(msg) }, target: output}) }) @@ -416,11 +416,8 @@ Volcanos(chat.ONAPPEND, {_init: function(can, meta, list, cb, target, field) { var defer = [], content_height, content_width; function layout(type, list, height, width) { var _width = width, _height = height; can.core.List(list, function(item) { if (can.base.isArray(item)) { return } if (can.base.isObject(item)) { var meta = item; item = item._index } - // if (item == "plug") { return } var target = ui[item]; if (!can.page.isDisplay(target)) { return } if (item == html.CONTENT) { return defer.push(function() { can.page.style(can, target, html.HEIGHT, content_height = height, html.WIDTH, content_width = width) }) } - // if (item == html.PROFILE) { width -= 1 } - // if (item == html.PROJECT) { width -= 1 } if (type == FLOW) { var h = calc(item, target.offsetHeight, height) if (can.base.isObject(meta) && meta.layout) { meta.layout(h, width) } can.page.style(can, target, html.WIDTH, width), height -= h diff --git a/panel/action.js b/panel/action.js index 8fc2c9e0..5018ad28 100644 --- a/panel/action.js +++ b/panel/action.js @@ -42,7 +42,6 @@ Volcanos(chat.ONACTION, {_init: function(can, target) { }); if (!can.Conf(chat.TOOL) && !can.user.mod.isCmd) { return } can._names = location.pathname can.Conf(chat.TOOL)? can.onappend.layout(can, can.core.List(can.Conf(chat.TOOL), function(item, index, list) { item.type = chat.PLUGIN if (list.length == 1) { - item.height = can.page.height(), item.width = can.page.width() can.user.title(item.index), can.onaction._onaction_cmd(can), item.mode = chat.CMD, item.opts = can.misc.Search(can) } return item }), FLOW).layout(window.innerHeight, window.innerWidth): can.runAction(can.request(), ctx.COMMAND, [], function(msg) { diff --git a/panel/search.js b/panel/search.js index c10ab72f..cc1d4106 100644 --- a/panel/search.js +++ b/panel/search.js @@ -46,12 +46,12 @@ Volcanos(chat.ONACTION, {_init: function(can) { can.onmotion.hidden(can) }, list }, plugin: function(event, can, data) { if (can.base.isFunc(data.text)) { return can.onmotion.hidden(can), data.text(event) } var cmd = data.cmd == ctx.COMMAND? can.core.Keys(data.type, data.name.split(ice.SP)[0]): can.core.Keys(data.ctx, data.cmd) - var meta = {type: "plugin", index: cmd||msg.Option(mdb.INDEX), args: cmd == web.WIKI_WORD? [data.name]: []} + var meta = {type: html.PLUGIN, index: cmd||msg.Option(mdb.INDEX), args: cmd == web.WIKI_WORD? [data.name]: []} if (data.type == cli.OPENS) { return can.runAction(event, cli.OPENS, [data.text], null, true) } if (data.type == ssh.SHELL) { meta = {index: web.CODE_XTERM, args: [data.text]} } if (data.type == ctx.INDEX) { meta = {index: data.text.split(ice.FS)[0], args: data.text.split(ice.FS).slice(1) } } if (data.type == nfs.FILE) { meta = {index: web.CODE_VIMER, args: can.misc.SplitPath(can, data.text)} } - can.onappend.plugin(can, meta, function(sub) { can._plugins = (can._plugins||[]).concat(sub), sub.onimport.size(sub, can.ConfHeight(), can.ConfWidth(), true), sub.Focus() }, can.ui.profile) + can.onappend.plugin(can, meta, function(sub) { can._plugins = (can._plugins||[]).concat(sub), sub.onimport.size(sub, can.ConfHeight(), can.ConfWidth()-1, true), sub.Focus() }, can.ui.profile) }, }) Volcanos(chat.ONEXPORT, {statusHeight: function(can) { return can.db.type == mdb.FOREACH? 0: html.ACTION_HEIGHT }, diff --git a/plugin/local/code/inner.js b/plugin/local/code/inner.js index 7ec1d6a3..3c095542 100644 --- a/plugin/local/code/inner.js +++ b/plugin/local/code/inner.js @@ -145,13 +145,9 @@ Volcanos(chat.ONIMPORT, {_init: function(can, msg, cb) { var paths = can.core.Sp history: function(can, record) { can.base.Eq(record, can.db.history[can.db.history.length-1], mdb.TEXT) || can.db.history.push(record) return can.Status(ice.BACK, can.db.history.length), record }, - project: function(can, path) { - can.page.style(can, can.ui.project, "visibility", "hidden") - can.onmotion.clear(can, can.ui.project), can.onimport.zone(can, can.core.Item(can.onfigure, function(name, cb) { - if (can.base.isFunc(cb)) { return {name: name, _trans: can.onfigure._trans? can.onfigure._trans[name]||"": "", _init: function(target, zone) { return cb(can, target, zone, path) }} } - }), can.ui.project) - can.page.style(can, can.ui.project, "visibility", "visible") - }, + project: function(can, path) { can.onmotion.clear(can, can.ui.project), can.onimport.zone(can, can.core.Item(can.onfigure, function(name, cb) { + if (can.base.isFunc(cb)) { return {name: name, _trans: can.onfigure._trans? can.onfigure._trans[name]||"": "", _init: function(target, zone) { return cb(can, target, zone, path) }} } + }), can.ui.project) }, profile: function(can, msg) { var _msg = can.db.tabview[can.onexport.keys(can)]; _msg.Option(html.WIDTH, msg.Option(html.WIDTH)||0.5) if (msg.Result().indexOf("