mirror of
https://shylinux.com/x/community
synced 2025-05-09 07:08:11 +08:00
17 lines
1.1 KiB
JavaScript
17 lines
1.1 KiB
JavaScript
Volcanos(chat.ONIMPORT, {
|
|
_init: function(can, msg) { var USER_PLACE_ROLE = msg.Option("_user_place_role")
|
|
can.onimport.myView(can, msg, function(value) { return [
|
|
{view: html.TITLE, list: [value.user_name, can.onimport.textView(can, value, USER_PLACE_ROLE)]},
|
|
{view: html.STATUS, list: [value.uid.slice(0, 6), can.onimport.timeView(can, value), can.onimport.textView(can, value)]},
|
|
{view: html.STATUS, list: [value.begin_time.split(" ")[0], value.end_time.split(" ")[0]]},
|
|
] })
|
|
if (msg.Length() == 0) { var target = can.page.Append(can, can._output, [{view: html.CODE, list: [{view: [mdb.INFO, "", "请创建权限申请"]}]}])._target
|
|
can.runAction({}, mdb.INPUTS, [USER_PLACE_ROLE], function(msg) { msg.Table(function(value) {
|
|
can.onappend.input(can, {type: html.BUTTON, name: value.name, value: "我是"+can.user.trans(can, value.name, null, "value."+USER_PLACE_ROLE), style: value[USER_PLACE_ROLE] == "2"? html.DANGER: html.NOTICE, onclick: function(event) {
|
|
can.runAction(event, mdb.CREATE, [USER_PLACE_ROLE, value[USER_PLACE_ROLE]])
|
|
}}, "", target)
|
|
}) }), can.onappend.style(can, html.FORM)
|
|
}
|
|
},
|
|
})
|