diff --git a/panel/action.js b/panel/action.js index 9abaad75..63723bc5 100644 --- a/panel/action.js +++ b/panel/action.js @@ -11,6 +11,7 @@ Volcanos(chat.ONIMPORT, {_init: function(can, msg) { can.onmotion.clear(can) can.user.title(msg.SearchOrOption(chat.TITLE)), can.setHeader(chat.TOPIC, msg.SearchOrOption(chat.TOPIC)) msg.Length() > 1? can.onlayout._init(can): can.onengine.signal(can, chat.ONACTION_CMD) can.Conf(chat.RIVER, web.SHARE, chat.STORM, share), can.onimport._init(can, msg) + can.user.mod.isCmd = true }) }, _cmd: function(can, item, next) { can.base.Copy(item, {mode: chat.CMD, opts: can.misc.Search(can)}), can.onengine.signal(can, chat.ONACTION_CMD) if (can.misc.Debug(can, "plugin", item.index, item.args, item)) { debugger } diff --git a/plugin/local/team/plan.css b/plugin/local/team/plan.css index 21c6d3c6..c7527b0f 100644 --- a/plugin/local/team/plan.css +++ b/plugin/local/team/plan.css @@ -7,6 +7,5 @@ fieldset.plan>div.output div.process { background-color:green; color:white; } fieldset.plan>div.output div.cancel { background-color:red; color:white; } fieldset.plan>div.output div.finish { background-color:gray; color:white; } -fieldset.plan>div.output div.content table { height:-webkit-fill-available; width:-webkit-fill-available; } fieldset.plan>div.output div.content th:first-child { width:40px; position:sticky; left:2px; } fieldset.plan>div.output div.content table.content>tr:first-child { height:30px; position:sticky; top:2px; } \ No newline at end of file diff --git a/plugin/local/team/plan.js b/plugin/local/team/plan.js index 66f3932c..94e7edcf 100644 --- a/plugin/local/team/plan.js +++ b/plugin/local/team/plan.js @@ -5,13 +5,13 @@ Volcanos(chat.ONIMPORT, {_init: function(can, msg, target) { can.onmotion.clear( _content: function(can, msg, head, list, key, get, set) { var begin_time = can.base.Date(can.Option(team.BEGIN_TIME)) var hash = {}; msg.Table(function(value, index) { var k = key(can.base.Date(value.begin_time)); hash[k] = (hash[k]||[]).concat([value]) }) can.sup.task && (can.sup.task._target = null) - can.page.Append(can, can.ui.content, [{view: [chat.CONTENT, html.TABLE], list: can.core.List(list, function(hour, row) { + can.ui.table = can.page.Append(can, can.ui.content, [{view: [chat.CONTENT, html.TABLE], list: can.core.List(list, function(hour, row) { return {type: html.TR, list: can.core.List(head, function(week, col) { if (row == 0) { return {text: [can.user.trans(can, week), html.TH]} } if (col == 0) { return {text: [hour, html.TH]} } return can.onimport._task(can, msg, get(begin_time, col, row, hash), set(begin_time, col, row)) })} - }) }]); if (!can.sup.task) { return } + }) }])._target; if (!can.sup.task) { return } can.onmotion.delay(can, function() { var target = can.sup.task._target; target && target.click(), can.Status(mdb.COUNT, msg.Length()) }) }, _task: function(can, msg, list, time) { return {text: ["", html.TD], @@ -115,13 +115,13 @@ Volcanos(chat.ONIMPORT, {_init: function(can, msg, target) { can.onmotion.clear( }, layout: function(can) { can.page.styleWidth(can, can.ui.content, can.ConfWidth()-can.ui.project.offsetWidth-can.ui.profile.offsetWidth) + can.page.styleWidth(can, can.ui.table, can.ConfWidth()-can.ui.project.offsetWidth-can.ui.profile.offsetWidth) if (true || !can.isAutoMode() || can.isStoryType()) { can.page.styleHeight(can, can._output, can.ConfHeight()) var height = can._display_heights[can.sup.task? [can.sup.task.zone, can.sup.task.id].join(ice.FS): ""]||html.ACTION_HEIGHT - if (can.ui.display.innerHTML && can.ui.display.style.display != html.NONE) { - can.page.style(can, can.ui.content, html.HEIGHT, can.ConfHeight()-height) - } else { - can.page.style(can, can.ui.content, html.HEIGHT, can.ConfHeight()) - } + if (!can.ui.display.innerHTML || can.ui.display.style.display == html.NONE) { height = 0 } + can.page.style(can, can.ui.table, html.HEIGHT, can.ConfHeight()-height) + can.page.style(can, can.ui.content, html.HEIGHT, can.ConfHeight()-height) + can.ui.display.innerHTML && can.ui.display.style.display != html.NONE && can.core.List(can._plugins_display, function(sub) { sub.onimport.size(sub, can.ConfHeight()-can.ui.content.offsetHeight-html.ACTION_HEIGHT-sub.onexport.statusHeight(sub), sub.ConfWidth(can.ConfWidth()-can.ui.project.offsetWidth), true) })