Skip to content

Commit

Permalink
Fixed issue with make_select2 being called on Select2 instances more …
Browse files Browse the repository at this point in the history
…than once.
  • Loading branch information
steveyken committed Jan 7, 2015
1 parent e1a094e commit 363604e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/assets/javascripts/crm_select2.js.coffee
Expand Up @@ -10,10 +10,12 @@
window.crm ||= {}

crm.make_select2 = ->
$(".select2").each ->
$(".select2").not(".select2-container, .select2-offscreen").each ->
#$(".select2").each ->
$(this).select2 'width':'resolve'

$(".select2_tag").each ->
$(".select2_tag").not(".select2-container, .select2-offscreen").each ->
#$(".select2_tag").each ->
$(this).select2
'width':'resolve'
tags: $(this).data("tags")
Expand Down

0 comments on commit 363604e

Please sign in to comment.