mirror of
https://shylinux.com/x/volcanos
synced 2025-04-26 09:14:06 +08:00
opt some
This commit is contained in:
parent
b6dd113562
commit
654153ebd6
8
frame.js
8
frame.js
@ -14,7 +14,7 @@ Volcanos("onengine", {help: "搜索引擎", list: [], _init: function(can, meta,
|
|||||||
}, function() { can.onlayout.topic(can)
|
}, function() { can.onlayout.topic(can)
|
||||||
can.misc.Log(can.user.title(), "run", can)
|
can.misc.Log(can.user.title(), "run", can)
|
||||||
can.base.Copy(can.onengine.river, can.Conf("river"))
|
can.base.Copy(can.onengine.river, can.Conf("river"))
|
||||||
can.onmotion._init(can, target), can.onkeypop._init(can, target)
|
can.ondaemon._init(can), can.onmotion._init(can, target), can.onkeypop._init(can, target)
|
||||||
can.onengine.signal(can, "onmain", can.request())
|
can.onengine.signal(can, "onmain", can.request())
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@ -61,7 +61,7 @@ Volcanos("onengine", {help: "搜索引擎", list: [], _init: function(can, meta,
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
Volcanos("ondaemon", {help: "推荐引擎", list: [], _init: function(can, name) { if (can.user.isLocalFile) { return }
|
Volcanos("ondaemon", {help: "推荐引擎", list: [], _init: function(can, name) { if (can.user.isLocalFile) { return }
|
||||||
can.misc.WSS(can, {type: "chrome", name: can.user.Search(can, "daemon")||name}, function(event, msg, cmd, arg) { if (!msg) { return }
|
can.misc.WSS(can, {type: "chrome", name: can.user.Search(can, "daemon")||name||""}, function(event, msg, cmd, arg) { if (!msg) { return }
|
||||||
can.base.isFunc(can.ondaemon[cmd])? can.core.CallFunc(can.ondaemon[cmd], {
|
can.base.isFunc(can.ondaemon[cmd])? can.core.CallFunc(can.ondaemon[cmd], {
|
||||||
"can": can, "msg": msg, "cmd": cmd, "arg": arg, "cb": function() { msg.Reply() },
|
"can": can, "msg": msg, "cmd": cmd, "arg": arg, "cb": function() { msg.Reply() },
|
||||||
}): can.onengine._search({}, can, msg, can, ["_search", cmd].concat(arg), function() {
|
}): can.onengine._search({}, can, msg, can, ["_search", cmd].concat(arg), function() {
|
||||||
@ -69,7 +69,9 @@ Volcanos("ondaemon", {help: "推荐引擎", list: [], _init: function(can, name)
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
}, _list: [""],
|
}, _list: [""],
|
||||||
pwd: function(can, msg, arg) { can.ondaemon._list[0] = arg[0] },
|
pwd: function(can, msg, arg) {
|
||||||
|
can.ondaemon._list[0] = arg[0]
|
||||||
|
},
|
||||||
grow: function(can, msg, arg) {
|
grow: function(can, msg, arg) {
|
||||||
var sub = can.ondaemon._list[msg.Option("_target")]
|
var sub = can.ondaemon._list[msg.Option("_target")]
|
||||||
if (!sub || !sub._outputs || !sub._outputs.length) { return }
|
if (!sub || !sub._outputs || !sub._outputs.length) { return }
|
||||||
|
@ -146,7 +146,7 @@ Volcanos("page", {help: "网页模块", ClassList: {
|
|||||||
|
|
||||||
if (type == "input") {
|
if (type == "input") {
|
||||||
data.type == "button" && (data.value = can.user.trans(can, data.value))
|
data.type == "button" && (data.value = can.user.trans(can, data.value))
|
||||||
if (data.type == "text") { data.autocomplete = data.autocomplete||"off"
|
if (data.type == "text" || !data.type) { data.autocomplete = data.autocomplete||"off"
|
||||||
data.placeholder = can.user.trans(can, (data.placeholder||data.name||"").split(".").pop())
|
data.placeholder = can.user.trans(can, (data.placeholder||data.name||"").split(".").pop())
|
||||||
data.title = can.user.trans(can, data.title||data.placeholder)
|
data.title = can.user.trans(can, data.title||data.placeholder)
|
||||||
}
|
}
|
||||||
|
@ -398,6 +398,7 @@ fieldset div.action>div.item select {
|
|||||||
|
|
||||||
fieldset>div.status>div.item {
|
fieldset>div.status>div.item {
|
||||||
float:left; padding:4px;
|
float:left; padding:4px;
|
||||||
|
height:18px;
|
||||||
}
|
}
|
||||||
fieldset>div.status>div.item>label {
|
fieldset>div.status>div.item>label {
|
||||||
font-size:10px; color:gray;
|
font-size:10px; color:gray;
|
||||||
|
@ -175,7 +175,6 @@ Volcanos("onaction", {help: "交互数据", list: [], _init: function(can, meta,
|
|||||||
function init() { can.run({}, [], function(msg) {
|
function init() { can.run({}, [], function(msg) {
|
||||||
can.onimport._init(can, msg, [], function(msg) {
|
can.onimport._init(can, msg, [], function(msg) {
|
||||||
can.onengine.signal(can, "onlogin", msg)
|
can.onengine.signal(can, "onlogin", msg)
|
||||||
can.ondaemon._init(can)
|
|
||||||
}, can._output)
|
}, can._output)
|
||||||
|
|
||||||
can.search({}, ["River.onmotion.toggle"])
|
can.search({}, ["River.onmotion.toggle"])
|
||||||
|
2
proto.js
2
proto.js
@ -70,7 +70,7 @@ var Volcanos = shy("火山架", {args: {}, pack: {}, libs: [], cache: {}}, [], f
|
|||||||
var msg = can.request(event); msg.Option(key, value)
|
var msg = can.request(event); msg.Option(key, value)
|
||||||
return can.search(event, [name+".onimport."+key])
|
return can.search(event, [name+".onimport."+key])
|
||||||
},
|
},
|
||||||
search: function(event, cmds, cb) { can.run && can.run(event, ["_search"].concat(cmds), cb, true) },
|
search: function(event, cmds, cb) { return can.run && can.run(event, ["_search"].concat(cmds), cb, true) },
|
||||||
|
|
||||||
const: function(list) { can.core.List(typeof list == "object"? list: arguments, function(v) { can["_"+v.toUpperCase()] = v }) },
|
const: function(list) { can.core.List(typeof list == "object"? list: arguments, function(v) { can["_"+v.toUpperCase()] = v }) },
|
||||||
Conf: function(key, value) { return can.core.Value(can._conf, key, value) }, _conf: {},
|
Conf: function(key, value) { return can.core.Value(can._conf, key, value) }, _conf: {},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user