mirror of
https://shylinux.com/x/community
synced 2025-07-03 05:51:20 +08:00
19 lines
1.1 KiB
JavaScript
19 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: [can.onimport.uidView(can, value), can.onimport.timeView(can, value), can.onimport.textView(can, value)]},
|
|
] })
|
|
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)
|
|
}
|
|
},
|
|
})
|