1
0
mirror of https://shylinux.com/x/volcanos synced 2025-04-25 16:58:06 +08:00
This commit is contained in:
harveyshao 2022-12-07 21:46:21 +08:00
parent ba256721af
commit 6c9d6564c2
4 changed files with 8 additions and 4 deletions

View File

@ -117,7 +117,8 @@ body>div.upload input[type=file] { width:320px; }
textarea { tab-size:2; height:60px; } textarea { tab-size:2; height:60px; }
legend { font-size:1.2rem; height:31px; } legend { font-size:1.2rem; height:31px; }
select, input { font-size:1.0rem; height:31px; } select, input { font-size:1.0rem; height:31px; }
table.content th, table.content td, div.zone>div.name, div.item, div.code, code.story, div.story[data-type=spark] { font-size:1.1rem; font-family:monospace; } table.content th, table.content td, div.zone>div.name, div.item, code.story, div.story[data-type=spark] { font-size:1.1rem; font-family:monospace; }
div.code { font-family:monospace; }
div.action>div.tabs { padding:5px 10px; height:21px; } div.action>div.tabs { padding:5px 10px; height:21px; }
div.status>div.item { padding:4px; height:22px; } div.status>div.item { padding:4px; height:22px; }
div.status>div.item>label { font-size:0.6rem; font-family:monospace; } div.status>div.item>label { font-size:0.6rem; font-family:monospace; }

View File

@ -17,7 +17,10 @@ Volcanos(chat.ONFIGURE, {key: {
onfocus: function(event, can, meta, target, cbs) { cbs(function(sub, cb) { if (sub.Status(mdb.TOTAL) > 0) { return } onfocus: function(event, can, meta, target, cbs) { cbs(function(sub, cb) { if (sub.Status(mdb.TOTAL) > 0) { return }
meta.msg && meta.msg.Length() > 0? sub._show(sub, meta.msg, cb, target, meta.name): sub._load(event, sub, cb, target, meta.name, target.value) meta.msg && meta.msg.Length() > 0? sub._show(sub, meta.msg, cb, target, meta.name): sub._load(event, sub, cb, target, meta.name, target.value)
}) }, }) },
onblur: function(event, can, sub) { can.onmotion.delay(can, function() { sub._delay_hidden || can.onmotion.hidden(can, sub._target), sub._delay_hidden = false }, 300) }, onblur: function(event, can, sub) { can.onmotion.delay(can, function() {
// sub._delay_hidden || can.onmotion.hidden(can, sub._target), sub._delay_hidden = false
sub._delay_hidden || sub.close(), sub._delay_hidden = false
}, 300) },
onkeydown: function(event, can, meta, cb, target, sub, last) { onkeydown: function(event, can, meta, cb, target, sub, last) {
if (event.key == lang.ENTER && meta._enter && (!can.page.tagis(event.target, html.TEXTAREA) || event.ctrlKey) && meta._enter(event)) { return sub.close() } if (event.key == lang.ENTER && meta._enter && (!can.page.tagis(event.target, html.TEXTAREA) || event.ctrlKey) && meta._enter(event)) { return sub.close() }
if (event.key == lang.ENTER) { return last(event) } if (event.key == lang.ENTER) { return last(event) }

View File

@ -168,7 +168,7 @@ Volcanos(chat.ONSYNTAX, {_init: function(can, msg, cb) {
}, },
_parse: function(can, line) { line = can.page.replace(can, line||"") _parse: function(can, line) { line = can.page.replace(can, line||"")
function wrap(text, type) { return can.page.Format(html.SPAN, text, type) } function wrap(text, type) { return can.page.Format(html.SPAN, text, type) }
var p = can.onsyntax[can.parse]; p = can.onsyntax[p.link]||p, p.split = p.split||{} var p = can.onsyntax[can.parse]||{}; p = can.onsyntax[p.link]||p, p.split = p.split||{}
p.keyword && (line = can.core.List(can.core.Split(line, p.split.space||"\t ", p.split.operator||"{[(,:;!?|<*>)]}", {detail: true}), function(item, index, array) { p.keyword && (line = can.core.List(can.core.Split(line, p.split.space||"\t ", p.split.operator||"{[(,:;!?|<*>)]}", {detail: true}), function(item, index, array) {
item = can.base.isObject(item)? item: {text: item}; var text = item.text, type = p.keyword[text] item = can.base.isObject(item)? item: {text: item}; var text = item.text, type = p.keyword[text]
switch (item.type||type) { switch (item.type||type) {

View File

@ -171,7 +171,7 @@ Volcanos(chat.ONSYNTAX, {
}, },
go: { go: {
split: { split: {
operator: "{([-+:!.,*])}", operator: "{([-+:;!.,*])}",
}, },
regexp: { regexp: {
"[0-9]+": code.CONSTANT, "[0-9]+": code.CONSTANT,