mirror of
https://shylinux.com/x/community
synced 2025-04-26 01:54:05 +08:00
26 lines
1.3 KiB
JavaScript
26 lines
1.3 KiB
JavaScript
Volcanos(chat.ONIMPORT, {
|
|
_init: function(can, msg) {
|
|
can.ui = can.page.Append(can, can._output, ["reception", "volume"]), can.onimport.reception(can, msg)
|
|
},
|
|
reception: function(can, msg) {
|
|
can.page.Append(can, can.ui.reception, msg.Table(function(value) {
|
|
return {view: [html.ITEM, "", value.name], onclick: function(event) { can.onmotion.select(can, can.ui.reception, html.DIV_ITEM, event.target)
|
|
if (can.onmotion.cache(can, function() { return value.name }, can.ui.volume)) { return } can.onimport.volume(can, value)
|
|
}}
|
|
})); var list = can.page.Select(can, can.ui.reception, html.DIV_ITEM); list[0] && list[0].click()
|
|
},
|
|
volume: function(can, reception) {
|
|
can.runAction(can.request({}, {reception_uid: reception.uid}), "volumeList", [], function(msg) {
|
|
can.page.Append(can, can.ui.volume, msg.Table(function(value) { value.reception_uid = reception.uid, value.volume_uid = value.uid
|
|
return {view: html.ITEM, list: [
|
|
{view: html.STATUS, list: [{text: "开始时间: "+value.begin_time}]},
|
|
{view: html.STATUS, list: [{text: "结束时间: "+value.end_time}]},
|
|
can.onimport.titleAction(can, value, "create", "cancel"),
|
|
]}
|
|
}))
|
|
})
|
|
},
|
|
})
|
|
Volcanos(chat.ONACTION, {
|
|
create: function(event, can, button) { can.runAction(event, button) },
|
|
}) |