mirror of
https://shylinux.com/x/volcanos
synced 2025-04-25 16:58:06 +08:00
add some
This commit is contained in:
parent
2e63b0259f
commit
459cb45bf4
@ -24,6 +24,7 @@ Volcanos(chat.ONIMPORT, {
|
|||||||
},
|
},
|
||||||
_session: function(can, msg) { can.misc.sessionStorage(can, msg._arg[0], msg._arg[1]), can.Update() },
|
_session: function(can, msg) { can.misc.sessionStorage(can, msg._arg[0], msg._arg[1]), can.Update() },
|
||||||
_field: function(can, msg, cb) {
|
_field: function(can, msg, cb) {
|
||||||
|
can.user.isMobile && can.onmotion.clear(can, can._output)
|
||||||
can.page.style(can, can._target, "visibility", ""), can.page.style(can, can._output, "visibility", "")
|
can.page.style(can, can._target, "visibility", ""), can.page.style(can, can._output, "visibility", "")
|
||||||
var height = can.ConfHeight()-can.onexport.actionHeight(can)-(can.onexport.statusHeight(can)||1), width = can.ConfWidth()
|
var height = can.ConfHeight()-can.onexport.actionHeight(can)-(can.onexport.statusHeight(can)||1), width = can.ConfWidth()
|
||||||
var tabs = false, tabHash = msg.Option("field.tabs"); if (tabHash) {
|
var tabs = false, tabHash = msg.Option("field.tabs"); if (tabHash) {
|
||||||
@ -38,7 +39,7 @@ Volcanos(chat.ONIMPORT, {
|
|||||||
msg.Table(function(item) { tabs && can.onmotion.cache(can, function() { return tabHash })
|
msg.Table(function(item) { tabs && can.onmotion.cache(can, function() { return tabHash })
|
||||||
can.onappend._plugin(can, item, {index: item.index, args: can.base.Obj(item.args||item.arg, []), height: height, width: width}, function(sub) { can._plugins = (can._plugins||[]).concat([sub])
|
can.onappend._plugin(can, item, {index: item.index, args: can.base.Obj(item.args||item.arg, []), height: height, width: width}, function(sub) { can._plugins = (can._plugins||[]).concat([sub])
|
||||||
sub.run = function(event, cmds, cb) { var index = msg.Option(ice.MSG_INDEX)||item.index; can.run(can.request(event, {pod: item.space}), (msg[ice.FIELD_PREFIX]? msg[ice.FIELD_PREFIX]: index? [ctx.RUN, index]: []).concat(cmds), cb, true) }
|
sub.run = function(event, cmds, cb) { var index = msg.Option(ice.MSG_INDEX)||item.index; can.run(can.request(event, {pod: item.space}), (msg[ice.FIELD_PREFIX]? msg[ice.FIELD_PREFIX]: index? [ctx.RUN, index]: []).concat(cmds), cb, true) }
|
||||||
can.page.ClassList.has(can, sub._target, html.FLOAT)? can.onmotion.float(sub): sub.onimport.size(sub, height, width, true), cb && cb(sub)
|
can.page.ClassList.has(can, sub._target, html.FLOAT)? can.onmotion.float(sub): sub.onimport.size(sub, height, width, !can.user.isMobile), cb && cb(sub)
|
||||||
if (item.style == html.FLOAT) { return } can.onmotion.delay(can, function() { can.onmotion.scrollIntoView(can, sub._target) }, 300)
|
if (item.style == html.FLOAT) { return } can.onmotion.delay(can, function() { can.onmotion.scrollIntoView(can, sub._target) }, 300)
|
||||||
sub.onexport.output = function() { if (tabs) { msg.Option(ice.MSG_ACTION) && can.onappend._action(can, msg.Option(ice.MSG_ACTION))
|
sub.onexport.output = function() { if (tabs) { msg.Option(ice.MSG_ACTION) && can.onappend._action(can, msg.Option(ice.MSG_ACTION))
|
||||||
sub.sub.onimport.tabs(sub.sub, [{name: tabHash.slice(0, 6)}], function() { tabs || can.onmotion.cache(can, function() { return tabHash }) }), tabs = false
|
sub.sub.onimport.tabs(sub.sub, [{name: tabHash.slice(0, 6)}], function() { tabs || can.onmotion.cache(can, function() { return tabHash }) }), tabs = false
|
||||||
|
@ -15,6 +15,9 @@ Volcanos(chat.ONIMPORT, {
|
|||||||
} cb && cb(msg)
|
} cb && cb(msg)
|
||||||
},
|
},
|
||||||
textView: function(can, value, key, type) { return value[key] && {text: [can.user.transValue(can, value, key), "", [type, value[key], can.Conf("_trans.value."+key+".style."+value[key])||""]]} },
|
textView: function(can, value, key, type) { return value[key] && {text: [can.user.transValue(can, value, key), "", [type, value[key], can.Conf("_trans.value."+key+".style."+value[key])||""]]} },
|
||||||
|
shareTitle: function(can, msg, title, content) { if (msg.IsDetail()) { var value = msg.TableDetail()
|
||||||
|
msg.Option("_share_title", (value[title]||value.name||value.uid).slice(0, 6)), msg.Option("_share_content", value[content]||value.info)
|
||||||
|
} },
|
||||||
itemcards: function(can, msg, cb, cbs) {
|
itemcards: function(can, msg, cb, cbs) {
|
||||||
if (msg.IsDetail()) { var value = msg.TableDetail(); msg.Show(can)
|
if (msg.IsDetail()) { var value = msg.TableDetail(); msg.Show(can)
|
||||||
can.page.Select(can, can._output, html.TR, function(target) {
|
can.page.Select(can, can._output, html.TR, function(target) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user