summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--management/editor/elements.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/management/editor/elements.go b/management/editor/elements.go
index 6908e0e..53c15b2 100644
--- a/management/editor/elements.go
+++ b/management/editor/elements.go
@@ -371,7 +371,7 @@ func Tags(fieldName string, p interface{}, attrs map[string]string) []byte {
var chips = tags.find('.chips');
chips.on('chip.add', function(e, chip) {
- tags.find('.empty-tag').remove();
+ chips.parent().find('.empty-tag').remove();
var input = $('<input>');
input.attr({
@@ -385,9 +385,7 @@ func Tags(fieldName string, p interface{}, attrs map[string]string) []byte {
});
chips.on('chip.delete', function(e, chip) {
- var sel = '.tag-'+chip.tag;
- console.log(sel);
- console.log(chips.parent().find(sel));
+ var sel = '.tag-'+chip.tag;
chips.parent().find(sel).remove();
// iterate through all hidden tag inputs to re-name them with the correct ` + name + `.index