Browse Source

Fix selectize initialization in the Details page

Fixes: #462
pull/464/head
Pēteris Caune 4 years ago
parent
commit
c3b6d40012
No known key found for this signature in database GPG Key ID: E28D7679E9A9EDE2
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      static/js/details.js

+ 3
- 1
static/js/details.js View File

@ -11,7 +11,9 @@ $(function () {
return {value: tag}
}
var allTags = $("#update-tags-input").data("all-tags");
// Use attr() instead of data() here, as data() converts attribute's string value
// to a JS object, but we need an unconverted string:
var allTags = $("#update-tags-input").attr("data-all-tags");
var options = allTags ? allTags.split(" ").map(toOption) : [];
$("#update-tags-input").selectize({
create: true,


Loading…
Cancel
Save