Sha256: 66c4b35eaed812997fa48c0b3ac04e7b658d7e2a5db19e18dc7aa751956574d1
Contents?: true
Size: 638 Bytes
Versions: 8
Compression:
Stored size: 638 Bytes
Contents
class Storytime.Dashboard.Tags init: () -> # Add new tags $(".tags-input").each -> tagsInput = $(this) searchInput = tagsInput.next("div").find(".search-field").children("input") searchInput.on 'keyup', (e) -> if e.which is 13 and searchInput.val().length > 0 searched_tag = searchInput.val() tagsInput.append('<option value="nv__' + searched_tag + '">' + searched_tag + '</option>') selected_tags = tagsInput.val() || [] selected_tags.push "nv__#{searched_tag}" tagsInput.val selected_tags tagsInput.trigger 'chosen:updated' return
Version data entries
8 entries across 8 versions & 1 rubygems