mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-24 02:20:13 +01:00
🎨 Attribute Panel - Database attributes custom sorting https://github.com/siyuan-note/siyuan/issues/11428
This commit is contained in:
parent
0f6a280513
commit
2058f9a0c0
5 changed files with 90 additions and 17 deletions
|
|
@ -211,7 +211,7 @@ func removeAttributeViewKey(c *gin.Context) {
|
|||
util.PushReloadAttrView(avID)
|
||||
}
|
||||
|
||||
func sortAttributeViewKey(c *gin.Context) {
|
||||
func sortAttributeViewViewKey(c *gin.Context) {
|
||||
ret := gulu.Ret.NewResult()
|
||||
defer c.JSON(http.StatusOK, ret)
|
||||
|
||||
|
|
@ -228,7 +228,30 @@ func sortAttributeViewKey(c *gin.Context) {
|
|||
keyID := arg["keyID"].(string)
|
||||
previousKeyID := arg["previousKeyID"].(string)
|
||||
|
||||
err := model.SortAttributeViewKey(avID, viewID, keyID, previousKeyID)
|
||||
err := model.SortAttributeViewViewKey(avID, viewID, keyID, previousKeyID)
|
||||
if nil != err {
|
||||
ret.Code = -1
|
||||
ret.Msg = err.Error()
|
||||
return
|
||||
}
|
||||
|
||||
util.PushReloadAttrView(avID)
|
||||
}
|
||||
|
||||
func sortAttributeViewKey(c *gin.Context) {
|
||||
ret := gulu.Ret.NewResult()
|
||||
defer c.JSON(http.StatusOK, ret)
|
||||
|
||||
arg, ok := util.JsonArg(c, ret)
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
|
||||
avID := arg["avID"].(string)
|
||||
keyID := arg["keyID"].(string)
|
||||
previousKeyID := arg["previousKeyID"].(string)
|
||||
|
||||
err := model.SortAttributeViewKey(avID, keyID, previousKeyID)
|
||||
if nil != err {
|
||||
ret.Code = -1
|
||||
ret.Msg = err.Error()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue