mirror of
https://shylinux.com/x/volcanos
synced 2025-04-25 08:48:06 +08:00
opt vimer
This commit is contained in:
parent
9efd9f6215
commit
bbfe26a28e
5
frame.js
5
frame.js
@ -331,9 +331,7 @@ Volcanos("onappend", {help: "渲染引擎", list: [], _init: function(can, meta,
|
||||
var name = (item.nick||item.name||"").split(ice.SP)[0]
|
||||
var title = !item.help || can.user.language(can) == "en"? name: name+"("+item.help.split(ice.SP)[0]+")"
|
||||
return can.page.Append(can, target||can._output, [{view: [can.base.join([type||"", item.name||"", item.pos||""]), html.FIELDSET], list: [
|
||||
name && {text: [title, html.LEGEND]},
|
||||
(can.user.mod.isCmd && type == chat.PLUGIN || type == chat.FLOAT) && {view: [html.LEGEND, html.DIV, title]},
|
||||
{view: [html.OPTION, html.FORM]}, {view: [html.ACTION]}, {view: [html.OUTPUT]}, {view: [html.STATUS]},
|
||||
{text: [title, html.LEGEND]}, {view: [html.OPTION, html.FORM]}, {view: [html.ACTION]}, {view: [html.OUTPUT]}, {view: [html.STATUS]},
|
||||
]}])
|
||||
},
|
||||
input: function(can, item, value, target, style) {
|
||||
@ -346,6 +344,7 @@ Volcanos("onappend", {help: "渲染引擎", list: [], _init: function(can, meta,
|
||||
var br = input.type == html.TEXTAREA? [{type: html.BR, style: {clear: html.BOTH}}]: []
|
||||
var title = can.Conf([ctx.FEATURE, chat.TITLE, item.name].join(ice.PT))||""; title && (input.title = title)
|
||||
return can.page.Append(can, target, ([{view: style||can.base.join([html.ITEM, item.type]), onkeydown: function(event) {
|
||||
item.type == "textarea" && event.key == "Tab" && can.onkeymap.insertText(event.target, "\t")
|
||||
item.type == "text" && can.onkeymap.input(event, can), can.onmotion.selectField(event, can)
|
||||
}, list: [input]}]).concat(br))[item.name]
|
||||
},
|
||||
|
@ -1,3 +1,9 @@
|
||||
* {
|
||||
tab-size:4;
|
||||
}
|
||||
textarea {
|
||||
tab-size:2;
|
||||
}
|
||||
body {
|
||||
margin:0; padding:0;
|
||||
background:black;
|
||||
@ -64,6 +70,7 @@ option {
|
||||
textarea {
|
||||
background-color:cyan;
|
||||
width:400px; height:60px;
|
||||
white-space:pre;
|
||||
}
|
||||
input[type=button] {
|
||||
background-color:black; color:cyan;
|
||||
@ -220,12 +227,6 @@ legend {
|
||||
fieldset {
|
||||
margin:0; border:0; padding:0;
|
||||
}
|
||||
fieldset>div.legend {
|
||||
float:left; padding:0 10px; margin-right:3px;
|
||||
height:25px; font-size:18px;
|
||||
background-color:darkcyan;
|
||||
cursor:pointer;
|
||||
}
|
||||
fieldset>form.option {
|
||||
float:left;
|
||||
display:contents;
|
||||
@ -384,7 +385,7 @@ fieldset.float {
|
||||
position:absolute;
|
||||
}
|
||||
fieldset.float>legend {
|
||||
display:none;
|
||||
float:left;
|
||||
}
|
||||
fieldset.float table {
|
||||
color:white;
|
||||
@ -407,6 +408,9 @@ body>fieldset.input.key {
|
||||
}
|
||||
body>fieldset.input.date {
|
||||
}
|
||||
body>fieldset.input.date legend {
|
||||
display:none;
|
||||
}
|
||||
body>fieldset.input.date table {
|
||||
text-align:center;
|
||||
width:280px;
|
||||
@ -585,9 +589,6 @@ body.white td>input[type=button][name=remove] {
|
||||
background-color:red;
|
||||
}
|
||||
|
||||
body.white fieldset>div.legend {
|
||||
/* background-color:honeydew; */
|
||||
}
|
||||
body.white fieldset>div.status>div.item>label {
|
||||
font-size:10px; color:#cefbfbe0;
|
||||
}
|
||||
|
@ -51,21 +51,12 @@ fieldset.Action.free>div.output fieldset.plugin.select {
|
||||
display:block;
|
||||
}
|
||||
|
||||
fieldset.panel.cmd>div.legend {
|
||||
display:none;
|
||||
}
|
||||
fieldset.panel.cmd>div.output>fieldset.plugin {
|
||||
margin:0; padding:0;
|
||||
}
|
||||
fieldset.panel.cmd>div.output>fieldset.plugin>legend {
|
||||
display:none;
|
||||
}
|
||||
fieldset.panel.cmd>div.output>fieldset.plugin>div.legend {
|
||||
float:left; padding:0 10px; margin-right:3px;
|
||||
height:25px; font-size:18px;
|
||||
background-color:darkcyan;
|
||||
cursor:pointer;
|
||||
}
|
||||
body.white fieldset.panel.cmd>div.output>fieldset.plugin>div.legend {
|
||||
background-color:honeydew;
|
||||
}
|
||||
|
@ -72,6 +72,7 @@ Volcanos("onimport", {help: "导入数据", list: [], _init: function(can, msg,
|
||||
msg.Option(aaa.BACKGROUND) && can.onlayout.background(can, "/share/local/background", document.body)
|
||||
},
|
||||
_avatar: function(can, msg) { if (can.user.isExtension || can.user.isLocalFile) { return }
|
||||
// can.page.Modify(can, "div.state.avatar>img", {src: "/share/local/avatar/"})
|
||||
msg.Option(aaa.AVATAR) && can.page.Modify(can, "div.state.avatar>img", {src: "/share/local/avatar"})
|
||||
},
|
||||
_menus: function(can, msg, target) {
|
||||
|
@ -38,7 +38,15 @@ Volcanos("onfigure", {help: "控件详情", list: [], key: {
|
||||
})
|
||||
})
|
||||
}
|
||||
switch (event.key) { case lang.ESCAPE: event.target.blur(); return }
|
||||
switch (event.key) {
|
||||
case lang.ESCAPE: event.target.blur(); return
|
||||
case lang.TAB:
|
||||
if (event.target.tagName == "TEXTAREA") {
|
||||
can.onkeymap.insertText(event.target, "\t")
|
||||
can.onkeymap.prevent(event)
|
||||
return
|
||||
}
|
||||
}
|
||||
can.base.isFunc(last) && last(event, can)
|
||||
},
|
||||
}})
|
||||
|
@ -91,7 +91,7 @@ fieldset.inner>div.output div.profile>div.output>fieldset {
|
||||
margin:0; padding:0;
|
||||
}
|
||||
fieldset.inner>div.output div.profile>div.output>fieldset>legend {
|
||||
display:none;
|
||||
float:left;
|
||||
}
|
||||
fieldset.inner>div.output div.display>div.output {
|
||||
clear:both; overflow:auto;
|
||||
@ -111,7 +111,7 @@ fieldset.inner>div.output fieldset.toolkit>div.output>fieldset.select {
|
||||
display:block;
|
||||
}
|
||||
fieldset.inner>div.output fieldset.toolkit>div.output>fieldset>legend {
|
||||
display:none;
|
||||
float:left;
|
||||
}
|
||||
fieldset.inner>div.output fieldset.toolkit>div.status>legend {
|
||||
float:right; padding:4px; cursor:pointer;
|
||||
@ -124,28 +124,8 @@ fieldset.inner>div.output fieldset.toolkit>div.status>legend.select {
|
||||
fieldset.inner>div.output fieldset.toolkit>div.status>legend:hover {
|
||||
background:green;
|
||||
}
|
||||
fieldset.inner>div.output fieldset.toolkit>div.status>div.legend {
|
||||
float:right; padding:4px; cursor:pointer;
|
||||
padding:4px 4px; border-left:solid 2px red;
|
||||
background:#0d969f8a;
|
||||
}
|
||||
fieldset.inner>div.output fieldset.toolkit>div.status>div.legend.select {
|
||||
background:green;
|
||||
}
|
||||
fieldset.inner>div.output fieldset.toolkit>div.status>div.legend:hover {
|
||||
background:green;
|
||||
}
|
||||
fieldset.inner>div.status div.legend {
|
||||
float:right; cursor:pointer;
|
||||
padding:4px 4px; border-left:solid 2px red;
|
||||
background:#0d969f8a;
|
||||
height:19px;
|
||||
}
|
||||
fieldset.inner>div.status div.legend.select {
|
||||
background:green;
|
||||
}
|
||||
fieldset.inner>div.status div.legend:hover {
|
||||
background:green;
|
||||
fieldset.inner>div.status {
|
||||
height:26px; overflow:auto;
|
||||
}
|
||||
fieldset.inner>div.status legend {
|
||||
float:right; padding:4px; cursor:pointer;
|
||||
@ -159,7 +139,7 @@ fieldset.inner>div.status legend:hover {
|
||||
background:green;
|
||||
}
|
||||
|
||||
fieldset.inner.full>div.legend {
|
||||
fieldset.inner.full>legend {
|
||||
display:none;
|
||||
}
|
||||
fieldset.inner.full>div.action {
|
||||
|
@ -6,7 +6,7 @@ Volcanos("onimport", {help: "导入数据", _init: function(can, msg, cb, target
|
||||
|
||||
var paths = can.core.Split(can.Option(nfs.PATH), ice.FS); can.Option(nfs.PATH, paths[0])
|
||||
var files = can.core.Split(can.Option(nfs.FILE), ice.FS); can.Option(nfs.FILE, files[0])
|
||||
can.tabview = can.tabview||{}, can.tabview[can.Option(nfs.PATH)+ice.DF+can.Option(nfs.FILE)] = msg
|
||||
can.tabview = can.tabview||{}, can.tabview[can.onexport.keys(can)] = msg
|
||||
can.history = can.history||[], can.toolkit = {}, can.extentions = {}, can.profile_size = {}
|
||||
|
||||
can.onmotion.clear(can), can.onlayout.profile(can)
|
||||
@ -36,7 +36,7 @@ Volcanos("onimport", {help: "导入数据", _init: function(can, msg, cb, target
|
||||
cli.CLOSE, function(event) { can.onmotion.hidden(can, target), can.onimport.layout(can) },
|
||||
"size", function(event) {
|
||||
can.user.input(event, can, ["size"], function(event, button, data) {
|
||||
can.profile_size[can.Option(nfs.PATH)+":"+can.Option(nfs.FILE)] = can.ConfWidth()*parseInt(data.size)/100
|
||||
can.profile_size[can.onexport.keys(can)] = can.ConfWidth()*parseInt(data.size)/100
|
||||
can.onaction["展示"](event, can)
|
||||
})
|
||||
},
|
||||
@ -66,8 +66,8 @@ Volcanos("onimport", {help: "导入数据", _init: function(can, msg, cb, target
|
||||
can.ui.toolkit = can.onappend.field(can, "toolkit", {}, can._output)
|
||||
},
|
||||
_session: function(can, msg) { can.onimport.sess(can, "", function() { can.onimport.sess(can, {
|
||||
exts: can.core.Split(msg.OptionOrSearch("exts")).reverse(),
|
||||
plug: can.core.Split(msg.OptionOrSearch("plug")).reverse(),
|
||||
exts: can.core.Split(msg.OptionOrSearch("exts")).reverse(),
|
||||
tabs: can.core.Split(msg.OptionOrSearch("tabs")),
|
||||
}) }) },
|
||||
_keydown: function(can) { can.onkeymap._build(can)
|
||||
@ -93,16 +93,17 @@ Volcanos("onimport", {help: "导入数据", _init: function(can, msg, cb, target
|
||||
can.base.isFunc(cb) && cb()
|
||||
})
|
||||
},
|
||||
tabview: function(can, path, file, line, cb) { var key = path+ice.DF+file
|
||||
if (can.tabview[key]) { can.user.mod.isCmd && can.user.title(path+file)
|
||||
tabview: function(can, path, file, line, cb, skip, skip2) { var key = can.onexport.keys(can, file, path)
|
||||
if (!skip && can.tabview[key]) { can.user.mod.isCmd && can.user.title(path+file)
|
||||
can._msg && can._msg.Option(nfs.LINE, can.Option(nfs.LINE)), can._msg = can.tabview[key]
|
||||
can.Option({path: path, file: file, line: line||can._msg.Option(nfs.LINE)||1})
|
||||
return can._msg.Option(can.Option()), can.onsyntax._init(can, can._msg, cb)
|
||||
return can._msg.Option(can.Option()), can.onsyntax._init(can, can._msg, cb, skip2)
|
||||
}
|
||||
|
||||
function show(msg) { can.tabview[key] = msg
|
||||
var skip2 = skip
|
||||
msg._tab = can.onappend.tabs(can, [{name: file.split(ice.PS).pop(), text: file}], function(event, meta) {
|
||||
can.onimport.tabview(can, path, file, "", cb), cb = null
|
||||
can.onimport.tabview(can, path, file, "", cb, false, skip2), cb = null, skip2 = false
|
||||
}, function(item) { delete(can.tabview[key]) })
|
||||
}
|
||||
|
||||
@ -110,9 +111,8 @@ Volcanos("onimport", {help: "导入数据", _init: function(can, msg, cb, target
|
||||
line == ctx.INDEX? show(can.request({}, {index: file, line: line})): can.run({}, [path, file], show, true)
|
||||
},
|
||||
profile: function(can, msg) {
|
||||
var width = can.profile_size[can.Option(nfs.PATH)+":"+can.Option(nfs.FILE)]||(can.ConfWidth()-can.ui.project.offsetWidth)/2
|
||||
var width = can.profile_size[can.onexport.keys(can)]||(can.ConfWidth()-can.ui.project.offsetWidth)/2
|
||||
msg && can.onimport.process(can, msg, can.ui.profile_output, width-32)
|
||||
can.page.styleWidth(can, can.ui.profile_output, width)
|
||||
can.onmotion.hidden(can, can.ui.profile, true), can.onimport.layout(can)
|
||||
},
|
||||
display: function(can, msg) {
|
||||
@ -135,7 +135,7 @@ Volcanos("onimport", {help: "导入数据", _init: function(can, msg, cb, target
|
||||
can.page.ClassList.del(can, sub._target, html.SELECT)
|
||||
return
|
||||
}
|
||||
can.onmotion.select(can, status, html.DIV_LEGEND, event.target)
|
||||
can.onmotion.select(can, status, html.LEGEND, event.target)
|
||||
can.onmotion.select(can, can.ui.toolkit.output, html.FIELDSET, sub._target)
|
||||
can.onmotion.focus(can, can.page.Select(can, sub._option, html.OPTION_ARGS)[0])
|
||||
}, can.base.isFunc(cb) && cb(sub)
|
||||
@ -172,6 +172,8 @@ Volcanos("onimport", {help: "导入数据", _init: function(can, msg, cb, target
|
||||
if (can.user.mod.isCmd) {
|
||||
can.page.styleHeight(can, can.ui.content, (can.ui.project.offsetHeight||height)-can.ui.display.offsetHeight)
|
||||
}
|
||||
|
||||
can.page.styleWidth(can, can.ui.profile_output, can.profile_size[can.onexport.keys(can)]||(width-can.ui.project.offsetWidth)/2)
|
||||
can.page.styleWidth(can, can.ui.content, width-can.ui.project.offsetWidth-can.ui.profile.offsetWidth-25)
|
||||
|
||||
if (can.page.ClassList.has(can, can._fields, "full")) {
|
||||
@ -180,12 +182,11 @@ Volcanos("onimport", {help: "导入数据", _init: function(can, msg, cb, target
|
||||
can.page.styleHeight(can, can.ui.profile_output, can.ui.content.offsetHeight-html.ACTION_HEIGHT)
|
||||
}
|
||||
can.page.Select(can, can.ui.profile_output, html.IFRAME, function(item) {
|
||||
can.page.style(can, item, html.HEIGHT, can.ui.profile_output.offsetHeight-5,
|
||||
|
||||
"position", "absolute",
|
||||
can.page.style(can, item,
|
||||
html.HEIGHT, can.ui.profile_output.offsetHeight-5,
|
||||
html.WIDTH, can.ui.profile_output.offsetWidth-5,
|
||||
"margin-top", "-12px",
|
||||
"margin-left", "-12px",
|
||||
"margin-left", "-12px", "margin-top", "-12px",
|
||||
"position", "absolute",
|
||||
)
|
||||
})
|
||||
},
|
||||
@ -195,14 +196,14 @@ Volcanos("onimport", {help: "导入数据", _init: function(can, msg, cb, target
|
||||
}) })
|
||||
},
|
||||
sess: function(can, sess, cb) { sess = sess||can.base.Obj(localStorage.getItem("web.code.inner.sess"), {})
|
||||
can.core.Next(sess.exts, function(item, next) { can.onimport.exts(can, item, next) }, function() {
|
||||
can.core.Next(sess.plug, function(item, next) { can.onimport.toolkit(can, {index: item}, function(sub) { can.toolkit[item] = sub, next() }) }, function() {
|
||||
can.core.Next(sess.plug, function(item, next) { can.onimport.toolkit(can, {index: item}, function(sub) { can.toolkit[item] = sub, next() }) }, function() {
|
||||
can.core.Next(sess.exts, function(item, next) { can.onimport.exts(can, item, next) }, function() {
|
||||
can.core.Next(sess.tabs, function(item, next) { var ls = item.split(ice.DF); can.onimport.tabview(can, ls[0], ls[1], ls[2], next) }, cb)
|
||||
})
|
||||
})
|
||||
},
|
||||
}, [""])
|
||||
Volcanos("onsyntax", {help: "语法高亮", list: ["keyword", "prefix", "line"], _init: function(can, msg, cb) {
|
||||
Volcanos("onsyntax", {help: "语法高亮", list: ["keyword", "prefix", "line"], _init: function(can, msg, cb, skip) {
|
||||
if (can.onmotion.cache(can, function(cache_data) {
|
||||
can.file && (cache_data[can.file] = {current: can.current, max: can.max,
|
||||
profile_display: can.ui.profile.style.display, display_display: can.ui.display.style.display,
|
||||
@ -218,7 +219,7 @@ Volcanos("onsyntax", {help: "语法高亮", list: ["keyword", "prefix", "line"],
|
||||
msg.Option(ctx.INDEX) && can.onmotion.focus(can, can.page.Select(can, can.ui.content, html.OPTION_ARGS)[0])
|
||||
})
|
||||
return can.file
|
||||
}, can.ui.content, can.ui.profile_output, can.ui.display_output)) {
|
||||
}, can.ui.content, can.ui.profile_output, can.ui.display_output) && !skip) {
|
||||
return can.onaction.selectLine(null, can, msg.Option(nfs.LINE)), can.base.isFunc(cb) && cb()
|
||||
}
|
||||
|
||||
@ -230,6 +231,7 @@ Volcanos("onsyntax", {help: "语法高亮", list: ["keyword", "prefix", "line"],
|
||||
})
|
||||
return
|
||||
}
|
||||
can.onmotion.clear(can, can.ui.content)
|
||||
|
||||
function init(p) { can.max = 0, can.core.List(can.ls = msg.Result().split(ice.NL), function(item) {
|
||||
can.onaction.appendLine(can, item)
|
||||
@ -299,7 +301,10 @@ Volcanos("onkeymap", {help: "导入数据", _init: function(can, msg, cb, target
|
||||
},
|
||||
}, _engine: {},
|
||||
})
|
||||
Volcanos("onaction", {help: "控件交互", list: ["搜索", "打开", "添加", "插件", "扩展"],
|
||||
Volcanos("onaction", {help: "控件交互", list: ["搜索", "打开", "添加", "插件", "扩展", "刷新"],
|
||||
"刷新": function(event, can) {
|
||||
can.onimport.tabview(can, "src/", "main.go", "", function() {}, skip)
|
||||
},
|
||||
"搜索": function(event, can) {
|
||||
can.user.input(event, can, [mdb.NAME, [ctx.ACTION, nfs.TAGS, nfs.GREP, cli.MAKE]], function(event, button, data) {
|
||||
can.ui.search.Update({}, [ctx.ACTION, data.action, data.name])
|
||||
@ -336,6 +341,9 @@ Volcanos("onaction", {help: "控件交互", list: ["搜索", "打开", "添加",
|
||||
}, true)
|
||||
},
|
||||
"展示": function(event, can) { can.onimport.profile(can), can.request(event, {_toast: "渲染中..."})
|
||||
if (can.Option(nfs.FILE).indexOf("website/") == 0) {
|
||||
can.profile_size[can.onexport.keys(can)] = can.profile_size[can.onexport.keys(can)] || can.ConfWidth()*parseInt(70)/100
|
||||
}
|
||||
can.run(event, [ctx.ACTION, mdb.RENDER, can.parse, can.Option(nfs.FILE), can.Option(nfs.PATH)], function(msg) {
|
||||
can.onimport.profile(can, msg)
|
||||
}, true)
|
||||
@ -345,11 +353,11 @@ Volcanos("onaction", {help: "控件交互", list: ["搜索", "打开", "添加",
|
||||
return can.page.Remove(can, item)
|
||||
}).length > 0) { return }
|
||||
|
||||
if (can.page.Select(can, can.ui.toolkit.status, "div.select", function(item) {
|
||||
if (can.page.Select(can, can.ui.toolkit.status, "legend.select", function(item) {
|
||||
return item.click(), item
|
||||
}).length > 0) { return }
|
||||
if (can.page.Select(can, can.ui.toolkit.output, "fieldset.select", function(item) {
|
||||
return can.onmotion.hidden(can, item), item
|
||||
if (can.page.Select(can, can._status, "legend.select", function(item) {
|
||||
return item.click(), item
|
||||
}).length > 0) { return }
|
||||
|
||||
if (can.ui.profile.style.display == "") {
|
||||
@ -459,6 +467,7 @@ Volcanos("onexport", {help: "导出数据", list: ["文件数", "解析器", "
|
||||
"tabs": can.onexport.tabs(can), "plug": can.onexport.plug(can), "exts": can.onexport.exts(can),
|
||||
}))
|
||||
},
|
||||
keys: function(can, file, path) { return (path||can.Option(nfs.PATH))+":"+(file||can.Option(nfs.FILE)) },
|
||||
tabs: function(can) { return can.core.Item(can.tabview, function(key, msg) { return key+ice.DF+msg.Option(nfs.LINE) }) },
|
||||
plug: function(can) { return can.core.Item(can.toolkit) },
|
||||
exts: function(can) { return can.core.Item(can.plugins) },
|
||||
|
@ -2,21 +2,21 @@ Volcanos("onimport", {help: "导入数据", _init: function(can, args, cb) {
|
||||
can.onimport.toolkit(can, {index: "web.code.template"}, function(sub) {
|
||||
sub.run = function(event, cmds, cb) { var msg = sub.request(event, can.Option())
|
||||
if (can.misc.runAction(can, msg, cmds, cb, kit.Dict(
|
||||
mdb.INPUTS, function(cmds) {
|
||||
msg.Push(nfs.FILE, can.Option(nfs.FILE))
|
||||
can.base.isFunc(cb) && cb(msg)
|
||||
},
|
||||
nfs.DEFS, function(cmds) {
|
||||
can.run(event, [ctx.ACTION, ice.RUN, "web.code.template", nfs.DEFS].concat(cmds), function(msg) {
|
||||
can.base.isFunc(cb) && cb(msg)
|
||||
can.onimport.project(can, can.Option(nfs.PATH))
|
||||
can.onimport.tabview(can, can.Option(nfs.PATH), cmds[1])
|
||||
}, true)
|
||||
can.user.input(event, can, can.base.Obj(msg.Option("args")||"[]"), function(ev, button, data, list, args) {
|
||||
var msg = can.request(event); can.core.Item(data, function(key, value) { msg.Option(key, value) })
|
||||
can.run(event, [ctx.ACTION, ice.RUN, "web.code.template", nfs.DEFS].concat(cmds), function(msg) {
|
||||
can.base.isFunc(cb) && cb(msg)
|
||||
can.onimport.project(can, can.Option(nfs.PATH))
|
||||
can.onimport.tabview(can, can.Option(nfs.PATH), msg.Option("main"), "", function() {
|
||||
can.onimport.tabview(can, can.Option(nfs.PATH), cmds[1], 1, function() {})
|
||||
}, true)
|
||||
}, true)
|
||||
})
|
||||
},
|
||||
))) { return }
|
||||
can.run(event, [ctx.ACTION, ice.RUN, "web.code.template"].concat(cmds), function(msg) {
|
||||
can.base.isFunc(cb) && cb(msg)
|
||||
can.onimport.project(can, can.Option(nfs.PATH))
|
||||
}, true)
|
||||
}, can.base.isFunc(cb) && cb(sub)
|
||||
})
|
||||
|
@ -82,8 +82,8 @@ Volcanos("onkeymap", {help: "键盘交互", list: [],
|
||||
o: function(event, can) { can.onkeymap._insert(event, can), can.onaction.selectLine(event, can, can.onaction.insertLine(can, "", can.current.next())) },
|
||||
O: function(event, can) { can.onkeymap._insert(event, can), can.onaction.selectLine(event, can, can.onaction.insertLine(can, "", can.current.line)) },
|
||||
|
||||
yy: function(event, can) { can._last_text = can.current.text() },
|
||||
dd: function(event, can) { can._last_text = can.current.text(), can.onaction.selectLine(event, can, can.onaction.deleteLine(can, can.current.line)) },
|
||||
yy: function(event, can, target, count) { can._last_text = can.current.text() },
|
||||
dd: function(event, can, target, count) { can._last_text = can.current.text(), can.onaction.selectLine(event, can, can.onaction.deleteLine(can, can.current.line)) },
|
||||
p: function(event, can) { can.onaction.insertLine(can, can._last_text, can.current.next()) },
|
||||
P: function(event, can) { can.onaction.insertLine(can, can._last_text, can.current.line) },
|
||||
|
||||
@ -124,7 +124,10 @@ Volcanos("onkeymap", {help: "键盘交互", list: [],
|
||||
},
|
||||
}, _engine: {},
|
||||
})
|
||||
Volcanos("onaction", {help: "控件交互", list: ["加载", nfs.SAVE, "autogen", "compile", "binpack"],
|
||||
Volcanos("onaction", {help: "控件交互", list: ["加载", nfs.SAVE, "autogen", "compile", "binpack", "刷新"],
|
||||
"刷新": function(event, can) {
|
||||
can.onimport.tabview(can, "src/", "main.go", "", function() {}, true)
|
||||
},
|
||||
"加载": function(event, can) {
|
||||
var file = "/share/local/"+can.Option(nfs.PATH)+can.Option(nfs.FILE)
|
||||
delete(Volcanos.meta.cache[file])
|
||||
|
@ -1,6 +1,3 @@
|
||||
fieldset.word>div.legend {
|
||||
display:none;
|
||||
}
|
||||
fieldset.word>div.output fieldset.span>fieldset {
|
||||
float:left; overflow:auto;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
Volcanos("onimport", {help: "导入数据", list: [], _init: function(can, msg, list, cb, target) {
|
||||
Volcanos("onimport", {help: "导入数据", list: [], _init: function(can, msg, cb, target) {
|
||||
can.onmotion.clear(can)
|
||||
can.onappend.table(can, msg)
|
||||
can.onappend.board(can, msg)
|
||||
|
3
proto.js
3
proto.js
@ -211,7 +211,6 @@ var html = {
|
||||
FIELDSET_HEAD: "fieldset.head", FIELDSET_FOOT: "fieldset.foot",
|
||||
FIELDSET_LEFT: "fieldset.left", FIELDSET_MAIN: "fieldset.main",
|
||||
FIELDSET_AUTO: "fieldset.auto", FIELDSET_FLOAT: "fieldset.float",
|
||||
DIV_LEGEND: "div.legend",
|
||||
|
||||
OPTION_ARGS: "select.args,input.args,textarea.args",
|
||||
INPUT_ARGS: "input.args,textarea.args",
|
||||
@ -314,7 +313,7 @@ var Volcanos = shy("火山架", {iceberg: "/chat/", volcano: "/frame.js", args:
|
||||
var msg = event._msg||can.misc.Message(event, can); event._msg = msg
|
||||
function set(key, value) { msg.Option(key) || value == "" || msg.Option(key, value) }
|
||||
|
||||
can.core.List(arguments, function(option, index) { if (index == 0) { return }
|
||||
can.core.List(arguments, function(option, index) { if (!option || index == 0) { return }
|
||||
can.base.isFunc(option.Option)? can.core.List(option.Option(), function(key) {
|
||||
set(key, option.Option(key))
|
||||
}): can.core.Item(can.base.isFunc(option)? option(): option, set)
|
||||
|
Loading…
x
Reference in New Issue
Block a user