Skip to content

Instantly share code, notes, and snippets.

@ZakharDay
Created October 12, 2015 00:21
Show Gist options
  • Save ZakharDay/2496b45860ab71574dc1 to your computer and use it in GitHub Desktop.
Save ZakharDay/2496b45860ab71574dc1 to your computer and use it in GitHub Desktop.
@tags = () ->
$.getJSON '/taggings/publication_tags', (json) =>
$('.select2-input#publicationTags').select2({tags: json, width: '608px', containerCssClass: 'tagsInput', dropdownCssClass: 'tagsDropdown'})
@places = () ->
$.getJSON '/taggings/places', (json) =>
$('.select2-input#publication_place_list').select2({tags: json, width: '608px', containerCssClass: 'placeInput', dropdownCssClass: 'placesDropdown', maximumSelectionSize: 1, openOnEnter: false})
$ ->
tags()
places()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment