summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--management/editor/elements.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/management/editor/elements.go b/management/editor/elements.go
index a5d112b..97a7684 100644
--- a/management/editor/elements.go
+++ b/management/editor/elements.go
@@ -345,6 +345,7 @@ func Tags(fieldName string, p interface{}, attrs map[string]string) []byte {
html := `
<div class="input-field col s12 tags ` + name + `">
+ <label class="active">` + attrs["label"] + `</label>
<div class="chips ` + name + `"></div>
`
@@ -363,8 +364,7 @@ func Tags(fieldName string, p interface{}, attrs map[string]string) []byte {
var tags = $('.tags.` + name + `');
$('.chips.` + name + `').material_chip({
data: [` + strings.Join(initial, ",") + `],
- placeholder: '` + attrs["label"] + `',
- secondaryPlaceholder: 'Type and press "Enter" to add ` + name + `'
+ placeholder: 'Type and press "Enter" to add ` + name + `'
});
// handle events specific to tags
@@ -384,7 +384,7 @@ func Tags(fieldName string, p interface{}, attrs map[string]string) []byte {
chips.on('chip.delete', function(e, chip) {
var sel = '.tag-'+chip.tag;
- $(sel).remove();
+ chips.parent().find(sel).remove();
});
});
</script>