Skip to content

Commit

Permalink
Upgrade select2 theme to boostrap4
Browse files Browse the repository at this point in the history
  • Loading branch information
vicocamacho committed Mar 13, 2018
1 parent 9dee986 commit f928d89
Show file tree
Hide file tree
Showing 4 changed files with 819 additions and 3 deletions.
4 changes: 3 additions & 1 deletion app/assets/javascripts/select2-rails.coffee
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
window.Binco.Select2 =
load: (selector) ->
selector = if typeof selector == 'string' then selector else '.select2-rails'
$(selector).select2()
$(selector).select2(
theme: "bootstrap"
)
destroy: (selector) ->
selector = if typeof selector == 'string' then selector else '.select2-rails'
$(selector).each((i,e) ->
Expand Down
Loading

0 comments on commit f928d89

Please # to comment.