Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
81ef5d0244
3 changed files with 28 additions and 6 deletions
|
@ -569,6 +569,7 @@ func renderAttributeView(c *gin.Context) {
|
|||
"id": v.ID,
|
||||
"icon": v.Icon,
|
||||
"name": v.Name,
|
||||
"desc": v.Desc,
|
||||
"hideAttrViewName": v.HideAttrViewName,
|
||||
"type": v.LayoutType,
|
||||
"pageSize": pSize,
|
||||
|
|
|
@ -3468,7 +3468,7 @@ func updateAttributeViewColumnOption(operation *Operation) (err error) {
|
|||
found := false
|
||||
if oldName != newName {
|
||||
for _, opt := range key.Options {
|
||||
if newName == opt.Name { // 如果选项名已经存在则直接使用
|
||||
if newName == opt.Name { // 如果选项已经存在则直接使用
|
||||
found = true
|
||||
newColor = opt.Color
|
||||
break
|
||||
|
@ -3497,13 +3497,33 @@ func updateAttributeViewColumnOption(operation *Operation) (err error) {
|
|||
continue
|
||||
}
|
||||
|
||||
for i, opt := range value.MSelect {
|
||||
if oldName == opt.Content {
|
||||
value.MSelect[i].Content = newName
|
||||
value.MSelect[i].Color = newColor
|
||||
found = false
|
||||
for _, opt := range value.MSelect {
|
||||
if newName == opt.Content {
|
||||
found = true
|
||||
break
|
||||
}
|
||||
}
|
||||
if found {
|
||||
idx := -1
|
||||
for i, opt := range value.MSelect {
|
||||
if oldName == opt.Content {
|
||||
idx = i
|
||||
break
|
||||
}
|
||||
}
|
||||
if 0 <= idx {
|
||||
value.MSelect = util.RemoveElem(value.MSelect, idx)
|
||||
}
|
||||
} else {
|
||||
for i, opt := range value.MSelect {
|
||||
if oldName == opt.Content {
|
||||
value.MSelect[i].Content = newName
|
||||
value.MSelect[i].Color = newColor
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
break
|
||||
}
|
||||
|
|
|
@ -1389,10 +1389,11 @@ func BatchExportPandocConvertZip(ids []string, pandocTo, ext string) (name, zipP
|
|||
if "." == baseFolderName {
|
||||
baseFolderName = path.Base(block.Path)
|
||||
}
|
||||
var docPaths []string
|
||||
|
||||
var docPaths []string
|
||||
bts := treenode.GetBlockTrees(ids)
|
||||
for _, bt := range bts {
|
||||
docPaths = append(docPaths, bt.Path)
|
||||
docFiles := box.ListFiles(strings.TrimSuffix(bt.Path, ".sy"))
|
||||
for _, docFile := range docFiles {
|
||||
docPaths = append(docPaths, docFile.path)
|
||||
|
|
Loading…
Add table
Reference in a new issue