forked from x/volcanos
opt some
This commit is contained in:
parent
9148445d60
commit
4a083e6b85
10
frame.js
10
frame.js
@ -371,6 +371,8 @@ Volcanos(chat.ONAPPEND, {_init: function(can, meta, list, cb, target, field) {
|
||||
{type: html.DIV_ACTION, list: [{type: html.DIV_ITEM, name: [html.HOVER], style: [GLASS_STYLE]}]},
|
||||
{type: html.DIV_OUTPUT, style: [OUTPUT_STYLE]},
|
||||
{type: "div.path", style: [OUTPUT_STYLE]},
|
||||
{type: "tr.line:hover>td.line", style: [ITEM_HOVER_STYLE]},
|
||||
{type: "tr.line.select>td.line", style: [ITEM_HOVER_STYLE]},
|
||||
{type: html.DIV_STATUS, style: {color: color.label}},
|
||||
{type: html.TABLE_LAYOUT, list: [{type: html.DIV_TOGGLE, style: [ITEM_HOVER_STYLE]}]},
|
||||
{type: html.TABLE_CONTENT, list: [{type: html.TH, style: [TABLE_HEAD_STYLE]}]},
|
||||
@ -389,9 +391,9 @@ Volcanos(chat.ONAPPEND, {_init: function(can, meta, list, cb, target, field) {
|
||||
{type: html.DIV_CODE, style: {border: color.border+SOLID}},
|
||||
{type: html.DIV_ITEM, name: [html.HOVER], style: [ITEM_HOVER_STYLE]},
|
||||
{type: html.DIV_ITEM, name: [html.SELECT], style: [ITEM_HOVER_STYLE]},
|
||||
{type: html.DIV_TABS, list: [{type: html.DIV, style: {"background-color": color.plugin}}]},
|
||||
{type: html.DIV_TABS, list: [{type: html.DIV, name: [html.HOVER], style: [OUTPUT_STYLE]}]},
|
||||
{type: html.DIV_TABS, list: [{type: html.DIV, name: [html.SELECT], style: [OUTPUT_STYLE]}]},
|
||||
{type: html.DIV_TABS, list: [{type: ">"+html.DIV, style: {"background-color": color.plugin}}]},
|
||||
{type: html.DIV_TABS, list: [{type: ">"+html.DIV, name: [html.HOVER], style: [OUTPUT_STYLE]}]},
|
||||
{type: html.DIV_TABS, list: [{type: ">"+html.DIV, name: [html.SELECT], style: [OUTPUT_STYLE]}]},
|
||||
{type: html.DIV_CARTE, list: [{type: html.DIV_ITEM, style: [TABLE_HEAD_STYLE, CARTE_ITEM_STYLE]}]},
|
||||
{type: html.DIV_CARTE, list: [{type: html.DIV_ITEM, name: [html.HOVER], style: [CARTE_ITEM_HOVER_STYLE]}]},
|
||||
{type: html.DIV_FLOAT, style: [PLUGIN_STYLE]},
|
||||
@ -673,7 +675,7 @@ Volcanos(chat.ONMOTION, {_init: function(can, target) {
|
||||
|
||||
delayResize: function(can, target, key) {
|
||||
can.onmotion.delay(can, function() { can.page.Select(can, target, key, function(_target) {
|
||||
can.page.style(can, target, html.WIDTH, _target.offsetWidth, html.LEFT, (window.innerWidth-_target.offsetWidth)/2)
|
||||
can.page.style(can, target, html.WIDTH, _target.offsetWidth+10, html.LEFT, (window.innerWidth-_target.offsetWidth)/2)
|
||||
}) })
|
||||
},
|
||||
delayLong: function(can, cb, interval, key) { can.onmotion.delay(can, cb, interval||300, key) },
|
||||
|
@ -102,7 +102,7 @@ Volcanos("user", {info: {}, agent: {
|
||||
parent || can.page.Select(can, document.body, "div.carte.float", function(target) { can.onmotion.delay(can, function () { can.page.Remove(can, target) }) })
|
||||
function remove_sub(carte) { carte._sub && can.page.Remove(can, carte._sub._target), delete(carte._sub) }
|
||||
function click(event, item) { can.base.isFunc(cb)? cb(event, item, meta): meta[item] && meta[item](event, can, item), can.onkeymap.prevent(event), can.user.isMobile && can.page.Remove(can, ui._target) }
|
||||
var ui = can.page.Append(can, document.body, [{view: [[chat.CARTE, chat.FLOAT]], list: can.core.List(list, function(item, index) {
|
||||
var ui = can.page.Append(can, document.body, [{view: [[chat.CARTE, meta._style||"", chat.FLOAT]], list: can.core.List(list, function(item, index) {
|
||||
return can.base.isString(item)? item ==""? /* space */ {view: html.SPACE}: /* string */ {view: [html.ITEM, html.DIV, can.user.trans(can, item, trans)], onclick: function(event) { click(event, item) }, onmouseenter: function(event) { remove_sub(carte) } }:
|
||||
can.base.isArray(item)? /* array */ {view: html.ITEM, list: [{text: can.user.trans(can, item[0], trans)+" -> "}], onmouseenter: function(event) {
|
||||
var sub = can.user.carte(event, can, meta, item.slice(1), cb, carte, trans); can.onlayout.figure(event, can, sub._target, true), remove_sub(carte), carte._sub = sub
|
||||
|
@ -41,7 +41,7 @@ table.content th { background-color:steelblue; padding:2px 5px; }
|
||||
table.content td { padding:2px 5px; }
|
||||
table.content.action th:last-child { position:sticky; right:2px; }
|
||||
table.content.action td:last-child { background-color:steelblue; position:sticky; right:2px; }
|
||||
div.code { background-color:#343a3445; color:white; padding:10px; border:solid 2px green; }
|
||||
div.code { background-color:#343a3445; color:white; font-size:12px; padding:10px; border:green solid 1px; }
|
||||
div.story[data-type=spark] { background-color:#2169a9a6; color:white; padding:5px 10px; border-left:solid 5px blue; margin:10px; }
|
||||
/* fieldset */
|
||||
div.tabs div { background-color:gray; }
|
||||
@ -90,8 +90,8 @@ body>div.float { background-color:#0e3369b3; color:white; padding:5px; }
|
||||
body>div.toast div.title { color:yellow; float:left; }
|
||||
body>div.toast div.duration { color:gray; float:right; }
|
||||
body>div.toast div.content { color:yellow; text-align:center; }
|
||||
body>div.toast div.progress { border:solid 2px green; margin-left:-2px; height:10px; clear:both; }
|
||||
body>div.toast div.progress div.current { background-color:red; height:6px; }
|
||||
body>div.toast div.progress { border:green solid 1px; margin-left:-2px; height:20px; clear:both; }
|
||||
body>div.toast div.progress div.current { background-color:red; height:18px; }
|
||||
body>div.toast div.action { display:block; }
|
||||
body>div.toast div.action>div.item.space { height:unset; }
|
||||
body>div.carte { padding:0; }
|
||||
@ -107,12 +107,14 @@ body>div.input div.action div { margin:5px; float:right; }
|
||||
body>div.input.login { padding:10px; background-color:steelblue; min-width:240px; }
|
||||
body>div.input.login input[type=button] { width:90px; }
|
||||
body>div.upload div.item { float:left; }
|
||||
body>div.upload div.output { border:solid 1px red; }
|
||||
body>div.upload div.output { border:red solid 1px; }
|
||||
body>div.upload div.progress { background-color:red; height:10px; width:0; }
|
||||
body>div.upload div.status div.cost { float:left; }
|
||||
body>div.upload div.status div.show { float:right; }
|
||||
body>div.upload div.status div.size { text-align:center; }
|
||||
body>div.upload input[type=file] { width:320px; }
|
||||
div.tabs > img { height:16px; width:16px; margin-bottom:-3px; margin-left:10px; }
|
||||
div.tabs > img:hover { background-color:gray; }
|
||||
/* font */
|
||||
textarea { tab-size:2; height:62px; }
|
||||
legend { font-size:1.2rem; height:31px; }
|
||||
@ -281,7 +283,7 @@ div.layout.tabs.box>div.list { height:unset; }
|
||||
div.layout.tabs.box>div.tabs { background-color:steelblue; text-align:center; padding:3px; display:block; }
|
||||
/* table card */
|
||||
div.output.card div.item.stop { color:gray; }
|
||||
div.output.card div.item { padding:10px; border:solid 1px #e7e7e7; margin:10px; width:240px; float:left; }
|
||||
div.output.card div.item { padding:10px; border:#e7e7e7 solid 1px; margin:10px; width:240px; float:left; }
|
||||
div.output.card div.item>div.title { font-size:1.2rem; font-weight:bold; padding:10px; border-bottom:solid 1px #e7e7e7; }
|
||||
div.output.card div.item>div.content { padding:10px; height:45px; }
|
||||
body.white div.output.card div.item input[type=button] { background-color:#ff000000; }
|
||||
|
@ -72,7 +72,7 @@ div.main fieldset.plugin select { outline:none; box-shadow:none; }
|
||||
div.main fieldset.plugin form.option { display:block; clear:both; }
|
||||
div.main fieldset.plugin form.option div.item { margin:5px; }
|
||||
div.main fieldset.plugin div.action div.item { margin:5px; }
|
||||
div.main fieldset.plugin table.content tr { border:solid 1px lightgray; }
|
||||
div.main fieldset.plugin table.content tr { border:lightgray solid 1px; }
|
||||
div.main fieldset.plugin table.content tr:hover { background-color:whitesmoke; }
|
||||
div.main fieldset.plugin table.content th { background-color:whitesmoke; padding:10px; }
|
||||
div.main fieldset.plugin table.content td { background-color:white; padding:10px; }
|
||||
|
@ -113,7 +113,7 @@ Volcanos(chat.ONACTION, {
|
||||
logout: function(event, can) { can.user.logout(can) },
|
||||
})
|
||||
Volcanos(chat.ONEXPORT, {height: function(can) { return can._target.offsetHeight },
|
||||
topic: function(can) { return can._topic || can.misc.Search(can, chat.TOPIC) || (can.base.isNight()? chat.BLACK: chat.WHITE) },
|
||||
topic: function(can) { return can._topic || can.misc.Search(can, chat.TOPIC) || (can.base.isNight()? "dark": chat.WHITE) },
|
||||
background: function(can) { return can.user.info.background == "void"? "": can.user.info.background },
|
||||
avatar: function(can) { return can.user.info.avatar == "void"? "": can.user.info.avatar },
|
||||
})
|
||||
|
@ -25,12 +25,12 @@ fieldset.inner>div.output div.content td.text span.object { color:cyan; }
|
||||
fieldset.inner>div.output div.find.float { position:absolute; z-index:10; }
|
||||
fieldset.inner.cmd>div.output>div.layout.flow>div.tabs { height:38px; overflow:auto; display:block; }
|
||||
// fieldset.inner.cmd>div.output>div.layout.flow>div.tabs { background-color:#70809096; height:38px; overflow:auto; display:block; }
|
||||
fieldset.inner.cmd>div.output>div.layout.flow>div.tabs div { font-family:monospace; padding:10px 30px; height:38px; float:left; }
|
||||
fieldset.inner.cmd>div.output>div.layout.flow>div.tabs>div { font-family:monospace; padding:10px 30px; height:38px; float:left; }
|
||||
fieldset.inner.cmd>div.output>div.layout.flow>div.tabs div.avatar { padding:0; height:38px; float:right; }
|
||||
fieldset.inner.cmd>div.output>div.layout.flow>div.tabs div.avatar>img { height:38px; }
|
||||
fieldset.inner.cmd>div.output>div.layout.flow>div.tabs div.time { float:right; }
|
||||
fieldset.inner.cmd>div.output>div.layout.flow>div.path { font-family:monospace; padding:5px 10px; display:block; }
|
||||
fieldset.inner.cmd>div.output>div.layout.flow>div.path span.item { padding:3px 12px; }
|
||||
fieldset.inner.cmd>div.output>div.layout.flow>div.path span.item { padding:0px 5px; }
|
||||
fieldset.inner.cmd>div.output>div.layout.flow>div.path span.item:hover { background-color:cornflowerblue; cursor:pointer; }
|
||||
body.black fieldset.inner>div.output div.content td.text span.comment { background-color:blue; color:cyan; }
|
||||
// body.white fieldset.inner.cmd>div.output>div.layout.flow>div.tabs div { padding:10px 30px; }
|
||||
@ -81,6 +81,8 @@ body.white.simple fieldset.plugin div.output.json div.item span.nonce { color:li
|
||||
fieldset.word fieldset.inner>form.option input[name=path] { width:240px; }
|
||||
|
||||
fieldset.Action fieldset.plugin.cmd { border:none; }
|
||||
div.carte.path.float { font-size:14px; border-radius:0; }
|
||||
div.carte.path.float div.item { padding:5px; }
|
||||
|
||||
fieldset>div.output>fieldset.plug { position:absolute; bottom:0px; right:0px; }
|
||||
fieldset.cmd>div.output>fieldset.plug { position:fixed; bottom:0px; right:0px; }
|
||||
@ -101,13 +103,12 @@ body.dark fieldset.inner>div.output div.complete div.content { background-color:
|
||||
body.dark fieldset.inner>div.output div.complete table { background-color:#2a2a2a; }
|
||||
body.dark fieldset.inner>div.output input[type=button] { background-color:#1d6fa8; }
|
||||
body.dark fieldset.inner>div.output input:hover { background-color:#444444; color:white; outline:none; }
|
||||
body.dark fieldset.inner>div.output * { font-size:14px; line-height:20px; color:#d2d2d2; }
|
||||
body.dark fieldset.inner>div.output { font-size:14px; line-height:20px; color:#d2d2d2; }
|
||||
body.dark fieldset.inner>div.output legend { font-size:1rem; line-height:2rem; color:#d2d2d2; }
|
||||
body.dark fieldset.inner>div.output>div.layout.flow>div.tabs { height:40px; }
|
||||
body.dark fieldset.inner>div.output>div.layout.flow>div.tabs div { padding:10px 30px; }
|
||||
body.dark fieldset.inner>div.output>div.layout.flow>div.tabs>div { padding:10px 30px; }
|
||||
body.dark fieldset.inner>div.output>div.layout.flow>div.tabs div.avatar { height:40px; }
|
||||
body.dark fieldset.inner>div.output div.content tr.select td.line { border:solid 0px #494949; }
|
||||
body.dark fieldset.inner>div.output div.content td.line { background-color:#212121; border-right:solid 0px #494949; }
|
||||
body.dark fieldset.inner>div.output div.content td.text span.keyword { color:#5e99c9; font-weight:normal; }
|
||||
body.dark fieldset.inner>div.output div.content td.text span.constant { color:#bed3af; }
|
||||
body.dark fieldset.inner>div.output div.content td.text span.string { color:#d19b81; }
|
||||
|
@ -50,14 +50,14 @@ Volcanos(chat.ONIMPORT, {_init: function(can, msg, cb, target) { can.onmotion.cl
|
||||
},
|
||||
_tabInputs: function(can, ps, key, value, cb, target) {
|
||||
can.core.List(can.core.Split(value, ps), function(value, index, array) {
|
||||
can.page.Append(can, target, [{text: [value, html.SPAN, html.ITEM], onclick: function(event) {
|
||||
can.page.Append(can, target, [{text: [value+(index<array.length-1? ps: ""), html.SPAN, html.ITEM], onclick: function(event) {
|
||||
can.onimport.tabInputs(event, can, ps, key, array.slice(0, index).join(ps)+ps, cb)
|
||||
}}, index < array.length-1? {text: ps}: null])
|
||||
}}])
|
||||
})
|
||||
},
|
||||
tabInputs: function(event, can, ps, key, pre, cb, parent) {
|
||||
can.runAction(event, mdb.INPUTS, [key, pre], function(msg) { var _trans = {}
|
||||
var carte = can.user[parent? "carteRight": "carte"](event, can, {}, msg.Table(function(value) {
|
||||
var carte = can.user[parent? "carteRight": "carte"](event, can, {_style: nfs.PATH}, msg.Table(function(value) {
|
||||
var p = can.core.Split(value[key], ps).pop()+(can.base.endWith(value[key], ps)? ps: ""); return _trans[p] = value[key], p
|
||||
}), function(event, button) {
|
||||
can.base.endWith(button, ps)? can.onimport.tabInputs(event, can, ps, key, pre+button, cb, carte): cb(can.core.Split(_trans[button], ps))
|
||||
@ -66,6 +66,59 @@ Volcanos(chat.ONIMPORT, {_init: function(can, msg, cb, target) { can.onmotion.cl
|
||||
function remove(p) { if (p && p._sub) { remove(p._sub), can.page.Remove(can, p._sub), delete(p._sub) } } if (parent) { remove(parent), parent._sub = carte }
|
||||
})
|
||||
},
|
||||
_tabFunc: function(can, target) {
|
||||
function indent(text) { var indent = 0; for (var i = 0; i < text.length; i++) { switch (text[i]) {
|
||||
case ice.TB: indent+=4; break
|
||||
case ice.SP: indent++; break
|
||||
default: return indent
|
||||
} } }
|
||||
var package = "", block = "", list = [], current = "", percent = ""; can.page.Select(can, can.ui.content, "tr.line>td.text", function(item, index) {
|
||||
var text = item.innerText, _indent = indent(text)
|
||||
function push(item) { list.push(item)
|
||||
if (index < can.Option(nfs.LINE)) { current = list[list.length-1], percent = " = "+parseInt((index+1)*100/(can.max||1))+"%" }
|
||||
}
|
||||
if (can.parse == nfs.JS) {
|
||||
if (_indent == 0 && can.base.beginWith(text, "Volcanos")) {
|
||||
var ls = can.core.Split(text, "\t ({:}),"); block = can.base.trimPrefix(ls[1], "chat.").toLowerCase()
|
||||
} else if (_indent == 4) {
|
||||
var ls = can.core.Split(text, "\t ({:}),"); ls[0] && push(block+ice.PT+ls[0]+ice.DF+(index+1))
|
||||
}
|
||||
} else if (can.parse == nfs.GO) {
|
||||
var ls = can.core.Split(text, "\t *", "({:})")
|
||||
if (_indent == 0) {
|
||||
switch (ls[0]) {
|
||||
case "package": package = ls[1]; break
|
||||
case "func": if (ls[1] == "(") { ls[1] = ls[2]+ice.PT+ls[5]
|
||||
if (ls[5].toLowerCase()[0] == ls[5][0]) {
|
||||
push("- "+ls[1]+ice.DF+(index+1))
|
||||
} else {
|
||||
push("+ "+ls[1]+ice.DF+(index+1))
|
||||
}
|
||||
break
|
||||
}
|
||||
case "type":
|
||||
case "var":
|
||||
if (ls[1].toLowerCase()[0] == ls[1][0]) {
|
||||
push("- "+ls[1]+ice.DF+(index+1))
|
||||
} else {
|
||||
push("+ "+package+"."+ls[1]+ice.DF+(index+1))
|
||||
}
|
||||
break
|
||||
}
|
||||
} else if (_indent == 4) {
|
||||
if (text.indexOf("MergeCommands(") > -1) { block = "cmds" } else if (text == "})") { block = "" }
|
||||
} else if (_indent == 8) {
|
||||
if (block == "cmds" && ls[1] == ice.DF) { push("+ "+package+ice.PT+ls[0]+ice.DF+(index+1)), block = package+ice.PT+ls[0] }
|
||||
} else if (_indent == 12) {
|
||||
if (block && ls[1] == ice.DF) { push("+ "+block+ice.SP+ls[0]+ice.DF+(index+1)) }
|
||||
}
|
||||
}
|
||||
}); (can.parse == nfs.JS || can.parse == nfs.GO) && can.page.Append(can, target, [{view: [html.ITEM, html.SPAN, (current||"function")+" / "+can.max+percent], onclick: function(event) {
|
||||
can.user.carte(event, can, {_style: nfs.PATH}, list, function(ev, button) {
|
||||
can.onimport.tabview(can, can.Option(nfs.PATH), can.Option(nfs.FILE), can.core.Split(button, ice.DF)[1])
|
||||
})
|
||||
}}])
|
||||
},
|
||||
tabview: function(can, path, file, line, cb) { var key = can.onexport.keys(can, path, file)
|
||||
function isCommand() { return line == ctx.INDEX || path == ctx.COMMAND }
|
||||
function isDream() { return line == web.DREAM }
|
||||
@ -85,7 +138,7 @@ Volcanos(chat.ONIMPORT, {_init: function(can, msg, cb, target) { can.onmotion.cl
|
||||
} else {
|
||||
can.onimport.tabview(can, ls.slice(0, 2).join(ice.PS)+ice.PS, ls.slice(2).join(ice.PS))
|
||||
}
|
||||
}, can.ui.path)
|
||||
}, can.ui.path), can.onimport._tabFunc(can, can.ui.path)
|
||||
}
|
||||
can.page.SelectChild(can, can.ui._content.parentNode, can.page.Keys(html.DIV_CONTENT, [[[html.IFRAME, html.CONTENT]]]), function(item) {
|
||||
if (can.onmotion.toggle(can, item, item == msg._content)) { can.ui.content = msg._content }
|
||||
@ -126,7 +179,7 @@ Volcanos(chat.ONIMPORT, {_init: function(can, msg, cb, target) { can.onmotion.cl
|
||||
can.ui.profile = sup._profile = can.page.Append(can, can.ui._profile.parentNode, [{view: [html.PROFILE, html.IFRAME], src: msg.Append(mdb.LINK)}])._target
|
||||
can.onmotion.toggle(can, can.ui.profile, true), can.onimport.layout(can)
|
||||
} else { can.ui.profile = sup._profile = can.ui._profile
|
||||
can.onimport.process(can, msg, can.ui.profile, can.ui.profile.offsetHeight, can.db.profile_size[can.onexport.keys(can)]||(can.ConfWidth()-can.ui.project.offsetWidth)/2)
|
||||
can.onimport.process(can, msg, can.ui.profile, can.ui.profile.offsetHeight||can.ui.content.offsetHeight, can.db.profile_size[can.onexport.keys(can)]||(can.ConfWidth()-can.ui.project.offsetWidth)/2)
|
||||
can.page.Select(can, can.ui.profile, html.TABLE, function(target) { can.onmotion.delay(can, function() {
|
||||
if (target.offsetWidth < can.ui._profile.offsetWidth) { can.db.profile_size[can.onexport.keys(can)] = target.offsetWidth, can.onimport.layout(can) }
|
||||
}) })
|
||||
@ -143,7 +196,7 @@ Volcanos(chat.ONIMPORT, {_init: function(can, msg, cb, target) { can.onmotion.cl
|
||||
},
|
||||
process: function(can, msg, target, height, width, cb) { can.onmotion.clear(can, target)
|
||||
if (msg.Option(ice.MSG_PROCESS) == "_field") {
|
||||
msg.Table(function(item) { item.display = msg.Option(ice.MSG_DISPLAY), item.height = height-2*html.ACTION_HEIGHT
|
||||
msg.Table(function(item) { item.display = msg.Option(ice.MSG_DISPLAY), item.height = height-2*html.ACTION_HEIGHT, item.width = width
|
||||
can.onimport.plug(can, item, function(sub) {
|
||||
height && sub.ConfHeight(height-2*html.ACTION_HEIGHT), width && sub.ConfWidth(width)
|
||||
sub.onaction._output = function(_sub, _msg) { can.base.isFunc(cb) && cb(_sub, _msg) }
|
||||
@ -283,7 +336,7 @@ Volcanos(chat.ONACTION, {
|
||||
_getLine: function(can, line) { return can.page.Select(can, can.ui.content, "tr>td.line", function(td, index) { if (td.parentNode == line || index+1 == line) { return td.parentNode } })[0] },
|
||||
_getLineno: function(can, line) { return can.page.Select(can, can.ui.content, "tr>td.line", function(td, index) { if (td.parentNode == line || index+1 == line) { return index+1 } })[0] },
|
||||
appendLine: function(can, value) {
|
||||
var ui = can.page.Append(can, can.ui._content, [{type: html.TR, list: [
|
||||
var ui = can.page.Append(can, can.ui._content, [{type: html.TR, className: "line", list: [
|
||||
{view: [[nfs.LINE, "unselectable"], html.TD, ++can.max], onclick: function(event) {
|
||||
can.onaction.selectLine(can, ui.tr)
|
||||
}, ondblclick: function(event) {
|
||||
|
@ -4,6 +4,7 @@ fieldset.vimer>div.output input.current {
|
||||
}
|
||||
fieldset.vimer>div.output input.current.normal { caret-color:gray; }
|
||||
fieldset.vimer>div.output input.current.insert { caret-color:yellow; }
|
||||
fieldset.vimer>div.output div.project div.zone.recent div.list { max-height:240px; overflow:auto; }
|
||||
fieldset.vimer>div.output div.complete { overflow:auto; position:absolute; display:none; }
|
||||
fieldset.vimer>div.output div.complete.insert { display:block; }
|
||||
fieldset.vimer>div.output div.complete div.pre { color:#00000000; margin-left:5px; float:left; }
|
||||
|
@ -25,7 +25,7 @@ Volcanos(chat.ONFIGURE, {
|
||||
can.isCmdMode()? can.onappend._action(can, can.base.Obj(can._msg.Option(ice.MSG_ACTION)).concat(
|
||||
["首页", "官网" , "文档" , "git"], window.webview? ["浏览器", "录屏", "日志", "编辑器"]: []
|
||||
), target): can.onmotion.hidden(can, target.parentNode)
|
||||
can.sup.onexport.link = function(can) { var args = can.Option(); args.topic = chat.BLACK
|
||||
can.sup.onexport.link = function(can) { var args = can.Option()
|
||||
var meta = can.Conf(); args.cmd = meta.index||can.core.Keys(meta.ctx, meta.cmd)
|
||||
return can.misc.MergePodCmd(can, args, true)
|
||||
}
|
||||
@ -33,9 +33,14 @@ Volcanos(chat.ONFIGURE, {
|
||||
},
|
||||
recent: function(can, target, zone, path) { var total = 0
|
||||
function show(msg, cb) { var list = {}; msg.Table(function(item) { var path = item.path+item.file
|
||||
if (!list[path] && total < 10) { zone._total(++total), can.page.Append(can, target, cb(item, path)) } list[path] = item
|
||||
if (!list[path]) { zone._total(++total), can.page.Append(can, target, cb(item, path)) } list[path] = item
|
||||
}) }
|
||||
can.runAction({}, code.FAVOR, ["_recent_file"], function(msg) {
|
||||
msg.Push(nfs.PATH, ice.USR_VOLCANOS).Push(nfs.FILE, "frame.js")
|
||||
msg.Push(nfs.PATH, ice.USR_VOLCANOS).Push(nfs.FILE, "page/index.css")
|
||||
msg.Push(nfs.PATH, ice.USR_VOLCANOS).Push(nfs.FILE, "plugin/local/code/inner.js")
|
||||
msg.Push(nfs.PATH, ice.USR_VOLCANOS).Push(nfs.FILE, "plugin/local/code/vimer.js")
|
||||
msg.Push(nfs.PATH, ice.USR_ICEBERGS).Push(nfs.FILE, "core/code/vimer.go")
|
||||
show(msg, function(item, path) { return [{text: [path.split(ice.PS).slice(-2).join(ice.PS), html.DIV, html.ITEM], onclick: function(event) {
|
||||
can.onimport.tabview(can, item.path, item.file)
|
||||
}}] })
|
||||
|
@ -1,7 +1,7 @@
|
||||
fieldset.plan>div.output td.content { position:relative; }
|
||||
fieldset.plan>div.output table.content.plan th { font-family:unset; text-align:center; }
|
||||
fieldset.plan>div.output table.content.plan td { vertical-align:top; }
|
||||
fieldset.plan>div.output table.content.plan td.over { border:solid 2px red; }
|
||||
fieldset.plan>div.output table.content.plan td.over { border:red solid 1px; }
|
||||
fieldset.plan>div.output table.content.plan td div { color:white; }
|
||||
fieldset.plan>div.output table.content.plan td div.date { color:gray; }
|
||||
fieldset.plan>div.output table.content.plan td div.date span.lunar { font-size:12px; }
|
||||
|
@ -1,6 +1,6 @@
|
||||
div.output.json div.item:hover { background-color:#0000; }
|
||||
div.output.json div.item div.item { padding-left:15px; border:solid 1px #0000000d; border-left:dashed 1px lightblue; margin-left:5px; }
|
||||
div.output.json div.item div.item:hover { border:solid 1px red; }
|
||||
div.output.json div.item div.item { padding-left:15px; border:#0000000d solid 1px; border-left:lightblue dashed 1px; margin-left:5px; }
|
||||
div.output.json div.item div.item:hover { border:red solid 1px; }
|
||||
div.output.json div.item span.nonce { color:#9cbeca4f; cursor:pointer; }
|
||||
div.output.json div.item span.key { color:yellow; }
|
||||
div.output.json div.item span.string { color:magenta; }
|
||||
|
@ -106,9 +106,9 @@ Volcanos(chat.ONIMPORT, {_init: function(can, msg, cb, target) { can.onmotion.cl
|
||||
if (zone._delay_show) { zone._delay_show(zone._target), delete(zone._delay_show) }
|
||||
can.onmotion.toggle(can, zone._action), can.onmotion.toggle(can, zone._target)
|
||||
}, onmouseenter: function(event) {
|
||||
zone._menu && can.user.carteRight(event, can, zone._menu.meta, zone._menu.list||can.core.Item(zone._menu.meta), function(event, button, meta) {
|
||||
zone._menu? can.user.carteRight(event, can, zone._menu.meta, zone._menu.list||can.core.Item(zone._menu.meta), function(event, button, meta) {
|
||||
(meta[button]||can.onaction[button])(event, can, button)
|
||||
})
|
||||
}): can.page.Select(can, document.body, can.page.Keys("div.carte.float"), function(target) { can.page.Remove(can, target) })
|
||||
}},
|
||||
{view: html.ACTION, _init: function(target) { zone._action = target
|
||||
can.onappend._action(can, [{input: html.TEXT, placeholder: "search", onkeyup: function(event) {
|
||||
@ -132,11 +132,16 @@ Volcanos(chat.ONIMPORT, {_init: function(can, msg, cb, target) { can.onmotion.cl
|
||||
|
||||
tabs: function(can, list, cb, cbs, action, each) { action = action||can._action
|
||||
return can.page.Append(can, action, can.core.List(list, function(tabs) {
|
||||
return {text: [tabs.name, html.DIV, html.TABS], title: tabs.text, onclick: function(event) {
|
||||
return {view: html.TABS, list: [{text: [tabs.name, html.SPAN]}, {img: "/close.png", onclick: function(event) {
|
||||
item = event.target.parentNode
|
||||
var next = item.nextSibling||item.previousSibling; if (!next) { return }
|
||||
next.click(), can.onmotion.delay(can, function() { can.base.isFunc(cbs) && cbs(item._meta), can.page.Remove(can, item) })
|
||||
can.onkeymap.prevent(event)
|
||||
}}], title: tabs.text, onclick: function(event) {
|
||||
can.onmotion.select(can, action, html.DIV_TABS, event.target), can.base.isFunc(cb) && cb(event, tabs)
|
||||
}, _init: function(item) {
|
||||
function close(item) { var next = item.nextSibling||item.previousSibling; if (!next) { return }
|
||||
can.base.isFunc(cbs) && cbs(item._meta), can.page.Remove(can, item), next.click()
|
||||
next.click(), can.onmotion.delay(can, function() { can.base.isFunc(cbs) && cbs(item._meta), can.page.Remove(can, item) })
|
||||
}
|
||||
var menu = tabs._menu||shy({}, [], function(event, button, meta) { (meta[button])(event, can, button) })
|
||||
can.page.Modify(can, item, {draggable: true, _close: function() { close(item) }, _meta: tabs,
|
||||
@ -157,7 +162,7 @@ Volcanos(chat.ONIMPORT, {_init: function(can, msg, cb, target) { can.onmotion.cl
|
||||
},
|
||||
plug: function(can, meta, cb, target) { if (!meta || !meta.index) { return }
|
||||
meta.type = "plug", can.onappend.plugin(can, meta, function(sub) { sub.sup = can
|
||||
sub.ConfHeight(target.offsetHeight-2*html.ACTION_HEIGHT), sub.ConfWidth(target.offsetWidth)
|
||||
sub.ConfHeight(target.offsetHeight-2*html.ACTION_HEIGHT)
|
||||
can.page.style(can, sub._output, html.MAX_HEIGHT, sub.ConfHeight(), html.MAX_WIDTH, sub.ConfWidth())
|
||||
sub.run = function(event, cmds, cb) {
|
||||
if (can.page.Select(can, sub._option, "input[name=path]").length > 0 && sub.Option(nfs.PATH) == "") {
|
||||
|
Loading…
x
Reference in New Issue
Block a user