Improved tag editing

This commit is contained in:
2018-03-24 21:20:03 +01:00
parent cd1895e3c4
commit 2cbf7c4e5c
4 changed files with 8 additions and 7 deletions

View File

@ -55,12 +55,11 @@ component InputTags(id string, value []string, label string, tooltip string)
label(for=id)= label + ":"
.tags(id=id)
for index, tag := range value
.tag.tag-edit
span.tag-title.action(contenteditable="true", data-trigger="focusout", data-action="save", data-field=id + "[" + strconv.Itoa(index) + "]")= tag
.tag.tag-edit.action(contenteditable="true", data-action="save", data-trigger="focusout", data-field=id + "[" + strconv.Itoa(index) + "]")= tag
button.tag-remove.action(data-action="arrayRemove", data-trigger="click", data-field=id, data-index=index)
RawIcon("trash")
button.tag-add.action(data-action="arrayAppend", data-trigger="click", data-field=id)
button.tag-add.action(data-action="arrayAppend", data-trigger="click", data-field=id, title="Add more")
RawIcon("plus")
p!= tooltip