mirror of
https://shylinux.com/x/volcanos
synced 2025-04-25 16:58:06 +08:00
add some
This commit is contained in:
parent
968f15104c
commit
c6a90754c3
2
const.js
2
const.js
@ -80,6 +80,7 @@ var mdb = {FOREACH: "*", RANDOMS: "%",
|
|||||||
SWITCH: "switch",
|
SWITCH: "switch",
|
||||||
NOTFOUND: "notfound",
|
NOTFOUND: "notfound",
|
||||||
NICK: "nick",
|
NICK: "nick",
|
||||||
|
HELP: "help",
|
||||||
DATA: "data", VIEW: "view",
|
DATA: "data", VIEW: "view",
|
||||||
INPUTS: "inputs", CREATE: "create", REMOVE: "remove", UPDATE: "update",
|
INPUTS: "inputs", CREATE: "create", REMOVE: "remove", UPDATE: "update",
|
||||||
INSERT: "insert", DELETE: "delete", MODIFY: "modify", SELECT: "select",
|
INSERT: "insert", DELETE: "delete", MODIFY: "modify", SELECT: "select",
|
||||||
@ -391,6 +392,7 @@ var html = {
|
|||||||
TABLE: "table", THEAD: "thead", TBODY: "tbody", TR: "tr", TH: "th", TD: "td",
|
TABLE: "table", THEAD: "thead", TBODY: "tbody", TR: "tr", TH: "th", TD: "td",
|
||||||
HEADER: "header", NAV: "nav", MAIN: "main", ASIDE: "aside", FOOTER: "footer",
|
HEADER: "header", NAV: "nav", MAIN: "main", ASIDE: "aside", FOOTER: "footer",
|
||||||
NEED: "need", MUST: "must",
|
NEED: "need", MUST: "must",
|
||||||
|
TAIL: "tail",
|
||||||
FAVICON: "favicon",
|
FAVICON: "favicon",
|
||||||
|
|
||||||
BACKGROUND_COLOR: "background-color", COLOR: "color",
|
BACKGROUND_COLOR: "background-color", COLOR: "color",
|
||||||
|
8
frame.js
8
frame.js
@ -317,7 +317,7 @@ Volcanos(chat.ONAPPEND, {
|
|||||||
if (_can == (msg._can._fields? msg._can.sup: msg._can)) { if (can.core.CallFunc([_can, chat.ONIMPORT, ice.MSG_PROCESS], {can: _can, msg: msg})) { return } }
|
if (_can == (msg._can._fields? msg._can.sup: msg._can)) { if (can.core.CallFunc([_can, chat.ONIMPORT, ice.MSG_PROCESS], {can: _can, msg: msg})) { return } }
|
||||||
if (cmds && cmds[0] == ctx.ACTION) { if (can.base.isIn(cmds[1], mdb.CREATE, mdb.INSERT, mdb.PRUNES, mdb.EXPORT, mdb.IMPORT, "exports", "imports", nfs.TRASH) || msg.Length() == 0 && !msg.Result()) {
|
if (cmds && cmds[0] == ctx.ACTION) { if (can.base.isIn(cmds[1], mdb.CREATE, mdb.INSERT, mdb.PRUNES, mdb.EXPORT, mdb.IMPORT, "exports", "imports", nfs.TRASH) || msg.Length() == 0 && !msg.Result()) {
|
||||||
if (can.base.isIn(cmds[1], ctx.COMMAND)) { return }
|
if (can.base.isIn(cmds[1], ctx.COMMAND)) { return }
|
||||||
return can._toast || can.user.toastSuccess(can, cmds[1], ice.SUCCESS), can.Update()
|
return can._toast || can.user.toastSuccess(can, can.user.trans(can, cmds[1]), ice.SUCCESS), can.Update()
|
||||||
} }
|
} }
|
||||||
can.onappend._output(can, msg, meta.display||msg.Option(ice.MSG_DISPLAY)||meta.feature.display)
|
can.onappend._output(can, msg, meta.display||msg.Option(ice.MSG_DISPLAY)||meta.feature.display)
|
||||||
})
|
})
|
||||||
@ -361,8 +361,8 @@ Volcanos(chat.ONAPPEND, {
|
|||||||
} msg.Defer(), can.base.isFunc(cb) && cb(msg), can.page.style(can, can._target, "visibility", ""),
|
} msg.Defer(), can.base.isFunc(cb) && cb(msg), can.page.style(can, can._target, "visibility", ""),
|
||||||
can._output.scrollTop = output_old.scrollTop, can._output.scrollLeft = output_old.scrollLeft
|
can._output.scrollTop = output_old.scrollTop, can._output.scrollLeft = output_old.scrollLeft
|
||||||
can.page.style(can, can._output, "visibility", "", "position", ""), can.page.Remove(can, output_old)
|
can.page.style(can, can._output, "visibility", "", "position", ""), can.page.Remove(can, output_old)
|
||||||
can.isCmdMode() && (can.user.agent.cmd = can)
|
can.isCmdMode() && (can.user.agent.cmd = can), can.isCmdMode() && can.user.agent.init && can.user.agent.init(can)
|
||||||
can.isCmdMode() && can.user.agent.init && can.user.agent.init(can)
|
can.page.Select(can, document.body, "div.loading", function(target) { can.onmotion.hidden(can, target) })
|
||||||
}, target: output}), msg.Defer()
|
}, target: output}), msg.Defer()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@ -648,6 +648,8 @@ Volcanos(chat.ONAPPEND, {
|
|||||||
function onclick() { run(event, mdb.MODIFY, [key, ice.FALSE]); return true }
|
function onclick() { run(event, mdb.MODIFY, [key, ice.FALSE]); return true }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (key == mdb.STATUS && value) { _value = can.user.trans(can, value, "", key) }
|
||||||
|
if (key == ctx.ACTION && !value && msg.IsDetail()) { return }
|
||||||
return {className: option.indexOf(key) > -1? ice.MSG_OPTION: key == ctx.ACTION? ctx.ACTION: "", text: [
|
return {className: option.indexOf(key) > -1? ice.MSG_OPTION: key == ctx.ACTION? ctx.ACTION: "", text: [
|
||||||
msg.IsDetail() && key == mdb.KEY? can.user.trans(can, _value, null, html.INPUT): _value, html.TD,
|
msg.IsDetail() && key == mdb.KEY? can.user.trans(can, _value, null, html.INPUT): _value, html.TD,
|
||||||
], onclick: function(event) { if (onclick()) { return } var target = event.target
|
], onclick: function(event) { if (onclick()) { return } var target = event.target
|
||||||
|
22
index.css
22
index.css
@ -110,11 +110,9 @@ body.width1 { /* 320-640 手机竖屏 */
|
|||||||
--table-button:2; --card-button:3;
|
--table-button:2; --card-button:3;
|
||||||
}
|
}
|
||||||
body.en { --card-button:3; }
|
body.en { --card-button:3; }
|
||||||
body.mobile {
|
body.mobile { --project-width:240px; --footer-height:60px; --svg-font-size:13px; }
|
||||||
--footer-height:60px; --svg-font-size:13px;
|
body.mobile.dark { --body-bg-color:var(--output-bg-color); --action-output-bg-color:var(--output-bg-color); }
|
||||||
--project-width:240px;
|
body.mobile.light { --body-bg-color:var(--output-bg-color); --action-output-bg-color:var(--output-bg-color); }
|
||||||
--body-bg-color:var(--plugin-bg-color);
|
|
||||||
}
|
|
||||||
body.cmd.web.code.vimer { --code-line-height:24px; }
|
body.cmd.web.code.vimer { --code-line-height:24px; }
|
||||||
/* element */
|
/* element */
|
||||||
* { box-sizing:border-box; padding:0; border:0; margin:0; tab-size:4; }
|
* { box-sizing:border-box; padding:0; border:0; margin:0; tab-size:4; }
|
||||||
@ -230,7 +228,6 @@ div.project div.item { position:relative; }
|
|||||||
div.project div.item.select { border-right:var(--item-notice); }
|
div.project div.item.select { border-right:var(--item-notice); }
|
||||||
div.project>div.item.select { position:sticky; top:32px; bottom:0; }
|
div.project>div.item.select { position:sticky; top:32px; bottom:0; }
|
||||||
div.project div.item:not(.hide) { white-space:pre; line-height:24px; cursor:pointer; padding:0 var(--input-padding); display:flex; align-items:center; }
|
div.project div.item:not(.hide) { white-space:pre; line-height:24px; cursor:pointer; padding:0 var(--input-padding); display:flex; align-items:center; }
|
||||||
// body.mobile div.project div.item:not(.album):not(.hide) { padding:20px var(--input-padding); }
|
|
||||||
div.project div.item:not(.hide)>i:first-child { margin-right:var(--input-margin); }
|
div.project div.item:not(.hide)>i:first-child { margin-right:var(--input-margin); }
|
||||||
div.project>div.item:not(:hover) input:not([type=button]) { border-right:0; }
|
div.project>div.item:not(:hover) input:not([type=button]) { border-right:0; }
|
||||||
div.project>div.item:not(:hover) input:not([type=button]) { border-left:0; }
|
div.project>div.item:not(:hover) input:not([type=button]) { border-left:0; }
|
||||||
@ -303,6 +300,7 @@ fieldset.input.icons table { width:100%; text-align:center; }
|
|||||||
fieldset.input.key div.action { display:none; }
|
fieldset.input.key div.action { display:none; }
|
||||||
fieldset.input.key div.action div.item.state { display:none; }
|
fieldset.input.key div.action div.item.state { display:none; }
|
||||||
fieldset.input.key div.output table.content { font-family:var(--code-font-family); width:100%; }
|
fieldset.input.key div.output table.content { font-family:var(--code-font-family); width:100%; }
|
||||||
|
fieldset.input.key div.output { padding:0 !important; }
|
||||||
fieldset.input.key div.output table.content td:first-child { padding-left:24px; cursor:pointer; }
|
fieldset.input.key div.output table.content td:first-child { padding-left:24px; cursor:pointer; }
|
||||||
fieldset.input.key div.output table.content.checkbox td:nth-child(2) { cursor:pointer; }
|
fieldset.input.key div.output table.content.checkbox td:nth-child(2) { cursor:pointer; }
|
||||||
fieldset.input.key div.output table.content:not(.checkbox) td:not(:first-child) { background-color:unset !important; color:var(--disable-fg-color); cursor:default; }
|
fieldset.input.key div.output table.content:not(.checkbox) td:not(:first-child) { background-color:unset !important; color:var(--disable-fg-color); cursor:default; }
|
||||||
@ -340,7 +338,7 @@ fieldset.input.float.file table.content td { padding-left:22px; }
|
|||||||
body div.float { padding:var(--plugin-padding); }
|
body div.float { padding:var(--plugin-padding); }
|
||||||
fieldset.Action>div.toast { height:fit-content; width:fit-content; overflow:auto; position:absolute; right:var(--plugin-margin); bottom:calc(var(--footer-height) + var(--action-height) + var(--plugin-margin)); }
|
fieldset.Action>div.toast { height:fit-content; width:fit-content; overflow:auto; position:absolute; right:var(--plugin-margin); bottom:calc(var(--footer-height) + var(--action-height) + var(--plugin-margin)); }
|
||||||
fieldset.Action>div.toast>div.toast { background-color:var(--plugin-bg-color); border:var(--plugin-border); margin:var(--plugin-margin); position:static; transition:all 1s; }
|
fieldset.Action>div.toast>div.toast { background-color:var(--plugin-bg-color); border:var(--plugin-border); margin:var(--plugin-margin); position:static; transition:all 1s; }
|
||||||
body.mobile fieldset.Action>div.toast { bottom:calc(var(--footer-height) + var(--action-height)); }
|
body.mobile fieldset.Action>div.toast { top:50%; }
|
||||||
body.mobile fieldset.Action>div.toast>div.toast { margin-bottom:10px; }
|
body.mobile fieldset.Action>div.toast>div.toast { margin-bottom:10px; }
|
||||||
div.toast.float>div.title { color:var(--notice-bg-color); font-style:italic; white-space:pre; padding:0 var(--input-padding); max-width:300px; overflow:auto; float:left; cursor:copy; }
|
div.toast.float>div.title { color:var(--notice-bg-color); font-style:italic; white-space:pre; padding:0 var(--input-padding); max-width:300px; overflow:auto; float:left; cursor:copy; }
|
||||||
div.toast.float>div.close { color:var(--notice-bg-color); float:right; cursor:pointer; margin-top:-3px; }
|
div.toast.float>div.close { color:var(--notice-bg-color); float:right; cursor:pointer; margin-top:-3px; }
|
||||||
@ -359,6 +357,7 @@ div.toast.float div.action>div.item input { padding:0 20px; }
|
|||||||
div.toast.float div.action>div.item.danger input { border:var(--box-danger); }
|
div.toast.float div.action>div.item.danger input { border:var(--box-danger); }
|
||||||
div.toast.float div.action>div.item.notice input { border:var(--box-notice); }
|
div.toast.float div.action>div.item.notice input { border:var(--box-notice); }
|
||||||
div.toast.float div.action>div.item.open input { border:var(--box-notice); }
|
div.toast.float div.action>div.item.open input { border:var(--box-notice); }
|
||||||
|
body>div.loading { white-space:pre; text-align:center; padding:20px; width:100%; position:absolute; left:0; top:0; z-index:5; }
|
||||||
body>div.carte { border:0; padding:0; }
|
body>div.carte { border:0; padding:0; }
|
||||||
body>div.carte input[name=filter] { margin:var(--input-margin); width:calc(100% - 10px); position:sticky; top:var(--input-margin); }
|
body>div.carte input[name=filter] { margin:var(--input-margin); width:calc(100% - 10px); position:sticky; top:var(--input-margin); }
|
||||||
body>div.carte div.item:not(.hide) { white-space:pre; padding:var(--button-padding); display:flex; align-items:center; }
|
body>div.carte div.item:not(.hide) { white-space:pre; padding:var(--button-padding); display:flex; align-items:center; }
|
||||||
@ -433,15 +432,12 @@ body>div.upload div.status div.size { text-align:center; }
|
|||||||
/* display */
|
/* display */
|
||||||
fieldset:not(.Action) { position:relative; }
|
fieldset:not(.Action) { position:relative; }
|
||||||
fieldset>form.option:not(.hide), fieldset>div.action:not(.hide):not(.flex) { display:contents; } .hide, .hidden { display:none; }
|
fieldset>form.option:not(.hide), fieldset>div.action:not(.hide):not(.flex) { display:contents; } .hide, .hidden { display:none; }
|
||||||
body:not(.mobile) fieldset:not(.Action):not(.output):not(.cmd)>div.action:not(.hide):not(.flex) {
|
body:not(.mobile) fieldset:not(.Action):not(.output):not(.cmd)>div.action:not(.hide):not(.flex) { display:flex; overflow:hidden; }
|
||||||
display:flex; overflow:hidden;
|
|
||||||
}
|
|
||||||
fieldset.panel>legend, fieldset.panel>div.status { display:none; }
|
fieldset.panel>legend, fieldset.panel>div.status { display:none; }
|
||||||
fieldset.output>legend, fieldset.output>form.option, fieldset.output>div.action:not(.flex), fieldset.output>div.status, fieldset.output>div.item { display:none; }
|
fieldset.output>legend, fieldset.output>form.option, fieldset.output>div.action:not(.flex), fieldset.output>div.status, fieldset.output>div.item { display:none; }
|
||||||
div.action, div.output, div.status, div.project, div.content, div.profile, div.display, table.content, table.content td, div.list, div.code, div.story, div.float, fieldset.float { overflow:auto; }
|
div.action, div.output, div.status, div.project, div.content, div.profile, div.display, table.content, table.content td, div.list, div.code, div.story, div.float, fieldset.float { overflow:auto; }
|
||||||
legend, form.option>div.item:not(.hide), div.action>div.item, div.action>div.tabs, fieldset>div.status>div.item { float:left; display:flex; align-items:center; }
|
legend, form.option>div.item:not(.hide), div.action>div.item, div.action>div.tabs, fieldset>div.status>div.item { float:left; display:flex; align-items:center; }
|
||||||
fieldset.story, fieldset>div.output, fieldset>div.status, div.output>div.project div.item, div.content:not(.item), div.code, div.story[data-type=spark] { clear:both; }
|
fieldset.story, fieldset>div.output, fieldset>div.status, div.output>div.project div.item, div.content:not(.item), div.code, div.story[data-type=spark] { clear:both; }
|
||||||
// fieldset.story { position:sticky; left:0; }
|
|
||||||
fieldset.auto, fieldset.full, fieldset.float { position:fixed; }
|
fieldset.auto, fieldset.full, fieldset.float { position:fixed; }
|
||||||
fieldset.full { position:fixed; left:0; top:0; }
|
fieldset.full { position:fixed; left:0; top:0; }
|
||||||
fieldset.plug { position:absolute; bottom:calc(var(--action-height) + var(--plugin-padding)); right:var(--plugin-padding); }
|
fieldset.plug { position:absolute; bottom:calc(var(--action-height) + var(--plugin-padding)); right:var(--plugin-padding); }
|
||||||
@ -484,7 +480,6 @@ input.select[type=button] { border:var(--input-border); padding:0 var(--button-p
|
|||||||
input[type=button] { border:var(--input-border); border-radius:var(--button-radius); }
|
input[type=button] { border:var(--input-border); border-radius:var(--button-radius); }
|
||||||
input[type=button]:hover { background-color:var(--hover-bg-color); color:var(--hover-fg-color); }
|
input[type=button]:hover { background-color:var(--hover-bg-color); color:var(--hover-fg-color); }
|
||||||
input[type=button].danger:hover { color:var(--danger-fg-color); }
|
input[type=button].danger:hover { color:var(--danger-fg-color); }
|
||||||
// input[type=button].danger:hover { background-color:var(--danger-bg-color); color:var(--danger-fg-color); }
|
|
||||||
input[type=button].notice:hover { background-color:var(--notice-bg-color); color:var(--notice-fg-color); }
|
input[type=button].notice:hover { background-color:var(--notice-bg-color); color:var(--notice-fg-color); }
|
||||||
input[type=button].danger { color:var(--danger-bg-color) !important; }
|
input[type=button].danger { color:var(--danger-bg-color) !important; }
|
||||||
input[type=button].notice { border:var(--box-notice); }
|
input[type=button].notice { border:var(--box-notice); }
|
||||||
@ -820,8 +815,6 @@ body.mobile fieldset.plugin>legend { box-shadow:none; }
|
|||||||
body.mobile:not(.landscape) fieldset.plugin.cmd:not(.output)>div.header { display:none !important; }
|
body.mobile:not(.landscape) fieldset.plugin.cmd:not(.output)>div.header { display:none !important; }
|
||||||
body.mobile div.output.card { overflow-x:hidden; }
|
body.mobile div.output.card { overflow-x:hidden; }
|
||||||
body.mobile div.output>div.project { position:absolute; left:0; top:0; z-index:2; }
|
body.mobile div.output>div.project { position:absolute; left:0; top:0; z-index:2; }
|
||||||
// body.mobile div.output>div.project { flex:0 0 240px; width:240px; }
|
|
||||||
// body.mobile div.output>div.project div.item:not(.album) { height:var(--action-height); }
|
|
||||||
body.mobile div.output>div.project { background-color:var(--plugin-bg-color); }
|
body.mobile div.output>div.project { background-color:var(--plugin-bg-color); }
|
||||||
body.mobile fieldset>div.output>div.code>img { max-width:390px; }
|
body.mobile fieldset>div.output>div.code>img { max-width:390px; }
|
||||||
body.mobile fieldset>div.output>div.code>div.form input[type=button] { width:100%; }
|
body.mobile fieldset>div.output>div.code>div.form input[type=button] { width:100%; }
|
||||||
@ -1060,6 +1053,5 @@ fieldset.input.key>div.output::-webkit-scrollbar { width:0 !important; height:0
|
|||||||
fieldset.word>div.output::-webkit-scrollbar { width:0 !important; height:0 !important; }
|
fieldset.word>div.output::-webkit-scrollbar { width:0 !important; height:0 !important; }
|
||||||
fieldset.xterm div.xterm-viewport::-webkit-scrollbar { width:0 !important; height:0 !important; }
|
fieldset.xterm div.xterm-viewport::-webkit-scrollbar { width:0 !important; height:0 !important; }
|
||||||
fieldset.web.code.git.search>div.output::-webkit-scrollbar { width:0 !important; height:0 !important; }
|
fieldset.web.code.git.search>div.output::-webkit-scrollbar { width:0 !important; height:0 !important; }
|
||||||
|
|
||||||
body.windows *::-webkit-scrollbar { width:0 !important; height:0 !important; }
|
body.windows *::-webkit-scrollbar { width:0 !important; height:0 !important; }
|
||||||
body.windows * { scrollbar-width:none; }
|
body.windows * { scrollbar-width:none; }
|
||||||
|
14
lib/user.js
14
lib/user.js
@ -75,9 +75,8 @@ Volcanos("user", {
|
|||||||
if (can.base.isObject(text)) { return can.core.Item(text, function(k, v) { can.core.Value(can._trans, can.core.Keys(zone, k), v) }) }
|
if (can.base.isObject(text)) { return can.core.Item(text, function(k, v) { can.core.Value(can._trans, can.core.Keys(zone, k), v) }) }
|
||||||
if (can.base.isFunc(text)) { text = text.name||"" } if (list && can.base.isString(list)) { return list }
|
if (can.base.isFunc(text)) { text = text.name||"" } if (list && can.base.isString(list)) { return list }
|
||||||
var key = can.core.Keys(zone, text)
|
var key = can.core.Keys(zone, text)
|
||||||
return can.core.Value(list, key) || can.core.Value(can._trans, key) ||
|
if (text == can.Conf("index") && can.Conf("help")) { return can.Conf("help") }
|
||||||
can.Conf(["trans", key]) || can.Conf(["feature._trans", key]) ||
|
return can.core.Value(list, key) || can.core.Value(can._trans, key) || can.Conf(["trans", key]) || can.Conf(["feature._trans", key]) || can.core.Value(can.user._trans, key) || text
|
||||||
can.core.Value(can.user._trans, key) || text
|
|
||||||
}, _trans: {"_week_header": ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]},
|
}, _trans: {"_week_header": ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]},
|
||||||
time: function(can, time, fmt) {
|
time: function(can, time, fmt) {
|
||||||
var now = can.base.Date(time), list = can.user._trans["_week_header"]
|
var now = can.base.Date(time), list = can.user._trans["_week_header"]
|
||||||
@ -99,7 +98,7 @@ Volcanos("user", {
|
|||||||
var width = meta.width||(html.QRCODE_WIDTH+2*html.PLUGIN_PADDING+10); if (width < 0) { width = can.page.width() + width }
|
var width = meta.width||(html.QRCODE_WIDTH+2*html.PLUGIN_PADDING+10); if (width < 0) { width = can.page.width() + width }
|
||||||
meta.title = can.base.replaceAll(meta.title||"", "%2F", "/")
|
meta.title = can.base.replaceAll(meta.title||"", "%2F", "/")
|
||||||
var ui = can.page.Append(can, meta.action.list || meta.action.length > 1 || !can._root || !can._root.Action || !can._root.Action._toast ? document.body: can._root.Action._toast, [{view: [[chat.TOAST, can.Conf(ctx.INDEX)||can.ConfIndex(), meta.style, chat.FLOAT]], style: {width: width}, list: [
|
var ui = can.page.Append(can, meta.action.list || meta.action.length > 1 || !can._root || !can._root.Action || !can._root.Action._toast ? document.body: can._root.Action._toast, [{view: [[chat.TOAST, can.Conf(ctx.INDEX)||can.ConfIndex(), meta.style, chat.FLOAT]], style: {width: width}, list: [
|
||||||
{view: [wiki.TITLE, "", meta.title||""], title: "点击复制", onclick: function(event) { can.user.copy(event, can, meta.title) }},
|
{view: [wiki.TITLE, "", can.user.trans(can, meta.title||"")], title: "点击复制", onclick: function(event) { can.user.copy(event, can, meta.title) }},
|
||||||
{view: [cli.CLOSE, "", can.page.unicode.close], title: "点击关闭", onclick: function() { action.close() }},
|
{view: [cli.CLOSE, "", can.page.unicode.close], title: "点击关闭", onclick: function() { action.close() }},
|
||||||
{view: "duration", title: "点击关闭", onclick: function() { action.close() }},
|
{view: "duration", title: "点击关闭", onclick: function() { action.close() }},
|
||||||
can.base.isObject(meta.content)? meta.content: {view: [[nfs.CONTENT, html.FLEX], "", meta.content||""]},
|
can.base.isObject(meta.content)? meta.content: {view: [[nfs.CONTENT, html.FLEX], "", meta.content||""]},
|
||||||
@ -229,9 +228,7 @@ Volcanos("user", {
|
|||||||
var action = can.onappend._action(can, button||[html.SUBMIT, html.CANCEL], ui.action, {
|
var action = can.onappend._action(can, button||[html.SUBMIT, html.CANCEL], ui.action, {
|
||||||
_trans: {submit: msg.Option(web.SUBMIT)},
|
_trans: {submit: msg.Option(web.SUBMIT)},
|
||||||
focus: function() { can.onmotion.focus(can, can.page.Select(can, ui._target, html.INPUT_ARGS)[0]) },
|
focus: function() { can.onmotion.focus(can, can.page.Select(can, ui._target, html.INPUT_ARGS)[0]) },
|
||||||
cancel: function(event) {
|
cancel: function(event) { can.onengine.signal(can, "onremove", can.request(event, {query: can.page.getquery(can, ui._target)})), can.page.Remove(can, ui._target) },
|
||||||
can.onengine.signal(can, "onremove", can.request(event, {query: can.page.getquery(can, ui._target)}))
|
|
||||||
can.page.Remove(can, ui._target) },
|
|
||||||
submit: function(event, can, button) { var args = [], data = {}, err = false
|
submit: function(event, can, button) { var args = [], data = {}, err = false
|
||||||
var list = can.page.Select(can, ui.table, html.OPTION_ARGS, function(item) {
|
var list = can.page.Select(can, ui.table, html.OPTION_ARGS, function(item) {
|
||||||
if (item.value == "" && need[item.name] == "must") { err = true, item.focus(), can.user.toast(can, item.name+" 是必选字段, 请重新输入") }
|
if (item.value == "" && need[item.name] == "must") { err = true, item.focus(), can.user.toast(can, item.name+" 是必选字段, 请重新输入") }
|
||||||
@ -248,7 +245,8 @@ Volcanos("user", {
|
|||||||
})
|
})
|
||||||
title && can.page.Select(can, action._target, "input[name=submit]", function(target) { target.value = can.user.trans(can, title) })
|
title && can.page.Select(can, action._target, "input[name=submit]", function(target) { target.value = can.user.trans(can, title) })
|
||||||
if (event && event.target) { can.onlayout.figure(event, can, ui._target)
|
if (event && event.target) { can.onlayout.figure(event, can, ui._target)
|
||||||
can.user.isMobile && can.page.style(can, ui._target, html.LEFT, (can.page.width()-ui._target.offsetWidth)/2, html.TOP, can.getHeaderHeight(can))
|
can.user.isMobile && can.page.style(can, ui._target, html.LEFT, (can.page.width()-ui._target.offsetWidth)/2, html.TOP, 100)
|
||||||
|
// can.user.isMobile && can.page.style(can, ui._target, html.LEFT, (can.page.width()-ui._target.offsetWidth)/2, html.TOP, can.getHeaderHeight(can))
|
||||||
} else {
|
} else {
|
||||||
can.getActionSize(function(left, top, height) { can.page.style(can, ui._target, html.LEFT, left||0, html.TOP, (height/4||0)) })
|
can.getActionSize(function(left, top, height) { can.page.style(can, ui._target, html.LEFT, left||0, html.TOP, (height/4||0)) })
|
||||||
} can.onmotion.resize(can, ui._target), can.onmotion.delay(can, function() { action.focus() }, 300)
|
} can.onmotion.resize(can, ui._target), can.onmotion.delay(can, function() { action.focus() }, 300)
|
||||||
|
@ -99,7 +99,6 @@ Volcanos(chat.ONACTION, {_init: function(can) {},
|
|||||||
lang(msg, function() { can.onmotion.clear(can), can.onimport._init(can, can.request(), can._output), can.onengine.signal(can, chat.ONLOGIN) })
|
lang(msg, function() { can.onmotion.clear(can), can.onimport._init(can, can.request(), can._output), can.onengine.signal(can, chat.ONLOGIN) })
|
||||||
}
|
}
|
||||||
can.run(can.request({}, {_method: http.GET}), [], function(msg) { lang(msg)
|
can.run(can.request({}, {_method: http.GET}), [], function(msg) { lang(msg)
|
||||||
// can.page.requireModules(can, [msg.Option("icon.lib")])
|
|
||||||
can.ui.diy = can.base.Obj(msg.Option("diy"))||{}, can.__theme = can.onimport._theme(can, can.page.theme(function(theme) {
|
can.ui.diy = can.base.Obj(msg.Option("diy"))||{}, can.__theme = can.onimport._theme(can, can.page.theme(function(theme) {
|
||||||
can.onengine.signal(can, chat.ONTHEMECHANGE, can.request(event, {theme: can.__theme = can.onimport._theme(can, theme)})), can.onimport.theme(can)
|
can.onengine.signal(can, chat.ONTHEMECHANGE, can.request(event, {theme: can.__theme = can.onimport._theme(can, theme)})), can.onimport.theme(can)
|
||||||
})), can.onimport.theme(can, can.misc.Search(can, "theme")||"")
|
})), can.onimport.theme(can, can.misc.Search(can, "theme")||"")
|
||||||
@ -112,7 +111,7 @@ Volcanos(chat.ONACTION, {_init: function(can) {},
|
|||||||
msg.Option(nfs.SCRIPT) && can.require(can.base.Obj(msg.Option(nfs.SCRIPT)), function(can) { can.onaction.source(can, msg) })
|
msg.Option(nfs.SCRIPT) && can.require(can.base.Obj(msg.Option(nfs.SCRIPT)), function(can) { can.onaction.source(can, msg) })
|
||||||
var tool = can._root.Action._conf.tool
|
var tool = can._root.Action._conf.tool
|
||||||
if (can.Conf(aaa.USERNICK, (msg.Option(aaa.USERNICK)||msg.Option(ice.MSG_USERNICK)||msg.Option(ice.MSG_USERNAME)).slice(0, 8))
|
if (can.Conf(aaa.USERNICK, (msg.Option(aaa.USERNICK)||msg.Option(ice.MSG_USERNICK)||msg.Option(ice.MSG_USERNAME)).slice(0, 8))
|
||||||
|| can.misc.Search(can, web.SHARE) || tool && can.base.isIn(can.user.info._cmd = tool[0]._command, "web.chat.oauth.client", web.PORTAL, aaa.OFFER, aaa.APPLY)) { return show(msg) }
|
|| can.misc.Search(can, web.SHARE) || tool && can.base.isIn(can.user.info._cmd = tool[0]._command, "web.chat.oauth.client", web.PORTAL, aaa.OFFER, aaa.APPLY)) { return show(msg) }
|
||||||
can.onlayout._init(can), can.user.login(can, function() { can.onengine.signal(can, chat.ONMAIN, msg) }, msg)
|
can.onlayout._init(can), can.user.login(can, function() { can.onengine.signal(can, chat.ONMAIN, msg) }, msg)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
@ -268,7 +268,6 @@ Volcanos(chat.ONIMPORT, {
|
|||||||
}, target, field)
|
}, target, field)
|
||||||
},
|
},
|
||||||
float: function(can, index, args) { args = args||[]
|
float: function(can, index, args) { args = args||[]
|
||||||
can.user.toast(can, can.user.isMobile)
|
|
||||||
can.user.isMobile? can.user.jumps(can.misc.MergePodCmd(can, {cmd: index+"/"+args.join("/")})): can.onappend._float(can, index, args)
|
can.user.isMobile? can.user.jumps(can.misc.MergePodCmd(can, {cmd: index+"/"+args.join("/")})): can.onappend._float(can, index, args)
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user