mirror of
https://shylinux.com/x/volcanos
synced 2025-04-26 17:24:06 +08:00
fix textarea
This commit is contained in:
parent
550891e76a
commit
53a6407349
5
frame.js
5
frame.js
@ -182,9 +182,9 @@ Volcanos("onengine", {help: "解析引擎", list: [], _init: function(can, meta,
|
|||||||
"studio": {name: "studio", action: [
|
"studio": {name: "studio", action: [
|
||||||
{name: "vimer", help: "编辑器", index: "web.code.vimer", args: ["src/", "main.go"]},
|
{name: "vimer", help: "编辑器", index: "web.code.vimer", args: ["src/", "main.go"]},
|
||||||
{name: "paste", help: "粘贴板", index: "web.code.tmux.text"},
|
{name: "paste", help: "粘贴板", index: "web.code.tmux.text"},
|
||||||
{name: "favor", help: "收藏夹", index: "web.wiki.word", args: ["usr/learning/favor.shy"]},
|
{name: "contexts", help: "上下文", index: "web.wiki.word", args: ["src/main.shy"]},
|
||||||
{name: "total", help: "代码统计", index: "web.code.git.total"},
|
|
||||||
{name: "status", help: "代码状态", index: "web.code.git.status"},
|
{name: "status", help: "代码状态", index: "web.code.git.status"},
|
||||||
|
{name: "total", help: "代码统计", index: "web.code.git.total"},
|
||||||
]},
|
]},
|
||||||
"cli": {name: "cli", action: [
|
"cli": {name: "cli", action: [
|
||||||
{name: "tmux", help: "命令行", index: "web.wiki.word", args: ["usr/icebergs/misc/tmux/tmux.shy"]},
|
{name: "tmux", help: "命令行", index: "web.wiki.word", args: ["usr/icebergs/misc/tmux/tmux.shy"]},
|
||||||
@ -196,7 +196,6 @@ Volcanos("onengine", {help: "解析引擎", list: [], _init: function(can, meta,
|
|||||||
{name: "HTML5", help: "浏览器", index: "web.wiki.word", args: ["usr/icebergs/misc/chrome/chrome.shy"]},
|
{name: "HTML5", help: "浏览器", index: "web.wiki.word", args: ["usr/icebergs/misc/chrome/chrome.shy"]},
|
||||||
]},
|
]},
|
||||||
"linux": {name: "linux", action: [
|
"linux": {name: "linux", action: [
|
||||||
{name: "ES", help: "搜索", index: "web.wiki.word", args: ["usr/learning/自然/编程/es.shy"]},
|
|
||||||
{name: "linux", help: "系统", index: "web.wiki.word", args: ["usr/linux-story/src/main.shy"]},
|
{name: "linux", help: "系统", index: "web.wiki.word", args: ["usr/linux-story/src/main.shy"]},
|
||||||
]},
|
]},
|
||||||
"nginx": {name: "nginx", action: [
|
"nginx": {name: "nginx", action: [
|
||||||
|
@ -69,7 +69,7 @@ fieldset>form.option>div.item input.opts {
|
|||||||
}
|
}
|
||||||
fieldset>form.option>div.item textarea.args {
|
fieldset>form.option>div.item textarea.args {
|
||||||
background-color:cyan;
|
background-color:cyan;
|
||||||
width:300px;
|
width:500px;
|
||||||
height:50px;
|
height:50px;
|
||||||
}
|
}
|
||||||
fieldset>form.option>div.item.textarea {
|
fieldset>form.option>div.item.textarea {
|
||||||
|
4
index.js
4
index.js
@ -1,10 +1,10 @@
|
|||||||
_can_name = ""
|
_can_name = ""
|
||||||
Volcanos({name: "chat", volcano: "/frame.js", iceberg: "/chat/", intshell: "plug.sh",
|
Volcanos({name: "chat", volcano: "/frame.js", iceberg: "/chat/",
|
||||||
libs: ["/lib/base.js", "/lib/core.js", "/lib/misc.js", "/lib/page.js", "/lib/user.js"], panes: [
|
libs: ["/lib/base.js", "/lib/core.js", "/lib/misc.js", "/lib/page.js", "/lib/user.js"], panes: [
|
||||||
{name: "Header", help: "标题栏", pos: "head", state: ["time", "username"]},
|
{name: "Header", help: "标题栏", pos: "head", state: ["time", "username"]},
|
||||||
|
{name: "Search", help: "搜索框", pos: "float"},
|
||||||
{name: "River", help: "群聊组", pos: "left"},
|
{name: "River", help: "群聊组", pos: "left"},
|
||||||
{name: "Action", help: "工作台", pos: "middle"},
|
{name: "Action", help: "工作台", pos: "middle"},
|
||||||
{name: "Search", help: "搜索框", pos: "float"},
|
|
||||||
{name: "Footer", help: "状态条", pos: "foot", state: ["ncmd"]},
|
{name: "Footer", help: "状态条", pos: "foot", state: ["ncmd"]},
|
||||||
], main: {name: "Header", engine: "remote", list: ["publish/order.js"]}, plugin: [
|
], main: {name: "Header", engine: "remote", list: ["publish/order.js"]}, plugin: [
|
||||||
"/plugin/state.js",
|
"/plugin/state.js",
|
||||||
|
@ -61,7 +61,7 @@ Volcanos("onaction", {help: "交互数据", list: [], _init: function(can, msg,
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
Volcanos("onexport", {help: "导出数据", list: [], _init: function(can, msg, list, cb, target) {
|
Volcanos("onexport", {help: "导出数据", list: ["River", "Footer", "pack"], _init: function(can, msg, list, cb, target) {
|
||||||
can.run(msg._event, [], function(msg) { can._output.innerHTML = ""
|
can.run(msg._event, [], function(msg) { can._output.innerHTML = ""
|
||||||
can.Conf("username", msg.Option("user.nick")||msg.Option("user.name"))
|
can.Conf("username", msg.Option("user.nick")||msg.Option("user.name"))
|
||||||
if (can.Conf("username").length > 10) {
|
if (can.Conf("username").length > 10) {
|
||||||
@ -85,14 +85,14 @@ Volcanos("onexport", {help: "导出数据", list: [], _init: function(can, msg,
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
can.user.isMobile || (can.search = can.page.Append(can, can._output, [{view: "search", list: [{type: "input", onkeydown: function(event) {
|
can.user.isMobile || (can.search = can.page.Append(can, can._output, [{view: "search", list: [{type: "input", data: {placeholder: "search"}, onkeydown: function(event) {
|
||||||
switch (event.key) {
|
switch (event.key) {
|
||||||
case "Enter": can.run(event, ["search", "Search.onimport.input", "*", event.target.value]); break
|
case "Enter": can.run(event, ["search", "Search.onimport.input", "*", event.target.value]); break
|
||||||
}
|
}
|
||||||
}, }], }]).input)
|
}, }], }]).input)
|
||||||
|
|
||||||
var height = document.body.offsetHeight
|
var height = document.body.offsetHeight
|
||||||
var ui = can.page.Append(can, can._output, can.core.List(["Search", "River", "Footer", "pack"], function(item) {
|
var ui = can.page.Append(can, can._output, can.core.List(can.onexport.list, function(item) {
|
||||||
return {view: "item", list: [{type: "input", data: {name: item, type: "button", value: item.toLowerCase()},
|
return {view: "item", list: [{type: "input", data: {name: item, type: "button", value: item.toLowerCase()},
|
||||||
onclick: function(event) {
|
onclick: function(event) {
|
||||||
var cb = can.onaction[item]; if (typeof cb == "function") {
|
var cb = can.onaction[item]; if (typeof cb == "function") {
|
||||||
|
@ -44,6 +44,9 @@ Volcanos("onaction", {help: "控件交互", list: [],
|
|||||||
onkeydown: function(event, can) {
|
onkeydown: function(event, can) {
|
||||||
switch (event.key) {
|
switch (event.key) {
|
||||||
case "Enter":
|
case "Enter":
|
||||||
|
if (event.target.tagName == "TEXTAREA") {
|
||||||
|
break
|
||||||
|
}
|
||||||
if (event.target.tagName == "INPUT") {
|
if (event.target.tagName == "INPUT") {
|
||||||
can.run(event)
|
can.run(event)
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,10 @@ Volcanos("onimport", {help: "导入数据", list: [], _init: function(can, msg,
|
|||||||
])
|
])
|
||||||
can.onappend.table(can, can.ui.content, "table", msg)
|
can.onappend.table(can, can.ui.content, "table", msg)
|
||||||
can.onappend.board(can, can.ui.display, "board", msg)
|
can.onappend.board(can, can.ui.display, "board", msg)
|
||||||
|
var refresh = msg.Option("_refresh") || can.Conf("feature")["_refresh"]
|
||||||
|
refresh && can.Timer(refresh, function() {
|
||||||
|
can.run({})
|
||||||
|
})
|
||||||
return typeof cb == "function" && cb(msg)
|
return typeof cb == "function" && cb(msg)
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user