mirror of
https://shylinux.com/x/volcanos
synced 2025-04-25 16:58:06 +08:00
add some
This commit is contained in:
parent
63538d7bf9
commit
c12d47c82d
8
frame.js
8
frame.js
@ -121,7 +121,7 @@ Volcanos(chat.ONAPPEND, {_init: function(can, meta, list, cb, target, field) {
|
|||||||
Status: function(key, value) { if (can.base.isObject(key)) { return can.core.Item(key, sub.Status), key }
|
Status: function(key, value) { if (can.base.isObject(key)) { return can.core.Item(key, sub.Status), key }
|
||||||
can.page.Select(can, status, [[[html.SPAN, key]]], function(target) {
|
can.page.Select(can, status, [[[html.SPAN, key]]], function(target) {
|
||||||
if (can.base.beginWith(value, ice.PS, ice.HTTP)) { value = can.page.Format(html.A, value) }
|
if (can.base.beginWith(value, ice.PS, ice.HTTP)) { value = can.page.Format(html.A, value) }
|
||||||
return can.base.isUndefined(value)? (value = target.innerHTML): (target.innerHTML = value||"")
|
return can.base.isUndefined(value)? (value = target.innerHTML): (target.innerHTML = value.trim? value.trim(): value||"")
|
||||||
}); return value
|
}); return value
|
||||||
},
|
},
|
||||||
Action: function(key, value) { return can.page.SelectArgs(can, action, key, value)[0] },
|
Action: function(key, value) { return can.page.SelectArgs(can, action, key, value)[0] },
|
||||||
@ -225,6 +225,7 @@ Volcanos(chat.ONAPPEND, {_init: function(can, meta, list, cb, target, field) {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
_output: function(can, msg, display, output, action, cb) { display = display||chat.PLUGIN_TABLE_JS, output = output||can._output
|
_output: function(can, msg, display, output, action, cb) { display = display||chat.PLUGIN_TABLE_JS, output = output||can._output
|
||||||
|
can.misc.Search(can, log.DEBUG) == ice.TRUE && can.base.beginWith(display, "/require/src/") && delete(Volcanos.meta.cache[display])
|
||||||
Volcanos(display, {_root: can._root, _follow: can.core.Keys(can._follow, display), _fields: can._target, _target: output,
|
Volcanos(display, {_root: can._root, _follow: can.core.Keys(can._follow, display), _fields: can._target, _target: output,
|
||||||
_legend: can._legend, _option: can._option, _action: can._action, _output: output, _status: can._status,
|
_legend: can._legend, _option: can._option, _action: can._action, _output: output, _status: can._status,
|
||||||
Update: can.Update, Option: can.Option, Action: can.Action, Status: can.Status,
|
Update: can.Update, Option: can.Option, Action: can.Action, Status: can.Status,
|
||||||
@ -254,7 +255,7 @@ Volcanos(chat.ONAPPEND, {_init: function(can, meta, list, cb, target, field) {
|
|||||||
can.core.List(can.base.Obj(list, can.core.Value(can, [chat.ONEXPORT, mdb.LIST])), function(item) { item = can.base.isString(item)? {name: item}: item
|
can.core.List(can.base.Obj(list, can.core.Value(can, [chat.ONEXPORT, mdb.LIST])), function(item) { item = can.base.isString(item)? {name: item}: item
|
||||||
if (can.base.beginWith(item.value, ice.PS, ice.HTTP)) { item.value = can.page.Format(html.A, item.value, item.value.split("?")[0]) }
|
if (can.base.beginWith(item.value, ice.PS, ice.HTTP)) { item.value = can.page.Format(html.A, item.value, item.value.split("?")[0]) }
|
||||||
can.page.Append(can, status, [{view: html.ITEM, list: [
|
can.page.Append(can, status, [{view: html.ITEM, list: [
|
||||||
{text: [item.name, html.LABEL]}, {text: [": ", html.LABEL]}, {text: [(item.value == undefined? "": item.value)+"", html.SPAN, item.name]},
|
{text: [item.name, html.LABEL]}, {text: [": ", html.LABEL]}, {text: [(item.value == undefined? "": item.value.trim())+"", html.SPAN, item.name]},
|
||||||
], onclick: function(event) { can.user.copy(event, can, item.value) }}])
|
], onclick: function(event) { can.user.copy(event, can, item.value) }}])
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@ -414,8 +415,7 @@ Volcanos(chat.ONAPPEND, {_init: function(can, meta, list, cb, target, field) {
|
|||||||
}); return list } ui.list = append(target, type, list||[html.PROJECT, [[html.CONTENT, html.PROFILE], html.DISPLAY]])
|
}); return list } ui.list = append(target, type, list||[html.PROJECT, [[html.CONTENT, html.PROFILE], html.DISPLAY]])
|
||||||
function calc(item, size, total) { return !ui.size[item]? can.base.isString(size)? parseInt(can.base.trimSuffix(size, "px")): size: ui.size[item] < 1? total*ui.size[item]: ui.size[item] }
|
function calc(item, size, total) { return !ui.size[item]? can.base.isString(size)? parseInt(can.base.trimSuffix(size, "px")): size: ui.size[item] < 1? total*ui.size[item]: ui.size[item] }
|
||||||
var defer = [], content_height, content_width; function layout(type, list, height, width) { var _width = width, _height = height; can.core.List(list, function(item) {
|
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.isArray(item)) { return } if (can.base.isObject(item)) { var meta = item; item = item._index }
|
||||||
if (can.base.isObject(item)) { var meta = item; item = item._index }
|
|
||||||
var target = ui[item]; if (!can.page.isDisplay(target)) { 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.CONTENT) { return defer.push(function() { can.page.style(can, target, html.HEIGHT, content_height = height, html.WIDTH, content_width = width) }) }
|
||||||
if (type == FLOW) { var h = calc(item, target.offsetHeight, height)
|
if (type == FLOW) { var h = calc(item, target.offsetHeight, height)
|
||||||
|
@ -75,7 +75,7 @@ Volcanos(chat.ONACTION, {_init: function(can, target) {
|
|||||||
layout: function(can, button, skip) { can.page.ClassList.del(can, can._target, can._layout||can.onlayout._storage(can)), can._header_tabs && can.onmotion.hidden(can, can._header_tabs)
|
layout: function(can, button, skip) { can.page.ClassList.del(can, can._target, can._layout||can.onlayout._storage(can)), can._header_tabs && can.onmotion.hidden(can, can._header_tabs)
|
||||||
button = (can.onlayout._storage(can, can._layout = button == ice.AUTO? "": button))||can.misc.SearchOrConf(can, html.LAYOUT), can.page.ClassList.add(can, can._target, button)
|
button = (can.onlayout._storage(can, can._layout = button == ice.AUTO? "": button))||can.misc.SearchOrConf(can, html.LAYOUT), can.page.ClassList.add(can, can._target, button)
|
||||||
can.onengine.signal(can, chat.ONLAYOUT, can.request({}, {layout: button})), can._root.River && can._river_show === false && can.onmotion.hidden(can, can._root.River._target), skip || can.onlayout._init(can)
|
can.onengine.signal(can, chat.ONLAYOUT, can.request({}, {layout: button})), can._root.River && can._river_show === false && can.onmotion.hidden(can, can._root.River._target), skip || can.onlayout._init(can)
|
||||||
can.core.List(can._plugins, function(sub) { sub._delay_refresh = false, can.page.ClassList.set(can, sub._target, html.OUTPUT, [TABVIEW, HORIZON, VERTICAL].indexOf(button) > -1) })
|
can.isCmdMode() || can.core.List(can._plugins, function(sub) { sub._delay_refresh = false, can.page.ClassList.set(can, sub._target, html.OUTPUT, [TABVIEW, HORIZON, VERTICAL].indexOf(button) > -1) })
|
||||||
var cb = can.onlayout[button]; can.base.isFunc(cb) && cb(can) || can.onlayout._plugin(can, button)
|
var cb = can.onlayout[button]; can.base.isFunc(cb) && cb(can) || can.onlayout._plugin(can, button)
|
||||||
},
|
},
|
||||||
_menus: [[html.LAYOUT, ice.AUTO, TABS, TABVIEW, HORIZON, VERTICAL, GRID, FREE, FLOW, PAGE]],
|
_menus: [[html.LAYOUT, ice.AUTO, TABS, TABVIEW, HORIZON, VERTICAL, GRID, FREE, FLOW, PAGE]],
|
||||||
|
@ -27,8 +27,8 @@ fieldset.inner>div.output>div.layout>div.layout div.content * { font-family:mono
|
|||||||
fieldset.inner>div.output>div.layout>div.layout>div.profile { max-width:unset; }
|
fieldset.inner>div.output>div.layout>div.layout>div.profile { max-width:unset; }
|
||||||
fieldset.inner>div.output>div.layout>div.layout>div.profile div.status>div { padding:5px; float:left; }
|
fieldset.inner>div.output>div.layout>div.layout>div.profile div.status>div { padding:5px; float:left; }
|
||||||
fieldset.inner>div.output>div.layout>div.display div.status>div { padding:5px; float:left; }
|
fieldset.inner>div.output>div.layout>div.display div.status>div { padding:5px; float:left; }
|
||||||
fieldset.inner.cmd>div.output>div.project>div.zone>div.item { font-style:italic; font-weight:bold; line-height:32px; }
|
fieldset.inner>div.output>div.project>div.zone>div.item { font-style:italic; font-weight:bold; line-height:32px; }
|
||||||
fieldset.inner.cmd>div.output>div.project>div.zone>div.item>span.icon { font-style:normal; font-weight:normal; }
|
fieldset.inner>div.output>div.project>div.zone>div.item>span.icon { font-style:normal; font-weight:normal; }
|
||||||
fieldset.inner.cmd>div.output>div.layout>div.tabs { height:38px; display:block; overflow:hidden; }
|
fieldset.inner.cmd>div.output>div.layout>div.tabs { height:38px; display:block; overflow:hidden; }
|
||||||
fieldset.inner.cmd>div.output>div.layout>div.tabs.hide { display:none; }
|
fieldset.inner.cmd>div.output>div.layout>div.tabs.hide { display:none; }
|
||||||
fieldset.inner.cmd>div.output>div.layout>div.tabs>div { padding:10px; height:38px; float:left; }
|
fieldset.inner.cmd>div.output>div.layout>div.tabs>div { padding:10px; height:38px; float:left; }
|
||||||
@ -47,6 +47,10 @@ fieldset.inner.cmd>div.output>div.layout>div.path span.view { font-size:22px; li
|
|||||||
fieldset.inner.cmd>div.output>div.layout>div.plug { height:32px; clear:both; position:fixed; bottom:0; right:0; }
|
fieldset.inner.cmd>div.output>div.layout>div.plug { height:32px; clear:both; position:fixed; bottom:0; right:0; }
|
||||||
fieldset.inner.cmd>div.output>div.layout>div.plug>legend { font-size:1rem; padding:0 10px; float:right; }
|
fieldset.inner.cmd>div.output>div.layout>div.plug>legend { font-size:1rem; padding:0 10px; float:right; }
|
||||||
fieldset.inner.cmd>div.output>div.layout>div.display>div.status { position:sticky; bottom:0; }
|
fieldset.inner.cmd>div.output>div.layout>div.display>div.status { position:sticky; bottom:0; }
|
||||||
|
fieldset.inner.cmd>legend { display:none; }
|
||||||
|
fieldset.inner.cmd>form.option { display:none; }
|
||||||
|
fieldset.inner.cmd>div.action { display:none; }
|
||||||
|
fieldset.inner.cmd>div.status { display:none; }
|
||||||
body.dark fieldset.inner>div.output div.content td.text span.comment { color:green; }
|
body.dark fieldset.inner>div.output div.content td.text span.comment { color:green; }
|
||||||
body.dark fieldset.inner>div.output div.content td.text span.keyword { color:royalblue; }
|
body.dark fieldset.inner>div.output div.content td.text span.keyword { color:royalblue; }
|
||||||
body.dark fieldset.inner>div.output div.content td.text span.datatype { color:lavender; }
|
body.dark fieldset.inner>div.output div.content td.text span.datatype { color:lavender; }
|
||||||
|
@ -148,29 +148,27 @@ Volcanos(chat.ONIMPORT, {_init: function(can, msg, cb) { var paths = can.core.Sp
|
|||||||
project: function(can, path) { can.onmotion.clear(can, can.ui.project), can.onimport.zone(can, can.core.Item(can.onfigure, function(name, cb) {
|
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) }} }
|
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.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)
|
profile: function(can, msg) { var _msg = can.db.tabview[can.onexport.keys(can)]; _msg.Option(html.WIDTH, msg.Option(html.WIDTH)), border = 1
|
||||||
if (msg.Result().indexOf("<iframe src=") > -1) { if (_msg._profile != can.ui._profile) { can.page.Remove(can, _msg._profile) }
|
if (msg.Result().indexOf("<iframe src=") > -1) { if (_msg._profile != can.ui._profile) { can.page.Remove(can, _msg._profile) }
|
||||||
var src = can.page.Select(can, can.page.Create(can, html.DIV, msg.Result()), html.IFRAME, function(target) { return target.src })[0]
|
var src = can.page.Select(can, can.page.Create(can, html.DIV, msg.Result()), html.IFRAME, function(target) { return target.src })[0]
|
||||||
can.ui.profile = _msg._profile = can.page.Append(can, can.ui._profile.parentNode, [{view: [html.PROFILE, html.IFRAME], src: src}])._target
|
can.ui.profile = _msg._profile = can.page.Append(can, can.ui._profile.parentNode, [{view: [html.PROFILE, html.IFRAME], src: src}])._target
|
||||||
can.onmotion.toggle(can, can.ui.profile, true), can.onimport.layout(can)
|
can.onmotion.toggle(can, can.ui.profile, true), can.onimport.layout(can)
|
||||||
} else { var height = can.ui.profile.offsetHeight||can.ui._content.offsetHeight; can.ui.profile = _msg._profile = can.ui._profile
|
} else {
|
||||||
var width = can.onexport.size(can, _msg.Option(html.WIDTH), can.ConfWidth()-can.ui.project.offsetWidth)
|
var height = (can.ui.content._root||can.ui.content).offsetHeight, width = can.onexport.size(can, _msg.Option(html.WIDTH)||0.5, can.ConfWidth()-can.ui.project.offsetWidth)+border
|
||||||
can.onimport.process(can, msg, can.ui.profile, height, width, function(sub) { can.ui.profile._plugin = can._msg._profile = sub
|
can.page.style(can, can.ui.profile, html.MAX_HEIGHT, height, html.MAX_WIDTH, width), can.ui.profile = _msg._profile = can.ui._profile
|
||||||
can.page.style(can, sub._output, html.MAX_WIDTH, ""); var _width = can.base.Max(sub._target.offsetWidth, width)
|
can.onimport.process(can, msg, can.ui.profile, height, width-border, function(sub) { can.page.style(can, sub._output, html.MAX_WIDTH, ""), can.ui.profile._plugin = _msg._profile = sub
|
||||||
_msg.Option(html.WIDTH, _width), can.onimport.layout(can), sub.onimport.size(sub, height, _width == width? _width-1: _width, true)
|
if (sub._index == web.WIKI_WORD) { can.page.style(can, can.ui.profile, html.WIDTH, width+border, html.MAX_WIDTH, width+border), can.onimport.layout(can); return }
|
||||||
|
can.page.style(can, can.ui.profile, html.WIDTH, width+border, html.MAX_WIDTH, width+border), can.onimport.layout(can); return
|
||||||
|
var _width = can.base.Max(sub._target.offsetWidth+border, width); _msg.Option(html.WIDTH, _width), sub.onimport.size(sub, height, _width-border, true), can.onimport.layout(can)
|
||||||
})
|
})
|
||||||
msg.Append(ctx.INDEX) == "" && can.page.Select(can, can.ui.profile, html.TABLE, function(target) { can.onmotion.delay(can, function() {
|
|
||||||
if (target.offsetWidth < can.ui._profile.offsetWidth) { _msg.Option(html.WIDTH, target.offsetWidth+1), can.onimport.layout(can) }
|
|
||||||
}) })
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
display: function(can, msg) { var _msg = can.db.tabview[can.onexport.keys(can)]; _msg.Option(html.HEIGHT, msg.Option(html.HEIGHT))
|
display: function(can, msg) { var _msg = can.db.tabview[can.onexport.keys(can)]; _msg.Option(html.HEIGHT, msg.Option(html.HEIGHT)), border = 1
|
||||||
var height = can.onexport.size(can, _msg.Option(html.HEIGHT)||0.5, can.ui._content.offsetHeight||can.ConfHeight()); can.page.style(can, can.ui.display, html.MAX_HEIGHT, height)
|
var height = can.onexport.size(can, _msg.Option(html.HEIGHT)||0.5, can.ui.project.offsetHeight||can.ConfHeight())+border, width = can.ConfWidth()-can.ui.project.offsetWidth
|
||||||
var width = can.ConfWidth()-can.ui.project.offsetWidth
|
can.page.style(can, can.ui.display, html.MAX_HEIGHT, height, html.MAX_WIDTH, width), can.ui.display = _msg._display = can.ui._display
|
||||||
can.onimport.process(can, msg, can.ui.display, height, width, function(sub) { if (sub.ConfHeight() < can.ui._content.offsetHeight-100) { can.page.style(can, sub._output, html.MAX_HEIGHT, "") }
|
can.onimport.process(can, msg, can.ui.display, height-border, width, function(sub) { can.page.style(can, sub._output, html.MAX_HEIGHT, ""), can.ui.display._plugin = _msg._display = sub
|
||||||
can.onmotion.delay(can, function() { var _height = can.base.Max(sub._target.offsetHeight, height)
|
if (sub._index == web.WIKI_WORD) { can.page.style(can, can.ui.display, html.HEIGHT, height+border, html.MAX_HEIGHT, height+border), can.onimport.layout(can); return }
|
||||||
_msg.Option(html.HEIGHT, _height), can.onimport.layout(can), sub.onimport.size(sub, _height == height? _height-1: _height, width, true)
|
var _height = can.base.Max(sub._target.offsetHeight+border, height); _msg.Option(html.HEIGHT, _height), sub.onimport.size(sub, _height-border, width, true), can.onimport.layout(can)
|
||||||
})
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
process: function(can, msg, target, height, width, cb) { can.onmotion.clear(can, target)
|
process: function(can, msg, target, height, width, cb) { can.onmotion.clear(can, target)
|
||||||
@ -179,11 +177,6 @@ Volcanos(chat.ONIMPORT, {_init: function(can, msg, cb) { var paths = can.core.Sp
|
|||||||
can.onimport.plug(can, item, function(sub) {
|
can.onimport.plug(can, item, function(sub) {
|
||||||
sub.onaction.close = function() { can.onmotion.hidden(can, target), can.onimport.layout(can) }
|
sub.onaction.close = function() { can.onmotion.hidden(can, target), can.onimport.layout(can) }
|
||||||
sub.onexport.output = function(_sub, _msg) { can.onmotion.delay(can, function() { can.base.isFunc(cb) && cb(_sub, _msg) }) }
|
sub.onexport.output = function(_sub, _msg) { can.onmotion.delay(can, function() { can.base.isFunc(cb) && cb(_sub, _msg) }) }
|
||||||
sub.run = function(event, cmds, cb) { can.runActionCommand(event, item.index, cmds, function(msg) {
|
|
||||||
if (sub == (msg._can._fields? msg._can.sup: msg._can)) { if (cmds && cmds[0] == ctx.ACTION) {
|
|
||||||
if (can.base.isIn(cmds[1], mdb.IMPORT, mdb.EXPORT, "imports", "exports")) { return can.user.toastSuccess(can, cmds[1]), sub.Update() }
|
|
||||||
} } can.base.isFunc(cb) && cb(msg)
|
|
||||||
}) }
|
|
||||||
}, target)
|
}, target)
|
||||||
})
|
})
|
||||||
} else if (msg.Option(ice.MSG_DISPLAY) != "") {
|
} else if (msg.Option(ice.MSG_DISPLAY) != "") {
|
||||||
@ -271,6 +264,11 @@ Volcanos(chat.ONLAYOUT, {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
Volcanos(chat.ONSYNTAX, {_init: function(can, msg, cb) { var key = can.onexport.keys(can), path = msg.Option(nfs.PATH, can.Option(nfs.PATH)), file = msg.Option(nfs.FILE, can.Option(nfs.FILE))
|
Volcanos(chat.ONSYNTAX, {_init: function(can, msg, cb) { var key = can.onexport.keys(can), path = msg.Option(nfs.PATH, can.Option(nfs.PATH)), file = msg.Option(nfs.FILE, can.Option(nfs.FILE))
|
||||||
|
can.onmotion.cache(can, function(cache_data, cache_key) {
|
||||||
|
if (cache_key) { cache_data[cache_key] = {profile: can.ui.profile.className, display: can.ui.display.className} }
|
||||||
|
var back = cache_data[key]; if (back) { can.ui.profile.className = back.profile, can.ui.display.className = back.display } else { can.onmotion.hidden(can, can.ui.profile), can.onmotion.hidden(can, can.ui.display) }
|
||||||
|
return key
|
||||||
|
}, can.ui.profile, can.ui.display)
|
||||||
if (msg._content) { var list = can.page.Select(can, msg._content, html.DIV_CONTENT, function(target) { if (target._cache_key == key) { return target } })
|
if (msg._content) { var list = can.page.Select(can, msg._content, html.DIV_CONTENT, function(target) { if (target._cache_key == key) { return target } })
|
||||||
if (list.length > 0) { can.onmotion.select(can, msg._content, html.DIV_CONTENT, list[0]) } else {
|
if (list.length > 0) { can.onmotion.select(can, msg._content, html.DIV_CONTENT, list[0]) } else {
|
||||||
var list = can.page.Select(can, msg._content, html.DIV_CONTENT, function(target) { if (target._cache && target._cache[key]) { return target } })
|
var list = can.page.Select(can, msg._content, html.DIV_CONTENT, function(target) { if (target._cache && target._cache[key]) { return target } })
|
||||||
@ -298,7 +296,10 @@ Volcanos(chat.ONSYNTAX, {_init: function(can, msg, cb) { var key = can.onexport.
|
|||||||
var index = msg.Option(ctx.INDEX).split(mdb.FS), item = {type: chat.STORY, index: index[0], args: index.slice(1)}
|
var index = msg.Option(ctx.INDEX).split(mdb.FS), item = {type: chat.STORY, index: index[0], args: index.slice(1)}
|
||||||
if (item.index == web.CODE_XTERM && item.args.length > 0) { item.style = html.OUTPUT }
|
if (item.index == web.CODE_XTERM && item.args.length > 0) { item.style = html.OUTPUT }
|
||||||
can.onimport.plug(can, item, function(sub) { sub.onimport.size(sub, can.ui.content.offsetHeight, can.ui.content.offsetWidth, true)
|
can.onimport.plug(can, item, function(sub) { sub.onimport.size(sub, can.ui.content.offsetHeight, can.ui.content.offsetWidth, true)
|
||||||
sub.onimport._open = function(sub, msg, arg) { can.onimport.tabview(can, "", arg, web.SPACE), sub.Update() }
|
sub.onimport._open = function(_, msg, arg) {
|
||||||
|
var link = can.misc.ParseURL(can, arg); if (link.pod) { can.onimport.tabview(can, "", link.pod, web.SPACE), sub.Update(); return }
|
||||||
|
can.onimport.tabview(can, "", arg, web.SPACE), sub.Update()
|
||||||
|
}
|
||||||
sub.onaction.close = function() { msg._tab._close() }
|
sub.onaction.close = function() { msg._tab._close() }
|
||||||
sub.onexport.title = function(_, title) { can.page.Modify(can, can.page.SelectOne(can, msg._tab, html.SPAN_NAME), title) }
|
sub.onexport.title = function(_, title) { can.page.Modify(can, can.page.SelectOne(can, msg._tab, html.SPAN_NAME), title) }
|
||||||
sub.onexport.record = function(_, value, key, item) { item.file && can.onimport.tabview(can, item.path, item.file, item.line); return true }
|
sub.onexport.record = function(_, value, key, item) { item.file && can.onimport.tabview(can, item.path, item.file, item.line); return true }
|
||||||
|
@ -7,8 +7,8 @@ fieldset.vimer>div.output>div.layout>div.layout div.content div.complete div.pre
|
|||||||
fieldset.vimer>div.output>div.layout>div.layout div.content div.complete table.content thead { display:none; }
|
fieldset.vimer>div.output>div.layout>div.layout div.content div.complete table.content thead { display:none; }
|
||||||
fieldset.vimer>div.output>div.layout>div.layout div.content div.complete table.content { padding-left:5px; width:unset; max-width:600px; display:block; }
|
fieldset.vimer>div.output>div.layout>div.layout div.content div.complete table.content { padding-left:5px; width:unset; max-width:600px; display:block; }
|
||||||
fieldset.vimer>div.output>div.layout>div.layout>div.layout div.content { border-left:gray solid 1px; border-top:gray solid 1px; }
|
fieldset.vimer>div.output>div.layout>div.layout>div.layout div.content { border-left:gray solid 1px; border-top:gray solid 1px; }
|
||||||
fieldset.vimer>div.output>div.layout>div.layout>div.layout div.content.normal.select { border:blue solid 1px; }
|
// fieldset.vimer>div.output>div.layout>div.layout>div.layout div.content.normal.select { border:blue solid 1px; }
|
||||||
fieldset.vimer>div.output>div.layout>div.layout>div.layout div.content.insert.select { border:red solid 1px; }
|
// fieldset.vimer>div.output>div.layout>div.layout>div.layout div.content.insert.select { border:red solid 1px; }
|
||||||
fieldset.vimer>div.output>div.layout>div.layout div.content.normal tr.line.select>td.line { background-color:blue; color:white; }
|
fieldset.vimer>div.output>div.layout>div.layout div.content.normal tr.line.select>td.line { background-color:blue; color:white; }
|
||||||
fieldset.vimer>div.output>div.layout>div.layout div.content.insert tr.line.select>td.line { background-color:red; color:white; }
|
fieldset.vimer>div.output>div.layout>div.layout div.content.insert tr.line.select>td.line { background-color:red; color:white; }
|
||||||
fieldset.vimer>div.output>div.layout>div.layout div.content.insert div.complete:not(.hide) { display:block; top:unset; }
|
fieldset.vimer>div.output>div.layout>div.layout div.content.insert div.complete:not(.hide) { display:block; top:unset; }
|
||||||
|
@ -19,11 +19,12 @@ Volcanos(chat.ONIMPORT, {_init: function(can, msg, cb) { can.require(["inner.js"
|
|||||||
_value: function(can) { can.onimport.__tabPath(can, true), can.db.mode == mdb.INSERT && can.onmotion.delay(can, function() { can.current.text(can.ui.current.value) }) },
|
_value: function(can) { can.onimport.__tabPath(can, true), can.db.mode == mdb.INSERT && can.onmotion.delay(can, function() { can.current.text(can.ui.current.value) }) },
|
||||||
}, [""])
|
}, [""])
|
||||||
Volcanos(chat.ONFIGURE, {
|
Volcanos(chat.ONFIGURE, {
|
||||||
source: function(can, target, zone, path) { var args = can.base.getValid(can.misc.SearchHash(can), [can.Option(nfs.PATH), can.Option(nfs.FILE)])
|
source: function(can, target, zone, path) {
|
||||||
|
var args = can.base.getValid(can.misc.SearchHash(can), [can.Option(nfs.PATH), can.Option(nfs.FILE)])
|
||||||
function show(target, zone, path) { can.run(can.request({}, {dir_root: path, dir_deep: true}), [nfs.PWD], function(msg) {
|
function show(target, zone, path) { can.run(can.request({}, {dir_root: path, dir_deep: true}), [nfs.PWD], function(msg) {
|
||||||
zone._icon(kit.Dict(
|
zone._icon(kit.Dict(
|
||||||
web.REFRESH, function(event) { show(target, zone, path) },
|
web.REFRESH, function(event) { show(target, zone, path) },
|
||||||
mdb.CREATE, function(event) { can.user.carteRight(event, can, can.onaction, [nfs.MODULE, nfs.SCRIPT]) },
|
mdb.CREATE, function(event, button) { can.onaction.module(event, can, nfs.MODULE) },
|
||||||
)), zone._total(msg.Length()), can.onmotion.clear(can, target)
|
)), zone._total(msg.Length()), can.onmotion.clear(can, target)
|
||||||
var cache, list = can.core.List(msg.Table(), function(item) { if (path == args[0] && args[1].indexOf(item.path) == 0) { item.expand = true }
|
var cache, list = can.core.List(msg.Table(), function(item) { if (path == args[0] && args[1].indexOf(item.path) == 0) { item.expand = true }
|
||||||
item._init = function(target) { item._remove = function() { can.page.Remove(can, target.parentNode), delete(cache[item.path]) }
|
item._init = function(target) { item._remove = function() { can.page.Remove(can, target.parentNode), delete(cache[item.path]) }
|
||||||
@ -31,7 +32,7 @@ Volcanos(chat.ONFIGURE, {
|
|||||||
for (var _target = target.parentNode; _target != zone._target; _target = _target.parentNode) { _target.previousSibling && can.onappend.style(can, mdb.MODIFY, _target.previousSibling) }
|
for (var _target = target.parentNode; _target != zone._target; _target = _target.parentNode) { _target.previousSibling && can.onappend.style(can, mdb.MODIFY, _target.previousSibling) }
|
||||||
}) }
|
}) }
|
||||||
}, item._menu = shy(kit.Dict(
|
}, item._menu = shy(kit.Dict(
|
||||||
mdb.CREATE, function(event, button) { can.Update(can.request(event, {path: path+item.path}), [ctx.ACTION, nfs.SCRIPT], function(msg) { show(target, zone, path) }) },
|
mdb.CREATE, function(event, button) { can.onaction.script(can.request(event, {path: path}), can, nfs.SCRIPT) },
|
||||||
nfs.TRASH, function(event, button) { can.runAction(event, nfs.TRASH, [path+item.path], function(msg) { show(target, zone, path) }) },
|
nfs.TRASH, function(event, button) { can.runAction(event, nfs.TRASH, [path+item.path], function(msg) { show(target, zone, path) }) },
|
||||||
)); return item
|
)); return item
|
||||||
}); cache = can.onimport.tree(can, list, nfs.PATH, nfs.PS, function(event, item) { can.onimport.tabview(can, path, item.path) }, target, cache)
|
}); cache = can.onimport.tree(can, list, nfs.PATH, nfs.PS, function(event, item) { can.onimport.tabview(can, path, item.path) }, target, cache)
|
||||||
@ -48,7 +49,10 @@ Volcanos(chat.ONFIGURE, {
|
|||||||
))
|
))
|
||||||
}) },
|
}) },
|
||||||
space: function(can, target, zone) { can.onimport._zone(can, zone, web.DREAM, function(sub, msg) {
|
space: function(can, target, zone) { can.onimport._zone(can, zone, web.DREAM, function(sub, msg) {
|
||||||
sub.onimport._open = function(sub, msg, arg) { can.onimport.tabview(can, "", arg, web.SPACE) }
|
sub.onimport._open = function(_, msg, arg) {
|
||||||
|
var link = can.misc.ParseURL(can, arg); if (link.pod) { can.onimport.tabview(can, "", link.pod, web.SPACE), sub.Update(); return }
|
||||||
|
can.onimport.tabview(can, "", arg, web.SPACE)
|
||||||
|
}
|
||||||
sub.onexport.record = function(sub, value, key) { can.onimport.tabview(can, "", value, web.SPACE) }
|
sub.onexport.record = function(sub, value, key) { can.onimport.tabview(can, "", value, web.SPACE) }
|
||||||
can.page.Select(can, sub._output, html.DIV_ITEM, function(target, index) { can.onappend.style(can, msg.status[index], target) })
|
can.page.Select(can, sub._output, html.DIV_ITEM, function(target, index) { can.onappend.style(can, msg.status[index], target) })
|
||||||
}) },
|
}) },
|
||||||
@ -65,6 +69,7 @@ Volcanos(chat.ONFIGURE, {
|
|||||||
Volcanos(chat.ONACTION, {list: ["编译", "变更", "源码", "终端", "导图", "计划", "收藏", "首页"],
|
Volcanos(chat.ONACTION, {list: ["编译", "变更", "源码", "终端", "导图", "计划", "收藏", "首页"],
|
||||||
_run: function(event, can, button, args, cb) { can.runAction(event, button, args, cb||function(msg) {
|
_run: function(event, can, button, args, cb) { can.runAction(event, button, args, cb||function(msg) {
|
||||||
can.onimport.tabview(can, msg.Option(nfs.PATH), msg.Option(nfs.FILE)), can.user.toastSuccess(can, button)
|
can.onimport.tabview(can, msg.Option(nfs.PATH), msg.Option(nfs.FILE)), can.user.toastSuccess(can, button)
|
||||||
|
can.ui.zone.source.refresh()
|
||||||
}) },
|
}) },
|
||||||
_runs: function(event, can, button, cb) { var meta = can.Conf(); can.request(event, {action: button})
|
_runs: function(event, can, button, cb) { var meta = can.Conf(); can.request(event, {action: button})
|
||||||
can.user.input(event, can, meta.feature[button], function(args) { can.onaction._run(event, can, button, args, cb) })
|
can.user.input(event, can, meta.feature[button], function(args) { can.onaction._run(event, can, button, args, cb) })
|
||||||
@ -100,7 +105,8 @@ Volcanos(chat.ONACTION, {list: ["编译", "变更", "源码", "终端", "导图"
|
|||||||
var sub = can.db.toolkit[list[0]]; sub? sub.select(): can.onimport.exts(can, list[0])
|
var sub = can.db.toolkit[list[0]]; sub? sub.select(): can.onimport.exts(can, list[0])
|
||||||
}) },
|
}) },
|
||||||
"编译": function(event, can) { can.onaction.compile(event, can, code.COMPILE) },
|
"编译": function(event, can) { can.onaction.compile(event, can, code.COMPILE) },
|
||||||
"变更": function(event, can) { can.onimport.tabview(can, "", [web.CODE_GIT_REPOS, can.core.Split(can.Option(nfs.PATH), nfs.PS).pop(), nfs.MASTER, "index", can.Option(nfs.FILE)].join(mdb.FS), ctx.INDEX) },
|
// "变更": function(event, can) { can.onimport.tabview(can, "", [web.CODE_GIT_REPOS, can.core.Split(can.Option(nfs.PATH), nfs.PS).pop(), nfs.MASTER, "index", can.Option(nfs.FILE)].join(mdb.FS), ctx.INDEX) },
|
||||||
|
"变更": function(event, can) { can.onimport.tabview(can, "", web.CODE_GIT_STATUS, ctx.INDEX) },
|
||||||
"源码": function(event, can) { can.onimport.tabview(can, "", web.CODE_GIT_REPOS, ctx.INDEX) },
|
"源码": function(event, can) { can.onimport.tabview(can, "", web.CODE_GIT_REPOS, ctx.INDEX) },
|
||||||
"终端": function(event, can) { can.onimport.tabview(can, "", web.CODE_XTERM, ctx.INDEX) },
|
"终端": function(event, can) { can.onimport.tabview(can, "", web.CODE_XTERM, ctx.INDEX) },
|
||||||
"导图": function(event, can) { can.onimport.tabview(can, "", web.WIKI_DRAW, ctx.INDEX) },
|
"导图": function(event, can) { can.onimport.tabview(can, "", web.WIKI_DRAW, ctx.INDEX) },
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
fieldset.word>form.option>div.item>input[name=path] { width:320px; }
|
fieldset.word.plugin>form.option>div.item>input[name=path] { width:320px; }
|
||||||
body.mobile fieldset.word>form.option>div.item>input[name=path] { width:180px; }
|
body.mobile fieldset.word>form.option>div.item>input[name=path] { width:180px; }
|
||||||
body.webview fieldset.word>form.option>div.item>input[name=path] { width:160px; }
|
body.webview fieldset.word>form.option>div.item>input[name=path] { width:160px; }
|
||||||
fieldset.word>div.navmenu { background-color:inherit; overflow:auto; min-width:120px; clear:both; float:left; }
|
fieldset.word>div.navmenu { background-color:inherit; overflow:auto; min-width:120px; clear:both; float:left; }
|
||||||
|
@ -71,7 +71,7 @@ Volcanos(chat.ONIMPORT, {_init: function(can, msg, target) { can.onmotion.clear(
|
|||||||
},
|
},
|
||||||
plug: function(can, meta, cb, target, field) { if (!meta || !meta.index) { return }
|
plug: function(can, meta, cb, target, field) { if (!meta || !meta.index) { return }
|
||||||
meta.type = meta.type||html.PLUG, meta.name = meta.index, can.onappend.plugin(can, meta, function(sub) { sub.sup = can
|
meta.type = meta.type||html.PLUG, meta.name = meta.index, can.onappend.plugin(can, meta, function(sub) { sub.sup = can
|
||||||
can.page.style(can, sub._output, html.MAX_WIDTH, sub.ConfWidth(can.ConfWidth()))
|
// can.page.style(can, sub._output, html.MAX_WIDTH, sub.ConfWidth(can.ConfWidth()))
|
||||||
// can.page.style(can, sub._output, html.MAX_HEIGHT, sub.ConfHeight(can.ConfHeight()-2*html.ACTION_HEIGHT), html.MAX_WIDTH, sub.ConfWidth(can.ConfWidth()))
|
// can.page.style(can, sub._output, html.MAX_HEIGHT, sub.ConfHeight(can.ConfHeight()-2*html.ACTION_HEIGHT), html.MAX_WIDTH, sub.ConfWidth(can.ConfWidth()))
|
||||||
sub.run = function(event, cmds, cb) { if (can.page.Select(can, sub._option, "input[name=path]").length > 0 && sub.Option(nfs.PATH) == "") { sub.request(event, {path: nfs.PWD}) }
|
sub.run = function(event, cmds, cb) { if (can.page.Select(can, sub._option, "input[name=path]").length > 0 && sub.Option(nfs.PATH) == "") { sub.request(event, {path: nfs.PWD}) }
|
||||||
can.runActionCommand(can.request(event, can.Option()), meta.index, cmds, cb)
|
can.runActionCommand(can.request(event, can.Option()), meta.index, cmds, cb)
|
||||||
@ -79,6 +79,7 @@ Volcanos(chat.ONIMPORT, {_init: function(can, msg, target) { can.onmotion.clear(
|
|||||||
}, target, field)
|
}, target, field)
|
||||||
},
|
},
|
||||||
_zone: function(can, zone, index, cb, field) { zone._delay_init = function() { can.onimport.plug(can, {index: index, style: html.OUTPUT, mode: mdb.ZONE, field: field}, function(sub) {
|
_zone: function(can, zone, index, cb, field) { zone._delay_init = function() { can.onimport.plug(can, {index: index, style: html.OUTPUT, mode: mdb.ZONE, field: field}, function(sub) {
|
||||||
|
sub.run = function(event, cmds, cb) { can.request(event, {mode: mdb.ZONE}), can.runActionCommand(event, index, cmds, cb) }
|
||||||
var action = can.core.List(sub.Conf(ctx.INPUTS), function(item) { if (item.type == html.BUTTON && [ice.LIST, ice.BACK].indexOf(item.name) == -1) { return item.name } })
|
var action = can.core.List(sub.Conf(ctx.INPUTS), function(item) { if (item.type == html.BUTTON && [ice.LIST, ice.BACK].indexOf(item.name) == -1) { return item.name } })
|
||||||
zone._icon(kit.Dict(
|
zone._icon(kit.Dict(
|
||||||
can.page.unicode.refresh, function(event) { sub.Update(event) },
|
can.page.unicode.refresh, function(event) { sub.Update(event) },
|
||||||
|
Loading…
x
Reference in New Issue
Block a user