diff --git a/const.js b/const.js index d16fd9a9..ebdde383 100644 --- a/const.js +++ b/const.js @@ -355,6 +355,7 @@ var html = {value: { FIELDSET_HEAD: "fieldset.head", FIELDSET_FOOT: "fieldset.foot", FIELDSET_LEFT: "fieldset.left", FIELDSET_MAIN: "fieldset.main", FIELDSET_PANEL: "fieldset.panel", FIELDSET_PLUGIN: "fieldset.plugin", FIELDSET_STORY: "fieldset.story", FIELDSET_PLUG: "fieldset.plug", FIELDSET_FLOAT: "fieldset.float", FIELDSET_INPUT: "fieldset.input", + FIELDSET_OUTPUT: "fieldset.output", H1: "h1", H2: "h2", H3: "h3", UL: "ul", OL: "ol", LI: "li", BR: "br", HR: "hr", A: "a", SPAN: "span", CODE: "code", DIV: "div", diff --git a/plugin/local/code/vimer.js b/plugin/local/code/vimer.js index 0584018f..69d03656 100644 --- a/plugin/local/code/vimer.js +++ b/plugin/local/code/vimer.js @@ -1,5 +1,6 @@ Volcanos(chat.ONIMPORT, {_init: function(can, msg, cb) { if (can.user.mod.isPod) { delete(can.onfigure.space), delete(can.onfigure.repos) } can.require(["/plugin/local/code/inner.js"], function(can) { can.onimport._last_init(can, msg, function() { + can.onappend.style(can, "vimer", can._fields) can.onengine.listen(can, "tabview.line.select", function(msg) { can.onaction._selectLine(can) }) can.db.undo = [], can.db.redo = [], can.onimport._input(can), cb && cb(msg) }) }) diff --git a/plugin/state.js b/plugin/state.js index 6e91d93e..dd61185b 100644 --- a/plugin/state.js +++ b/plugin/state.js @@ -16,14 +16,16 @@ Volcanos(chat.ONIMPORT, { _cookie: function(can, msg) { can.misc.Cookie(can, msg._arg[0], msg._arg[1]), can.Update() }, _session: function(can, msg) { can.misc.sessionStorage(can, msg._arg[0], msg._arg[1]), can.Update() }, _field: function(can, msg, cb) { - var height = can.ConfHeight()-can.onexport.actionHeight(can)-can.onexport.statusHeight(can), width = can.ConfWidth() + var height = can.ConfHeight()-can.onexport.actionHeight(can)-(can.onexport.statusHeight(can)||1), width = can.ConfWidth() var tabs = false, tabHash = msg.Option("field.tabs") if (tabHash) { can.sub && can.sub.onimport.tabs(can, [{name: tabHash.slice(0, 6)}], function() { can.onmotion.cache(can, function() { return tabHash }) }), tabs = true } else { - height = can.base.Max(html.STORY_HEIGHT, height) + if (!can.page.tagis(can._target, html.FIELDSET_OUTPUT)) { + height = can.base.Max(html.STORY_HEIGHT, height) + } } msg.Table(function(item) { tabs && can.onmotion.cache(can, function() { return tabHash }) can.onappend._plugin(can, item, {index: item.index, args: can.base.Obj(item.args||item.arg, []), height: height, width: width}, function(sub) { can._plugins = (can._plugins||[]).concat([sub]) diff --git a/plugin/table.js b/plugin/table.js index 6721c11c..829cdf65 100644 --- a/plugin/table.js +++ b/plugin/table.js @@ -157,7 +157,7 @@ Volcanos(chat.ONIMPORT, {_init: function(can, msg, target) { ], _init: function(target) { item._select && (_select = target) }, onclick: function(event) { - cb(event, item, event.currentTarget._list && can.onmotion.toggle(can, event.currentTarget._list)) + cb(event, item, event.currentTarget._list && can.onmotion.toggle(can, event.currentTarget._list), event.currentTarget) }, oncontextmenu: function(event) { if (can.base.isFunc(cbs)) { var menu = cbs(event, event.currentTarget); if (menu) { return can.user.carteRight(event, can, menu.meta, menu.list, menu) } } can.user.carteItem(event, can, item)