summaryrefslogtreecommitdiff
path: root/management/editor/elements.go
diff options
context:
space:
mode:
authorSteve Manuel <nilslice@gmail.com>2016-10-25 12:05:59 -0700
committerSteve Manuel <nilslice@gmail.com>2016-10-25 12:05:59 -0700
commit812e70bf97a5064807618bb3e6ac02984f47c4d4 (patch)
treee886c992102b673543ac67dece9cd8ac19ab2dcf /management/editor/elements.go
parentbc91bc22c15f66d1aa7917339da1a46c4960c856 (diff)
more js fixes in Tags element
Diffstat (limited to 'management/editor/elements.go')
-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>