mirror of
https://shylinux.com/x/community
synced 2025-07-01 21:21:19 +08:00
add some
This commit is contained in:
parent
8d3a1a9e20
commit
aae5dc83c6
@ -181,7 +181,9 @@ func (s Table) SendMessage(m *ice.Message, from_user_uid, to_user_uid string, ar
|
||||
mdb.NAME, cmd.Help, mdb.ICON, cmd.Icon, web.SPACE, m.Option(ice.MSG_USERPOD), ctx.INDEX, m.PrefixKey(), ctx.ARGS, kit.Join(arg))
|
||||
}
|
||||
func (s Table) DoneMessage(m *ice.Message, arg ...string) {
|
||||
m.Spawn(ice.Maps{db.DB: ""}).Cmd(message{}, message{}.Done, kit.Dict(model.UID, m.Option(model.MESSAGE_UID)))
|
||||
if m.Option(model.MESSAGE_UID) != "" {
|
||||
m.Spawn(ice.Maps{db.DB: ""}).Cmd(message{}, message{}.Done, kit.Dict(model.UID, m.Option(model.MESSAGE_UID)))
|
||||
}
|
||||
}
|
||||
func (s Table) SendTemplate(m *ice.Message, from, user_uid, title string, arg ...string) {
|
||||
if m.IsErr() {
|
||||
|
@ -27,6 +27,10 @@ func (s Message) List(m *ice.Message, arg ...string) {
|
||||
msg := s.SelectDetail(m.Spawn(), model.TO_USER_UID, m.Option(model.USER_UID), model.UID, arg[1])
|
||||
m.ProcessField(msg.Append(ctx.INDEX), kit.Split(msg.Append(ctx.ARGS)))
|
||||
m.Push(ctx.STYLE, html.OUTPUT)
|
||||
m.Option("field.option", kit.Format(kit.Dict(model.MESSAGE_UID, arg[1])))
|
||||
if m.Option(model.MESSAGE_STATUS) == MessageCreate.String() {
|
||||
s.Update(m, kit.Dict(model.STATUS, MessageRead), kit.Simple(model.TO_USER_UID, m.Option(model.USER_UID), model.UID, arg[1], model.STATUS, MessageCreate)...)
|
||||
}
|
||||
} else {
|
||||
return
|
||||
}
|
||||
@ -44,10 +48,10 @@ func (s Message) List(m *ice.Message, arg ...string) {
|
||||
s.SelectJoinUser(m)
|
||||
}
|
||||
func (s Message) Read(m *ice.Message, arg ...string) {
|
||||
s.Table.Update(m, kit.Dict(model.STATUS, MessageRead), kit.Simple(model.TO_USER_UID, m.Option(model.USER_UID), m.OptionSimple(model.UID))...)
|
||||
s.Table.Update(m, kit.Dict(model.STATUS, MessageRead), kit.Simple(model.TO_USER_UID, m.Option(model.USER_UID), m.OptionSimple(model.UID), model.STATUS, MessageCreate)...)
|
||||
}
|
||||
func (s Message) Done(m *ice.Message, arg ...string) {
|
||||
s.Table.Update(m, kit.Dict(model.STATUS, MessageDone), kit.Simple(model.TO_USER_UID, m.Option(model.USER_UID), m.OptionSimple(model.UID))...)
|
||||
s.Table.Update(m, kit.Dict(model.STATUS, MessageDone), kit.Simple(model.TO_USER_UID, m.Option(model.USER_UID), m.OptionSimple(model.UID), model.STATUS, MessageRead)...)
|
||||
}
|
||||
|
||||
type message struct{ Message }
|
||||
|
@ -1,24 +1,17 @@
|
||||
Volcanos(chat.ONIMPORT, {
|
||||
_init: function(can, msg) {
|
||||
if (msg.IsDetail()) { var value = msg.TableDetail()
|
||||
msg.Option("_share_title", value.place_name+" "+value.name)
|
||||
}
|
||||
if (msg.IsDetail()) { var value = msg.TableDetail(); msg.Option("_share_title", value.place_name+" "+value.name) }
|
||||
can.onimport.itemcards(can, msg, function(value) {
|
||||
value.icons = value.user_avatar||value.icon; return [
|
||||
{view: html.TITLE, list: [value.place_name, value.name, value.message_status != "done" && can.onimport.textView(can, value, "message_status", mdb.STATUS)]},
|
||||
value.icons = value.user_avatar||value.icon
|
||||
var args = can.core.Split(value.args)
|
||||
return [
|
||||
{view: html.TITLE, list: [value.place_name, value.name, (args[1]||"").slice(0, 6), value.message_status != "done" && can.onimport.textView(can, value, "message_status", mdb.STATUS)]},
|
||||
{view: html.STATUS, list: [value.uid.slice(0, 6), can.base.TimeTrim(value.created_at), value.user_name]},
|
||||
{view: html.OUTPUT, list: [value.info]},
|
||||
value.info && {view: html.OUTPUT, list: [value.info]},
|
||||
]
|
||||
}, function(event, value) {
|
||||
var args = can.core.Split(value.args)[1]
|
||||
}, function(event, value) { var args = can.core.Split(value.args)[1]||""
|
||||
can.onexport.title(can, [value.place_name, value.name, args.slice(0, 6)].join(" "))
|
||||
can.Option("uid", value.uid), can.Update(event)
|
||||
can.Option(UID, value.uid), can.Update(can.request(event, value))
|
||||
})
|
||||
/*
|
||||
, function(event, value) { can.onimport.float(can, value, function(sub) { var run = sub.run
|
||||
sub.run = function(event, cmds, cb) { run(can.request(event, {message_uid: value.uid}), cmds, cb) }
|
||||
can.run(can.request({}, value), [ctx.ACTION, "read"], function() {})
|
||||
}) })
|
||||
*/
|
||||
},
|
||||
})
|
@ -1,7 +1,7 @@
|
||||
body.light.mobile { --plugin-bg-color:#f4f5f9; --output-bg-color:#fefefd; }
|
||||
body.mobile fieldset.panel.Action>div.output { background-color:var(--plugin-bg-color); }
|
||||
$output { background-color:var(--plugin-bg-color); }
|
||||
$output div.item.card img { padding:0; margin:0; margin-right:10px; height:48px; width:48px; }
|
||||
$output div.item.card { margin-bottom:5px; }
|
||||
$output div.item.card div.status span { word-break:break-all; }
|
||||
$output div.item.card img { border-radius:5px; padding:0; margin:0; margin-right:10px; height:48px; width:48px; }
|
||||
$output>div>div.list { border-radius:10px; background-color:var(--output-bg-color); padding:10px; margin:10px; }
|
||||
$output>div>div.list>div.title { font-weight:bold; display:flex; align-items:center; }
|
||||
$output>div>div.list>div.title span:first-child { flex-grow:1; }
|
||||
@ -17,9 +17,6 @@ $output>div>div.list>div.action { display:flex; justify-content:center; }
|
||||
$output>div>div.list>div.action div.item { margin-right:5px; }
|
||||
$output>div>div.list>div.action div.item input[type=button] { color:var(--notice-bg-color); border:none; }
|
||||
$output>div>div.list>div.action div.item i { display:none; }
|
||||
$output>div>div.list.myorder div.item span { font-size:12px; }
|
||||
// $output>div>div.list.myorder { padding:0 10px; }
|
||||
// $output>div>div.list.myorder div.title { display:none; }
|
||||
$output>div.output>div.list:last-child { margin-bottom:0; }
|
||||
$output>div.action div.item.button { margin-right:5px; }
|
||||
$output>div.action div.item.button input { border:none; color:var(--notice-bg-color); min-width:60px; float:left; }
|
||||
@ -43,18 +40,20 @@ $output fieldset.form>div.output>div.code>input[type=button] { font-size:18px; m
|
||||
$output fieldset>div.output>div.code>input[type=button] { background-color:var(--notice-bg-color); color:var(--notice-fg-color); margin-right:10px; min-width:80px; float:right; }
|
||||
$output fieldset>div.output>div.code>input[type=button].danger { background-color:var(--danger-bg-color); color:var(--danger-fg-color); }
|
||||
$output fieldset>div.output>div.code>input[type=button][name=cancel] { border:var(--box-border); background-color:var(--danger-bg-color); color:var(--danger-fg-color); }
|
||||
$output fieldset.story fieldset.story { position:absolute; top:0; }
|
||||
$output fieldset.story fieldset.story { position:absolute; top:0; height:100%; width:100%; }
|
||||
$output fieldset.story { box-shadow:none; }
|
||||
$output fieldset.story>div.output { background-color:var(--plugin-bg-color); }
|
||||
$output fieldset.story>div.output table.content td { box-shadow:none; }
|
||||
$output fieldset.story>div.output table.content tr.uid { display:none; }
|
||||
$output fieldset.story>div.output table.content td img { max-width:100%; }
|
||||
// $output>fieldset.story>div.output div.item.card img { border-radius:50%; }
|
||||
$output>fieldset.story>div.output div.item.card>div.output { padding:10px; }
|
||||
$output>fieldset.story>div.output div.item.card>div.output div.output { padding:10px 0; white-space:pre-line; }
|
||||
$output>fieldset.story>div.output div.item.card>div.output div.output { padding:5px 0; white-space:pre-line; }
|
||||
$output fieldset.story>div.output>div.code { text-align:center; }
|
||||
$output fieldset.story>div.output>div.code>img { display:block; margin:auto; }
|
||||
$output fieldset.story>div.output>div.code>img { display:block; margin:auto; width:100%; max-width:390px; }
|
||||
$output>fieldset.qrcode table.content td { text-align:center; }
|
||||
$output>fieldset.qrcode div.code { text-align:center; }
|
||||
body.light.mobile { --plugin-bg-color:#f4f5f9; --output-bg-color:#fefefd; }
|
||||
body.mobile $output>div>div.list div.item.index span { font-size:12px; white-space:pre; }
|
||||
body.mobile fieldset.panel.Action>div.output { background-color:var(--plugin-bg-color); }
|
||||
body:not(.mobile) $output>fieldset.story>div.output div.item.card:not(:hover) { background-color:var(--output-bg-color); }
|
||||
body.en $output>fieldset table.content td:first-child { max-width:180px; width:unset;}
|
@ -82,8 +82,10 @@ func (s Portal) List(m *ice.Message, arg ...string) {
|
||||
m.Cmdy(s.UserPlace, m.Option(model.USER_UID)).PushAction(s.PlaceRemove).Action(s.PlaceCreate, s.ScanQRCode)
|
||||
kit.If(!m.IsErr() && m.Length() == 0, func() { m.EchoInfoButton("", s.PlaceCreate, s.ScanQRCode) })
|
||||
} else if len(arg) == 1 {
|
||||
msg := m.Cmd(s.Place, s.Table.Select, model.UID, arg[0])
|
||||
s.AddRecent(m.Spawn(), arg[0], msg.Append(model.NAME), msg.Append(mdb.ICONS))
|
||||
if arg[0] != "" {
|
||||
msg := m.Cmd(s.Place, s.Table.Select, model.UID, arg[0])
|
||||
s.AddRecent(m.Spawn(), arg[0], msg.Append(model.NAME), msg.Append(mdb.ICONS))
|
||||
}
|
||||
s.Hash.List(m).SortInt(mdb.ORDER)
|
||||
} else if len(arg) == 2 {
|
||||
msg := m.Cmd(s.Place, s.Table.Select, model.UID, arg[0])
|
||||
|
@ -22,32 +22,51 @@ Volcanos(chat.ONIMPORT, {
|
||||
myPortal: function(can, msg) {
|
||||
var PLACE_UID = msg.Option("_place_uid"), PLACE_NAME = msg.Option("_place_name"), PLACE_TYPE = msg.Option("_place_type")
|
||||
var USER_PLACE_ROLE = msg.Option("_user_place_role"), STREET_NAME = msg.Option("_street_name")
|
||||
can.isCmdMode() && (can.db.hash = can.misc.SearchHash(can)), can.db.hash[0] && can.onexport.session(can, PLACE_UID, can.db.hash[0])
|
||||
if (can.Option(ctx.INDEX) == "") {
|
||||
can.isCmdMode() && (can.db.hash = can.base.Obj(can.misc.SearchHash(can), can.db.hash)), can.db.hash[0] && can.onexport.session(can, PLACE_UID, can.db.hash[0])
|
||||
if (can.Option(PLACE_UID) == "" && can.Option(ctx.INDEX) == "") {
|
||||
if (can.db.hash.length > 1 && can.db.hash[0]) { return can.Option(PLACE_UID, can.db.hash[0]), can.Option(ctx.INDEX, can.db.hash[1]), can.Update() }
|
||||
can.ui = can.page.Append(can, can._output, [
|
||||
{view: html.OUTPUT, list: ["myplace.list", "myindex.list"]},
|
||||
{view: html.OUTPUT, list: [
|
||||
// "mydebug.list",
|
||||
"myplace.list",
|
||||
"myindex.list",
|
||||
]},
|
||||
{view: html.ACTION, list: ["myorder.list"]},
|
||||
])
|
||||
can.page.Append(can, can.ui.myplace, [{view: html.TITLE, list: [
|
||||
{text: can.user.trans(can, "My "+can.base.capital(PLACE_NAME.replace("_name", "")), null, html.INPUT)},
|
||||
{view: html.ACTION, _init: function(target) { msg.Option(ice.MSG_ACTION) && can.onappend._action(can, msg.Option(ice.MSG_ACTION), target) }}
|
||||
]}])
|
||||
can.ui.mydebug && can.onimport.myDebug(can, msg, can.ui.mydebug)
|
||||
var uid = can.onimport.myPlace(can, msg, can.ui.myplace, PLACE_UID, PLACE_NAME, PLACE_TYPE)
|
||||
msg.Length() > 0? can.run({}, [uid], function(msg) {
|
||||
can.page.Append(can, can.ui.myindex, [{view: html.TITLE, list: [{text: can.user.trans(can, "My Index", "我的应用")}]}])
|
||||
can.onimport.myIndex(can, msg, can.ui.myindex, PLACE_UID, USER_PLACE_ROLE), can.onimport.selectIndex(can, can.sup.current)
|
||||
can.page.Append(can, can.ui.myorder, [{view: html.TITLE, list: [{text: can.user.trans(can, "My Order", "我的系统")}]}])
|
||||
can.onimport.myOrder(can, msg, can.ui.myorder, PLACE_UID, USER_PLACE_ROLE)
|
||||
}): can.run({}, [uid], function(msg) {
|
||||
can.page.Append(can, can.ui.myorder, [{view: html.TITLE, list: [{text: can.user.trans(can, "My Order", "我的系统")}]}])
|
||||
can.onimport.myOrder(can, msg, can.ui.myorder, PLACE_UID, USER_PLACE_ROLE)
|
||||
}) , can.ui.place_count = msg.Length()
|
||||
}), can.ui.place_count = msg.Length()
|
||||
} else if (can.Option(ctx.INDEX) == "") {
|
||||
can.ui = can.page.Append(can, can._output, [
|
||||
{view: html.OUTPUT, list: [
|
||||
// "mydebug.list",
|
||||
"myplace.list",
|
||||
"myindex.list",
|
||||
]},
|
||||
{view: html.ACTION, list: ["myorder.list"]},
|
||||
])
|
||||
can.onimport.myIndex(can, msg, can.ui.myindex, PLACE_UID, USER_PLACE_ROLE), can.onimport.selectIndex(can, {
|
||||
place_name: msg.Option("place_name"),
|
||||
}, msg.Option("user_place_role"))
|
||||
can.onimport.myOrder(can, msg, can.ui.myorder, PLACE_UID, USER_PLACE_ROLE)
|
||||
} else {
|
||||
can.onimport.myData(can, msg, can._output, PLACE_UID, PLACE_NAME)
|
||||
}
|
||||
},
|
||||
myDebug: function(can, msg, target, PLACE_UID, USER_PLACE_ROLE) {
|
||||
can.page.Append(can, target, [{view: html.TITLE, list: [{text: can.user.trans(can, "My Debug", "我的调试")}]}])
|
||||
can.page.Append(can, target, [{text: window.innerWidth+", "+window.innerHeight}])
|
||||
},
|
||||
myPlace: function(can, msg, target, PLACE_UID, PLACE_NAME, PLACE_TYPE) { var place_uid
|
||||
can.page.Append(can, target, [{view: html.TITLE, list: [
|
||||
{text: can.user.trans(can, "My "+can.base.capital(PLACE_NAME.replace("_name", "")), null, html.INPUT)},
|
||||
{view: html.ACTION, _init: function(target) { msg.Option(ice.MSG_ACTION) && can.onappend._action(can, msg.Option(ice.MSG_ACTION), target) }}
|
||||
]}])
|
||||
var USER_PLACE_ROLE = msg.Option("_user_place_role"), STREET_NAME = msg.Option("_street_name")
|
||||
can.ui._target = can.page.Append(can, target||can._output, [html.OUTPUT])._target
|
||||
msg.Length() > 0 && can.page.Append(can, can.ui._target, msg.Table(function(value) {
|
||||
@ -81,6 +100,7 @@ Volcanos(chat.ONIMPORT, {
|
||||
}))
|
||||
},
|
||||
myIndex: function(can, msg, target, PLACE_UID, USER_PLACE_ROLE) {
|
||||
can.page.Append(can, target, [{view: html.TITLE, list: [{text: can.user.trans(can, "My Index", "我的应用")}]}])
|
||||
var role = can.page.Append(can, target, [{view: aaa.ROLE, list: can.core.Item(can.Conf("_trans.value."+USER_PLACE_ROLE), function(key, value) {
|
||||
if (can.base.isIn(key, ctx.STYLE, mdb.ICONS)) { return }
|
||||
return {text: [can.user.trans(can, key, value), "", key], onclick: function(event) {
|
||||
@ -92,6 +112,7 @@ Volcanos(chat.ONIMPORT, {
|
||||
can.onimport.myList(can, _msg, output, PLACE_UID, USER_PLACE_ROLE)
|
||||
},
|
||||
myOrder: function(can, msg, target, PLACE_UID, USER_PLACE_ROLE) {
|
||||
can.page.Append(can, target, [{view: html.TITLE, list: [{text: can.user.trans(can, "My Order", "我的系统")}]}])
|
||||
var _msg = can.request(); msg.Table(function(value) { if (value.order > 99) { _msg.Push(value) } })
|
||||
var output = can.page.Append(can, target, [html.OUTPUT])._target
|
||||
can.onimport.myList(can, _msg, output, PLACE_UID, USER_PLACE_ROLE)
|
||||
@ -122,11 +143,7 @@ Volcanos(chat.ONIMPORT, {
|
||||
})
|
||||
can.onexport.title(can, sub.Conf(PLACE_NAME, msg.Option(PLACE_NAME)), value.help)
|
||||
sub.onexport.title = function(sub) { can.onexport.title.apply(can.onexport, [can].concat(can.core.List(arguments).slice(1))) }
|
||||
var run = sub.run
|
||||
sub.run = function(event, cmds, cb) {
|
||||
can.request(event, {_place_name: sub.Conf(PLACE_NAME)})
|
||||
run(event, cmds, cb)
|
||||
}
|
||||
var run = sub.run; sub.run = function(event, cmds, cb) { run(can.request(event, {_place_name: sub.Conf(PLACE_NAME)}), cmds, cb) }
|
||||
sub.onexport._output = function(_sub, msg) {
|
||||
can.core.Item(can.onimport, function(key, value) { _sub.onimport[key] = _sub.onimport[key]||value })
|
||||
can.core.Item(can.onexport, function(key, value) { _sub.onexport[key] = _sub.onexport[key]||value })
|
||||
@ -143,19 +160,16 @@ Volcanos(chat.ONIMPORT, {
|
||||
can.onexport.hash(can, place_uid||can.Option(PLACE_UID), index||can.Option(ctx.INDEX), uid), can.Update()
|
||||
}
|
||||
_sub.onexport.title = function(_sub, title) {
|
||||
// title? can.onexport.title(can, sub.Conf(PLACE_NAME), title):
|
||||
title? can.onexport.title(can, title):
|
||||
can.onexport.title(can, sub.Conf(PLACE_NAME), sub.ConfHelp(), msg.Option("_share_title")||"")
|
||||
title? can.onexport.title(can, title): can.onexport.title(can, sub.Conf(PLACE_NAME), sub.ConfHelp(), msg.Option("_share_title")||"")
|
||||
}
|
||||
can.onexport.hash(can, can.Option(PLACE_UID), value.index, sub.Option(UID))
|
||||
can.onexport.title(can, sub.Conf(PLACE_NAME), sub.ConfHelp(), msg.Option("_share_title")||"")
|
||||
can.user.agent.init(can, msg.Option("_share_content"), msg.Option("_share_icons")||value.icons)
|
||||
can.page.Appends(can, ui.action, list), msg.Option(ice.MSG_ACTION) && can.onappend._action(sub, msg.Option(ice.MSG_ACTION), ui.action, null, true)
|
||||
back = function() { can.page.ClassList.add(can, can._fields, "_back")
|
||||
if (_sub.onaction._back) { _sub.onaction._back(_sub) }
|
||||
can.Update()
|
||||
if (_sub.onaction._back && _sub.onaction._back(_sub)) { return } can.Update()
|
||||
}
|
||||
_sub.onaction._back = function() {
|
||||
_sub.onaction._back = function(_sub) {
|
||||
if (sub.Option(UID)) {
|
||||
can.onexport.hash(can, can.Option(PLACE_UID), can.Option(ctx.INDEX)), sub.Option(UID, ""), sub.Update()
|
||||
} else {
|
||||
@ -179,9 +193,9 @@ Volcanos(chat.ONIMPORT, {
|
||||
can.user.title((value._title||"")+" "+sub.ConfHelp())
|
||||
return
|
||||
}
|
||||
can.misc.localStorage(can, [value.space, value.index, mdb.HASH].join(","), value.args? [value.args[0]]: "")
|
||||
var args = value.args; value.args = []; value.type = html.PLUGIN, value.style = html.OUTPUT
|
||||
can._root.Action.onappend.plugin(can._root.Action, value, function(sub) { action._plugins[key] = sub
|
||||
can.misc.localStorage(can, [sub.ConfSpace(), sub.ConfIndex(), mdb.HASH].join(","), "")
|
||||
can.page.SelectChild(can, action._output, html.FIELDSET_PLUGIN, function(target) { can.onmotion.toggle(can, target, target == sub._target) })
|
||||
sub.onimport.size(sub, window.innerHeight, window.innerWidth)
|
||||
can.user.title((value._title||"")+" "+sub.ConfHelp())
|
||||
@ -190,7 +204,7 @@ Volcanos(chat.ONIMPORT, {
|
||||
},
|
||||
float: function(can, value, cb) { value.style = html.OUTPUT
|
||||
can.onappend.plugin(can, value, function(sub) { var _back = can.onaction._back
|
||||
can.onaction._back = function() { can.onaction._back = _back, can.page.Remove(can, sub._target), can.onexport.title(can) }
|
||||
can.onaction._back = function() { can.onaction._back = _back, can.page.Remove(can, sub._target), can.onexport.title(can); return true }
|
||||
can.onaction._refresh = function() { sub.Update(), can.onmotion.delay(can, function() { can.user.toastSuccess(can, "refresh") }, 300) }
|
||||
sub.onexport.output = function(_sub, msg) { can.onexport.title(can, sub.ConfHelp()+" "+msg.Option("_share_title"))
|
||||
sub.onimport.size(sub, window.innerHeight-html.ACTION_HEIGHT, window.innerWidth, false)
|
||||
|
@ -82,7 +82,10 @@
|
||||
"message_status": {
|
||||
"create": "未读",
|
||||
"read": "待办",
|
||||
"done": "完成"
|
||||
"done": "完成",
|
||||
"style": {
|
||||
"create": "danger"
|
||||
}
|
||||
},
|
||||
"service_type": {
|
||||
"worker": "空间"
|
||||
|
@ -19,14 +19,17 @@ type recent struct {
|
||||
|
||||
func (s recent) Create(m *ice.Message, arg ...string) {
|
||||
if s.Table.Select(m, m.OptionSimple(model.USER_UID, web.SPACE, ctx.INDEX, ctx.ARGS)...).Length() == 0 {
|
||||
s.Table.Create(m, kit.Simple(arg, model.UPDATED_AT, m.Time(), m.OptionSimple(model.USER_UID))...)
|
||||
} else {
|
||||
s.Table.Update(m, kit.Dict(), m.OptionSimple(model.USER_UID, web.SPACE, ctx.INDEX, ctx.ARGS)...)
|
||||
}
|
||||
s.Table.Create(m, kit.Simple(arg, m.OptionSimple(model.USER_UID))...)
|
||||
}
|
||||
func (s recent) Remove(m *ice.Message, arg ...string) {
|
||||
s.Table.Delete(m, m.OptionSimple(model.USER_UID, model.UID)...)
|
||||
}
|
||||
func (s recent) List(m *ice.Message, arg ...string) {
|
||||
if len(arg) == 1 {
|
||||
s.Orders(m, s.Desc(model.UPDATED_AT))
|
||||
if len(arg) < 2 {
|
||||
s.Select(m, model.USER_UID, m.Option(model.USER_UID))
|
||||
} else if len(arg) == 2 {
|
||||
s.SelectDetail(m, model.USER_UID, m.Option(model.USER_UID), model.UID, arg[1])
|
||||
|
@ -3,15 +3,16 @@ Volcanos(chat.ONIMPORT, {
|
||||
can.onimport.itemcards(can, msg, function(value) { var args = can.core.Split(value.args)
|
||||
var sub = can._root.Action._plugins[[value.space, value.index, args[0]].join(".")]
|
||||
return [
|
||||
{view: html.TITLE, list: [[args[1], value.name].join(" "), sub? {text: ["load", "", mdb.STATUS]}: ""]},
|
||||
{view: html.STATUS, list: [value.uid.slice(0, 6), can.base.TimeTrim(value.created_at)]},
|
||||
{view: html.STATUS, list: [value.space]},
|
||||
{view: html.STATUS, list: [value.index]},
|
||||
{view: html.OUTPUT, list: [value.info]},
|
||||
{view: html.TITLE, list: [[args[1]].join(" "), sub? {text: ["load", "", mdb.STATUS]}: ""]},
|
||||
{view: html.STATUS, list: [value.uid.slice(0, 6), can.base.TimeTrim(value.updated_at), value.name]},
|
||||
// {view: html.STATUS, list: [value.name]},
|
||||
// {view: html.STATUS, list: [value.space]},
|
||||
// {view: html.STATUS, list: [value.index]},
|
||||
// {view: html.OUTPUT, list: [value.info]},
|
||||
]
|
||||
}, function(event, value) { var args = can.core.Split(value.args)
|
||||
can.onimport.plugin(can, {_title: args[1], space: value.space, index: value.index, args: args[0]})
|
||||
can.onaction._back(can)
|
||||
can.onimport.plugin(can, {_title: args[1], space: value.space, index: value.index, args: [args[0]]})
|
||||
})
|
||||
},
|
||||
})
|
@ -7,8 +7,8 @@ Volcanos(chat.ONIMPORT, {
|
||||
{view: html.STATUS, list: [value.module, value.version]},
|
||||
{view: html.STATUS, list: [value.domain.split("?")[0]]},
|
||||
] }, function(event, value) {
|
||||
can.onimport.plugin(can, {space: value.space||value.nodename, index: value.index})
|
||||
can.onaction._back(can)
|
||||
can.onimport.plugin(can, {space: value.space||value.nodename, index: value.index})
|
||||
})
|
||||
},
|
||||
})
|
Loading…
x
Reference in New Issue
Block a user