mirror of
https://shylinux.com/x/volcanos
synced 2025-04-26 01:04:06 +08:00
opt some
This commit is contained in:
parent
66bc003803
commit
a1e524ba97
@ -131,6 +131,7 @@ Volcanos("page", {help: "用户界面", ClassList: {
|
||||
|
||||
} else if (item.input) { var list = can.core.List(item.input)
|
||||
type = html.INPUT, name = name||list[0]||"", data.name = data.name||name
|
||||
data.type = data.type||"text"
|
||||
data.className = data.className||data.name
|
||||
data.autocomplete = "off"
|
||||
|
||||
|
@ -119,6 +119,7 @@ Volcanos("user", {help: "用户操作", info: {}, agent: {
|
||||
]},
|
||||
] }])
|
||||
|
||||
can.page.ClassList.add(can, ui._target, chat.FLOAT)
|
||||
var action = can.onappend._action(can, meta.action && meta.action.list? meta.action.list: meta.action||[""], ui.action, {
|
||||
_engine: function(event, button) {
|
||||
var cb = meta.action[button]||meta.action; can.base.isFunc(cb) && cb(event, button)
|
||||
@ -138,7 +139,7 @@ Volcanos("user", {help: "用户操作", info: {}, agent: {
|
||||
},
|
||||
share: function(can, msg, cmd) {
|
||||
can.run(msg, cmd||[ctx.ACTION, chat.SHARE], function(msg) {
|
||||
can.user.toast(can, {height: 300, width: 500,
|
||||
can.user.toast(can, {
|
||||
title: msg.Append(mdb.NAME), duration: -1,
|
||||
content: msg.Append(mdb.TEXT), action: [cli.CLOSE, cli.OPEN],
|
||||
}), can.user.copy(msg._event, can, msg.Append(mdb.NAME))
|
||||
@ -242,6 +243,7 @@ Volcanos("user", {help: "用户操作", info: {}, agent: {
|
||||
} }] }
|
||||
}) }] )
|
||||
|
||||
can.page.ClassList.add(can, ui._target, chat.FLOAT)
|
||||
ui._target.onmouseover = function(event) { can.onkeymap.prevent(event) }
|
||||
var carte = {_target: ui._target, _parent: parent, layout: can.onlayout.figure(event, can, ui._target)}
|
||||
return can.onkeymap.prevent(event), carte
|
||||
@ -320,6 +322,7 @@ Volcanos("user", {help: "用户操作", info: {}, agent: {
|
||||
{view: html.ACTION}, {view: html.OUTPUT, list: [{view: "progress"}]},
|
||||
{view: html.STATUS, list: [{view: html.SHOW}, {view: "cost"}, {view: "size"}]},
|
||||
]}]); can.onlayout.figure(event, can, ui._target)
|
||||
can.page.ClassList.add(can, ui._target, chat.FLOAT)
|
||||
|
||||
var action = can.onappend._action(can, [
|
||||
{type: html.UPLOAD, onchange: function(event) {
|
||||
|
@ -2,7 +2,7 @@ body, fieldset, table, tr, th, td { padding:0; border:0; margin:0; }
|
||||
body { background-color:black; color:cyan; }
|
||||
legend { background-color:#339999; color:white; padding:0px 20px; }
|
||||
select { background-color:black; color:cyan; padding:0 10px; }
|
||||
textarea { background-color:cyan; width:400px; }
|
||||
textarea { background-color:cyan; width:400px; padding:4px; }
|
||||
input[type=password] { background-color:cyan; color:black; padding:0 4px; width:90px; }
|
||||
input[type=text] { background-color:cyan; color:black; padding:0 4px; width:90px; }
|
||||
input[name=cmd] { background-color:black; color:white; width:320px; }
|
||||
@ -60,10 +60,10 @@ fieldset.plugin { background-color:#061c3c9e; padding:10px; margin:10px; }
|
||||
fieldset.plugin div.status { border-top:1px solid darkcyan; }
|
||||
fieldset.story div.status { border-top:1px solid darkcyan; }
|
||||
fieldset.story>legend { margin:5px 0; }
|
||||
fieldset.float { background-color:#023531cf; }
|
||||
fieldset.float { background-color:#0e3369b3; }
|
||||
fieldset.float input[type=button][name=close]{ display:block; }
|
||||
fieldset.Full input[type=button][name=close]{ display:block; }
|
||||
fieldset.plug input[type=button][name=close]{ display:block; }
|
||||
fieldset.full input[type=button][name=close]{ display:block; }
|
||||
fieldset input[type=button][name=close]{ display:none; }
|
||||
|
||||
fieldset.output>form.option { display:none; }
|
||||
@ -82,25 +82,24 @@ fieldset.input.date div.output td.next { color:gray; }
|
||||
fieldset.input.date div.output td { padding:2px 11px; }
|
||||
fieldset.input.date table { text-align:center; width:280px; }
|
||||
|
||||
/* body>div.float { background-color:#0e3369b3; padding:5px; } */
|
||||
body>div.toast { background-color:#0e3369b3; }
|
||||
body>div.toast div.title { color:#cae850; word-break:break-all; float:left; }
|
||||
body>div.float { background-color:#0e3369b3; color:white; padding:10px; }
|
||||
body>div.toast div.title { color:yellow; word-break:break-all; float:left; }
|
||||
body>div.toast div.duration { color:gray; float:right; }
|
||||
body>div.toast div.content { text-align:center; color:yellow; }
|
||||
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:10px; }
|
||||
body>div.toast div.action { display:block; }
|
||||
|
||||
body>div.carte { background-color:#295b61; padding:4px; min-width:80px; }
|
||||
body>div.carte { padding:0; }
|
||||
body>div.carte div.item { padding:3px 12px; }
|
||||
body>div.input { background-color:#0d4142a6; padding:5px; }
|
||||
body>div.input div.item { float:left; }
|
||||
body>div.input div.content { overflow:auto; }
|
||||
body>div.input select { width:183px; margin:5px; }
|
||||
body>div.input input[type=text] { width:171px; margin:5px; }
|
||||
body>div.input input[name=username] { width:171px; margin:5px; }
|
||||
body>div.input input[name=password] { width:171px; margin:5px; }
|
||||
body>div.input textarea { background-color:cyan; padding:4px; margin:5px; border:2px inset #14a58e; height:120px; width:171px; }
|
||||
body>div.input td { padding:5px; }
|
||||
body>div.input select { width:183px; }
|
||||
body>div.input input[type=text] { width:171px; }
|
||||
body>div.input input[name=username] { width:171px; }
|
||||
body>div.input input[name=password] { width:171px; }
|
||||
body>div.input textarea { border:2px inset #14a58e; height:120px; width:171px; }
|
||||
body>div.input.login { padding:10px; }
|
||||
|
||||
body>div.upload div.item { float:left; }
|
||||
@ -109,7 +108,7 @@ 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:240px; }
|
||||
body>div.upload input[type=file] { width:320px; }
|
||||
|
||||
/* font */
|
||||
* { tab-size:4; }
|
||||
@ -150,6 +149,7 @@ div.tabs.select, div.tabs:hover, table.content tr.select, table.content tr:hover
|
||||
input[type=text]:hover { background-color:white; }
|
||||
input[name=cmd]:hover { background-color:white; color:black; }
|
||||
input[type=button]:hover { background-color:gray; color:cyan; }
|
||||
legend:hover { background-color:skyblue; }
|
||||
|
||||
/* scrollbar */
|
||||
body { overflow:-moz-scrollbars-none; -ms-overflow-style:none; }
|
||||
@ -201,6 +201,7 @@ body.white.simple input[type=button] { background-color:#0152d9; border:none; bo
|
||||
body.white { background-color:rgba(5,34,56,0.75); color:white; }
|
||||
body.white legend { border-radius:10px 10px 10px 10px; }
|
||||
body.white select { background-color:#99CC66; color:white; border:2px solid #99CC66; border-radius:10px 10px 10px 10px; }
|
||||
body.white textarea { background-color:white; color:black; }
|
||||
body.white input[type=password] { background-color:white; color:black; border:2px solid #14a58e; border-radius:6px; }
|
||||
body.white input[type=text] { background-color:white; color:black; border:2px solid #14a58e; border-radius:6px; }
|
||||
body.white input[name=cmd] { background-color:black; color:white; }
|
||||
@ -216,7 +217,7 @@ body.white table.content th { background-color:#99CCFF; }
|
||||
body.white fieldset.panel.Action { color:black; }
|
||||
body.white fieldset.panel.Action div.action { color:white; }
|
||||
body.white fieldset.plugin { background-color:#ffffff78; }
|
||||
body.white fieldset.Full { background-color:#cce0f4eb; color:white; z-index:10; }
|
||||
body.white fieldset.full { background-color:#cce0f4eb; color:white; z-index:10; }
|
||||
|
||||
body.white legend:hover { background-color:skyblue; }
|
||||
body.white input[type=text]:hover { background-color:cyan; }
|
||||
@ -233,7 +234,6 @@ body.print legend, body.print select, body.print input[type=text] { box-shadow:0
|
||||
body.print div.item.select { background-color:white; border:solid 2px red; }
|
||||
body.print div.list div.item { background-color:white; }
|
||||
body.print fieldset.Header, body.print fieldset.River, body.print fieldset.Action, body.print fieldset.Footer { background-color:white; color:black; }
|
||||
body.black a { color:yellow; }
|
||||
|
||||
body.mobile textarea { font-size:1.2rem; }
|
||||
body.mobile legend { font-size:1.6rem; height:38px; }
|
||||
@ -291,4 +291,5 @@ fieldset.panel.Search div.story[data-type=spark] { padding:0px; margin:0px; }
|
||||
fieldset.panel.Action.cmd>div.toggle.project { display:none; }
|
||||
fieldset.plugin.config form.option input[name=key] { width:240px; }
|
||||
body.mobile fieldset.plan>div.action { display:none; }
|
||||
|
||||
body.white fieldset.panel.Search a { color:yellow; }
|
||||
body.black a { color:yellow; }
|
||||
|
@ -12,8 +12,8 @@ fieldset.Action.free>div.output fieldset.plugin { position:absolute; }
|
||||
fieldset.Action.free>div.output fieldset.plugin.select { display:block; }
|
||||
fieldset.Action.flow>div.output fieldset.plugin { float:left; }
|
||||
|
||||
fieldset.Action>div.output fieldset.Full { background-color:#073947f2; padding:0; margin:0; position:fixed; left:0; top:0; overflow:auto; z-index:10; }
|
||||
fieldset.Action>div.output fieldset.Full>legend { margin:0px; float:left; }
|
||||
fieldset.Action>div.output fieldset.full { background-color:#073947f2; padding:0; margin:0; position:fixed; left:0; top:0; overflow:auto; z-index:10; }
|
||||
fieldset.Action>div.output fieldset.full>legend { margin:0px; float:left; }
|
||||
|
||||
fieldset.panel.cmd>div.output>fieldset.plugin { padding:0; margin:0; }
|
||||
fieldset.panel.cmd>div.output>fieldset.plugin>legend { padding:0 10px; margin-right:3px; float:left; }
|
||||
|
@ -149,8 +149,7 @@ Volcanos(chat.ONACTION, {help: "交互操作", _init: function(can, cb, target)
|
||||
if (can.user.mod.isPod || can.user.isMobile) {
|
||||
var gt = "❯", lt = "❮"; function toggle(view) { return !can.setRiver("display") }
|
||||
can.page.Append(can, target, [{view: [[html.TOGGLE, chat.PROJECT]], list: [{text: [gt, html.DIV]}], onclick: function(event) {
|
||||
event.target.innerHTML = toggle()? gt: lt
|
||||
can.onaction.refresh(can)
|
||||
event.target.innerHTML = toggle()? gt: lt, can.onaction.refresh(can)
|
||||
}}])
|
||||
}
|
||||
|
||||
@ -160,7 +159,6 @@ Volcanos(chat.ONACTION, {help: "交互操作", _init: function(can, cb, target)
|
||||
_menus: [
|
||||
[chat.LAYOUT, "auto", "tabs", "grid", "free", "flow", "page", "toimage"],
|
||||
[ice.HELP, "tutor", "manual", "service", "devops", "refer"],
|
||||
"refresh",
|
||||
],
|
||||
_trans: {
|
||||
"layout": "布局",
|
||||
@ -216,6 +214,7 @@ Volcanos(chat.ONACTION, {help: "交互操作", _init: function(can, cb, target)
|
||||
layout: function(can, button, silent) { button = button||ice.AUTO
|
||||
var cb = can.onlayout[button]; if (can.base.isFunc(cb) && cb(can, silent)) { return }
|
||||
can.page.ClassList.del(can, can._target, can.Conf(chat.LAYOUT))
|
||||
if (button == ice.AUTO) { button = "" }
|
||||
can.page.ClassList.add(can, can._target, can.Conf(chat.LAYOUT, button))
|
||||
can.onlayout._init(can)
|
||||
},
|
||||
@ -233,9 +232,6 @@ Volcanos(chat.ONACTION, {help: "交互操作", _init: function(can, cb, target)
|
||||
},
|
||||
})
|
||||
Volcanos(chat.ONLAYOUT, {help: "导出数据",
|
||||
auto: function(can) {
|
||||
can.Conf(chat.LAYOUT, "")
|
||||
},
|
||||
grid: function(can, silent) {
|
||||
var ACTION_LAYOUT_FMT = " fieldset.Action.grid>div.output fieldset.plugin { width:_width; height:_height; } fieldset.Action.grid>div.output fieldset.plugin>div.output { width:_width; height:_height; } "
|
||||
can.user.input(event, can, [{name: "m", value: 2}, {name: "n", value: 2}], function(data) {
|
||||
|
@ -64,12 +64,12 @@ Volcanos(chat.ONENGINE, {help: "解析引擎", _engine: function(event, can, msg
|
||||
msg.Push({hash: key, name: can.user.language(can) == "en"? key: value.name}) // 应用列表
|
||||
}), can.base.isFunc(cb) && cb(msg); return true
|
||||
}})
|
||||
Volcanos(chat.ONACTION, {help: "控件交互", _init: function(can, cb, target) {
|
||||
Volcanos(chat.ONACTION, {help: "控件交互", list: ["create", "share", "refresh"], _init: function(can, cb, target) {
|
||||
can.onmotion.hidden(can, target), can.base.isFunc(cb) && cb()
|
||||
},
|
||||
onlogin: function(can, msg) {
|
||||
can.run({}, [], function(msg) { if (msg.Option(ice.MSG_RIVER) == "_share") { return }
|
||||
can.onimport._init(can, msg, null, can._output), can.onappend._action(can, can.Conf(ctx.ACTION))
|
||||
can.onimport._init(can, msg, null, can._output), can.onappend._action(can, can.Conf(ctx.ACTION)||can.onaction.list)
|
||||
if (can.user.mod.isPod ||can.user.isExtension || can.user.isMobile) { return }
|
||||
can.onmotion.toggle(can, can._target, true)
|
||||
})
|
||||
@ -126,10 +126,11 @@ Volcanos(chat.ONACTION, {help: "控件交互", _init: function(can, cb, target)
|
||||
can.runAction(event, mdb.CREATE, args, function(msg) { can.misc.Search(can, {river: msg.Result()}) })
|
||||
})
|
||||
},
|
||||
share: function(event, can) {
|
||||
can.onmotion.share(event, can, [{name: chat.TITLE, value: can.Conf(chat.STORM)}], [mdb.TYPE, chat.STORM])
|
||||
},
|
||||
refresh: function(event, can) {
|
||||
var args = {river: can.Conf(chat.RIVER), storm: can.Conf(chat.STORM),
|
||||
topic: can.getHeader(chat.TOPIC), layout: can.getAction(chat.LAYOUT),
|
||||
}
|
||||
var args = {river: can.Conf(chat.RIVER), storm: can.Conf(chat.STORM), topic: can.getHeader(chat.TOPIC), layout: can.getAction(chat.LAYOUT)}
|
||||
if (can.user.isExtension) { localStorage.setItem(ctx.ARGS, JSON.stringify(args)) }
|
||||
can.misc.Search(can, args)
|
||||
},
|
||||
@ -137,10 +138,10 @@ Volcanos(chat.ONACTION, {help: "控件交互", _init: function(can, cb, target)
|
||||
Volcanos(chat.ONDETAIL, {help: "菜单交互",
|
||||
list: ["共享群组", "添加应用", "添加设备", "添加用户", "重命名群组", "删除群组"],
|
||||
sublist: ["共享应用", "添加工具", "保存参数", "重命名应用", "删除应用"],
|
||||
_menus: [
|
||||
["create", "创建群组", "添加应用", "添加工具", "添加设备", "创建空间"],
|
||||
["share", "共享群组", "共享应用", "共享工具", "共享设备", "访问空间"],
|
||||
],
|
||||
// _menus: [
|
||||
// ["create", "创建群组", "添加应用", "添加工具", "添加设备", "创建空间"],
|
||||
// ["share", "共享群组", "共享应用", "共享工具", "共享设备", "访问空间"],
|
||||
// ],
|
||||
|
||||
"创建群组": function(event, can) { can.onaction.create(event, can) },
|
||||
"共享群组": function(event, can, button, river) {
|
||||
|
@ -40,13 +40,13 @@ fieldset.inner.float legend { height:30px; }
|
||||
fieldset.inner.float div.output { background-color:#332f1ecf; }
|
||||
fieldset.inner.float div.status { color:white; }
|
||||
|
||||
fieldset.inner.full>legend { display:none; }
|
||||
fieldset.inner.full>form.option { display:none; }
|
||||
fieldset.inner.full>div.action { display:none; }
|
||||
fieldset.inner.full>div.status { display:none; }
|
||||
fieldset.inner.full>div.output div.profile>div.action { display:none; }
|
||||
fieldset.inner.full>div.output div.display>div.action { display:none; }
|
||||
fieldset.inner.full>div.output div.display>div.status { display:none; }
|
||||
fieldset.inner.Full>legend { display:none; }
|
||||
fieldset.inner.Full>form.option { display:none; }
|
||||
fieldset.inner.Full>div.action { display:none; }
|
||||
fieldset.inner.Full>div.status { display:none; }
|
||||
fieldset.inner.Full>div.output div.profile>div.action { display:none; }
|
||||
fieldset.inner.Full>div.output div.display>div.action { display:none; }
|
||||
fieldset.inner.Full>div.output div.display>div.status { display:none; }
|
||||
|
||||
body.white fieldset.inner>div.output div.project { color:#a2dad2; }
|
||||
body.white fieldset.inner>div.output div.content { background-color:#013b675c; }
|
||||
|
@ -302,7 +302,7 @@ Volcanos(chat.ONIMPORT, {help: "导入数据", _init: function(can, msg, cb, tar
|
||||
var rest = can.ui.display.offsetHeight+can.ui._path.offsetHeight+can.ui._tabs.offsetHeight+5
|
||||
can.page.style(can, can.ui.content, can.isCmdMode() || can.user.isMobile? html.HEIGHT: html.MAX_HEIGHT, height)
|
||||
can.page.styleHeight(can, can.ui.project, can.ui.content.offsetHeight+rest)
|
||||
if (can.page.ClassList.has(can, can._fields, "full")) {
|
||||
if (can.page.ClassList.has(can, can._fields, "Full")) {
|
||||
can.page.styleHeight(can, can.ui.profile_output, can.ui.content.offsetHeight)
|
||||
} else {
|
||||
can.page.styleHeight(can, can.ui.profile_output, can.ui.content.offsetHeight-html.ACTION_HEIGHT-2)
|
||||
@ -576,7 +576,7 @@ Volcanos(chat.ONACTION, {help: "控件交互", list: ["搜索", "打开", "添
|
||||
can.onimport.layout(can)
|
||||
},
|
||||
"全屏": function(event, can) {
|
||||
if (can.page.ClassList.neg(can, can._fields, "full")) {
|
||||
if (can.page.ClassList.neg(can, can._fields, "Full")) {
|
||||
can.onmotion.hidden(can, can.ui.project)
|
||||
can.ConfHeight(can._root._height)
|
||||
} else {
|
||||
|
@ -93,7 +93,7 @@ Volcanos(chat.ONACTION, {help: "交互操作", list: [
|
||||
|
||||
"刷新数据": function(event, can) { can.Update({}, can.Input([], true)) },
|
||||
"切换全屏": function(event, can) { var sub = can._outputs[can._outputs.length-1]
|
||||
if (can.page.ClassList.neg(can, can._target, "Full")) { sub._height_bak = sub.ConfHeight(), sub._width_bak = sub.ConfWidth()
|
||||
if (can.page.ClassList.neg(can, can._target, "full")) { sub._height_bak = sub.ConfHeight(), sub._width_bak = sub.ConfWidth()
|
||||
can._mode = can.Mode(), can.Mode("full"), sub.Mode("full")
|
||||
var height = can._root._height-(can._status.innerText? 2: 1)*html.ACTION_HEIGHT; can.user.isMobile && (height -= 2*html.ACTION_HEIGHT)
|
||||
can.page.style(can, can._output, html.HEIGHT, sub.ConfHeight(height), html.MIN_WIDTH, sub.ConfWidth(can._root._width))
|
||||
|
2
proto.js
2
proto.js
@ -153,7 +153,7 @@ var chat = {
|
||||
libs: ["/lib/base.js", "/lib/core.js", "/lib/misc.js", "/lib/page.js", "/lib/user.js"],
|
||||
panel_list: [
|
||||
{name: "Header", help: "标题栏", pos: "head", state: ["time", "usernick", "avatar"]},
|
||||
{name: "River", help: "群聊组", pos: "left", action: ["create", "refresh"]},
|
||||
{name: "River", help: "群聊组", pos: "left"},
|
||||
{name: "Action", help: "工作台", pos: "main"},
|
||||
{name: "Search", help: "搜索框", pos: "auto"},
|
||||
{name: "Footer", help: "状态条", pos: "foot", state: ["ncmd", "ntip"]},
|
||||
|
Loading…
x
Reference in New Issue
Block a user