mirror of
https://shylinux.com/x/volcanos
synced 2025-07-02 04:21:19 +08:00
add some
This commit is contained in:
parent
e7deec9752
commit
80d7b2e24a
4
frame.js
4
frame.js
@ -342,7 +342,9 @@ Volcanos(chat.ONAPPEND, {
|
|||||||
if (msg.IsErr()) { return can.onappend.style(can, "warn", can.user.toastFailure(can, msg.Result())._target) }
|
if (msg.IsErr()) { return can.onappend.style(can, "warn", can.user.toastFailure(can, msg.Result())._target) }
|
||||||
can.misc.Search(can, log.DEBUG) == ice.TRUE && can.base.beginWith(display, "/p/") && delete(Volcanos.meta.cache[display])
|
can.misc.Search(can, log.DEBUG) == ice.TRUE && can.base.beginWith(display, "/p/") && delete(Volcanos.meta.cache[display])
|
||||||
can.misc.Search(can, log.DEBUG) == ice.TRUE && can.base.beginWith(display, "/p/") && delete(Volcanos.meta.cache[display.split(".")[0]])
|
can.misc.Search(can, log.DEBUG) == ice.TRUE && can.base.beginWith(display, "/p/") && delete(Volcanos.meta.cache[display.split(".")[0]])
|
||||||
var list = display.split(",").concat([msg.Option(ice.MSG_DISPLAY_CSS)||can.Conf("display_css")||undefined, chat.PLUGIN_TABLE_JS])
|
var list = []; can.core.List(display.split(","), function(item) { list = can.base.AddUniq(list, item) })
|
||||||
|
list = can.base.AddUniq(list, chat.PLUGIN_TABLE_JS)
|
||||||
|
list = can.base.AddUniq(list, msg.Option(ice.MSG_DISPLAY_CSS)||can.Conf("display_css")||undefined)
|
||||||
Volcanos(display, {_root: can._root, _follow: can.core.Keys(can._follow, display), _fields: can._target, _target: output, _path: display||chat.PLUGIN_TABLE_JS,
|
Volcanos(display, {_root: can._root, _follow: can.core.Keys(can._follow, display), _fields: can._target, _target: output, _path: display||chat.PLUGIN_TABLE_JS,
|
||||||
_legend: can._legend, _option: can._option, _action: action||can._action, _output: output, _status: status||can._status,
|
_legend: can._legend, _option: can._option, _action: action||can._action, _output: output, _status: status||can._status,
|
||||||
sup: can,
|
sup: can,
|
||||||
|
@ -84,7 +84,7 @@ Volcanos("base", {
|
|||||||
for (var k in val) { k && val[k] && res.push(k, val[k]) } break
|
for (var k in val) { k && val[k] && res.push(k, val[k]) } break
|
||||||
default: res.push(val)
|
default: res.push(val)
|
||||||
} } return res },
|
} } return res },
|
||||||
AddUniq: function(list, value) { list = list||[], list.indexOf(value) == -1 && list.push(value); return list },
|
AddUniq: function(list, value) { list = list||[], value && list.indexOf(value) == -1 && list.push(value); return list },
|
||||||
isIn: function(item) { var arg = arguments; for (var i = 1; i < arg.length; i++) {
|
isIn: function(item) { var arg = arguments; for (var i = 1; i < arg.length; i++) {
|
||||||
if (typeof arg[i] == code.OBJECT && arg[i].length > 0 && arg[i].indexOf(item) > -1) { return true }
|
if (typeof arg[i] == code.OBJECT && arg[i].length > 0 && arg[i].indexOf(item) > -1) { return true }
|
||||||
if (item == arg[i]) { return true }
|
if (item == arg[i]) { return true }
|
||||||
|
@ -281,7 +281,8 @@ Volcanos("user", {
|
|||||||
}
|
}
|
||||||
var target = can.page.Select(can, ui._target, "input.args[name="+key+"]")[0]
|
var target = can.page.Select(can, ui._target, "input.args[name="+key+"]")[0]
|
||||||
if (!target) { return }
|
if (!target) { return }
|
||||||
if (value != undefined) { target.value = target.value||value }
|
// if (value != undefined) { target.value = target.value||value }
|
||||||
|
if (value != undefined) { target.value = value }
|
||||||
if (target.value && hidden) { can.onmotion.hidden(can, can.page.parentNode(can, target, html.TR)) }
|
if (target.value && hidden) { can.onmotion.hidden(can, can.page.parentNode(can, target, html.TR)) }
|
||||||
return target.value
|
return target.value
|
||||||
},
|
},
|
||||||
@ -319,7 +320,7 @@ 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) })
|
||||||
action.layout(event), can.onmotion.delay(can, function() { action.focus() }, 300)
|
action.layout(event), can.onmotion.delay(can, function() { action.focus() }, 300)
|
||||||
function callback(key, button) { var sub = can._fields? can: can.sub; sub && sub.onaction && sub.onaction[key] && sub.onaction[key](event, sub, button, action) }
|
function callback(key, button) { var sub = can._fields? can: can.sub; sub && sub.onaction && sub.onaction[key] && sub.onaction[key](event, sub, button, action) }
|
||||||
callback("beforeInputs")
|
callback("beforeInputs", msg.Option(ctx.ACTION))
|
||||||
// ui._target._layout = action.layout
|
// ui._target._layout = action.layout
|
||||||
return button === true && action.submit(event, can, html.SUBMIT), action
|
return button === true && action.submit(event, can, html.SUBMIT), action
|
||||||
},
|
},
|
||||||
|
@ -305,7 +305,8 @@ Volcanos(chat.ONIMPORT, {
|
|||||||
if (sub._stacks_current) { var plugin = sub._stacks_current[0], current = plugin.current||{}
|
if (sub._stacks_current) { var plugin = sub._stacks_current[0], current = plugin.current||{}
|
||||||
can.core.List(sub._stacks_current, function(p) { current = p.current||current, p.current && (plugin = p) })
|
can.core.List(sub._stacks_current, function(p) { current = p.current||current, p.current && (plugin = p) })
|
||||||
if (plugin == sub._stacks_root) { var PLACE_UID = can.core.Item(can.Option())[0]
|
if (plugin == sub._stacks_root) { var PLACE_UID = can.core.Item(can.Option())[0]
|
||||||
var place_uid = can.Option(PLACE_UID) == can.misc.Search(can, PLACE_UID)? "": can.Option(PLACE_UID)
|
// var place_uid = can.Option(PLACE_UID) == can.misc.Search(can, PLACE_UID)? "": can.Option(PLACE_UID)
|
||||||
|
var place_uid = can.Option(PLACE_UID)
|
||||||
if (sub._stacks_current.length == 1) {
|
if (sub._stacks_current.length == 1) {
|
||||||
plugin.sub.onexport.hash(plugin.sub, place_uid)
|
plugin.sub.onexport.hash(plugin.sub, place_uid)
|
||||||
} else {
|
} else {
|
||||||
@ -473,7 +474,7 @@ Volcanos(chat.ONIMPORT, {
|
|||||||
msg.Option("otherList") && can.onimport.otherList && can.onimport.otherList(can, msg, can.core.Split(msg.Option("otherList")))
|
msg.Option("otherList") && can.onimport.otherList && can.onimport.otherList(can, msg, can.core.Split(msg.Option("otherList")))
|
||||||
},
|
},
|
||||||
itemcards: function(can, msg, cb, cbs, target) { target = target||can.ui.list||can._output
|
itemcards: function(can, msg, cb, cbs, target) { target = target||can.ui.list||can._output
|
||||||
if (msg.IsDetail()) { var value = msg.TableDetail(); value.uid = value.user_uid; var _msg = can.request(); _msg.Push(value)
|
if (msg.IsDetail()) { var value = msg.TableDetail(); var _msg = can.request(); _msg.Push(value)
|
||||||
if (!msg.Option("market_uid") && !msg.Option("message_uid")) {
|
if (!msg.Option("market_uid") && !msg.Option("message_uid")) {
|
||||||
value.user_avatar && can.page.Append(can, target, [{view: "place_info", _init: function(target) {
|
value.user_avatar && can.page.Append(can, target, [{view: "place_info", _init: function(target) {
|
||||||
_msg.action = [], _msg.PushButton("userInfo")
|
_msg.action = [], _msg.PushButton("userInfo")
|
||||||
@ -486,8 +487,7 @@ Volcanos(chat.ONIMPORT, {
|
|||||||
}, target)
|
}, target)
|
||||||
}}])
|
}}])
|
||||||
}
|
}
|
||||||
can.onappend.table(can, msg)
|
can.onappend.table(can, msg), can.page.Select(can, target, html.TR, function(target) {
|
||||||
can.page.Select(can, target, html.TR, function(target) {
|
|
||||||
target.className.indexOf("_uid") > -1 && can.page.ClassList.add(can, target, "hide")
|
target.className.indexOf("_uid") > -1 && can.page.ClassList.add(can, target, "hide")
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
@ -625,7 +625,7 @@ Volcanos(chat.ONIMPORT, {
|
|||||||
return value[key] && !can.base.isIn(value[key], "finish", "done") && {text: [can.user.transValue(can, value, key), "", [type, value[key], can.Conf("_trans.value."+key+".style."+value[key])||""]]}
|
return value[key] && !can.base.isIn(value[key], "finish", "done") && {text: [can.user.transValue(can, value, key), "", [type, value[key], can.Conf("_trans.value."+key+".style."+value[key])||""]]}
|
||||||
},
|
},
|
||||||
beginTime: function(can, value) {
|
beginTime: function(can, value) {
|
||||||
return (value.process_time||value.begin_time).split(" ")[0]+" ~ "+(value.finish_time||value.end_time).split(" ")[0]
|
return (value.process_time||value.begin_time||"").split(" ")[0]+" ~ "+(value.finish_time||value.end_time||"").split(" ")[0]
|
||||||
},
|
},
|
||||||
moneyView: function(can, value, key) { return {text: ["¥ "+(value[key]||value.price||value.amount)+" 元", "", "price"]} },
|
moneyView: function(can, value, key) { return {text: ["¥ "+(value[key]||value.price||value.amount)+" 元", "", "price"]} },
|
||||||
})
|
})
|
||||||
|
2
proto.js
2
proto.js
@ -127,7 +127,7 @@ var Volcanos = shy({iceberg: "", volcano: "", frame: chat.FRAME_JS, _cache: {},
|
|||||||
} return can.base.isUndefined(res) && key.indexOf(ctx.FEATURE+nfs.PT) == -1? can.Conf(can.core.Keys(ctx.FEATURE, key)): res
|
} return can.base.isUndefined(res) && key.indexOf(ctx.FEATURE+nfs.PT) == -1? can.Conf(can.core.Keys(ctx.FEATURE, key)): res
|
||||||
}, _conf: {},
|
}, _conf: {},
|
||||||
}, meta)); if (_can_name) { meta.cache[_can_name] = meta.cache[_can_name]||[], meta.cache[_can_name].push(can) } else { list.push(can) }
|
}, meta)); if (_can_name) { meta.cache[_can_name] = meta.cache[_can_name]||[], meta.cache[_can_name].push(can) } else { list.push(can) }
|
||||||
setTimeout(function() { can.require(can._follow? libs.concat(meta.libs, meta.frame): libs, cb) }, 1)
|
libs && setTimeout(function() { can.require(can._follow? libs.concat(meta.libs, meta.frame): libs, cb) }, 1)
|
||||||
return can
|
return can
|
||||||
})
|
})
|
||||||
try { if (typeof(window) == code.OBJECT) { var meta = Volcanos.meta
|
try { if (typeof(window) == code.OBJECT) { var meta = Volcanos.meta
|
||||||
|
Loading…
x
Reference in New Issue
Block a user