select_multiple: add select2

This commit is contained in:
Simon Lehericey 2017-03-15 17:49:48 +01:00
parent 3ed14bf1a4
commit 1fa1e9e8e8
5 changed files with 14 additions and 0 deletions

View file

@ -102,6 +102,8 @@ gem 'simple_form'
gem 'newrelic_rpm'
gem 'select2-rails'
group :test do
gem 'capybara'
gem 'launchy'

View file

@ -543,6 +543,8 @@ GEM
json (~> 1.7, >= 1.7.7)
rdoc (~> 4.0)
securecompare (1.0.0)
select2-rails (4.0.3)
thor (~> 0.14)
selenium-webdriver (3.0.3)
childprocess (~> 0.5)
rubyzip (~> 1.0)
@ -709,6 +711,7 @@ DEPENDENCIES
sass-rails (~> 5.0)
scenic
sdoc (~> 0.4.0)
select2-rails
selenium-webdriver
sentry-raven
shoulda-matchers

View file

@ -31,6 +31,7 @@
//= require bootstrap-wysihtml5/locales/fr-FR
//= require handlebars
//= require typeahead.bundle
//= require select2
$(document).on('page:load', application_init);
$(document).ready(application_init);

View file

@ -0,0 +1,6 @@
$(document).on('page:load', activeSelect2);
$(document).ready(activeSelect2);
function activeSelect2() {
$('select.select2').select2({ theme: "bootstrap", width: '100%' });
}

View file

@ -19,6 +19,8 @@
*= require font-awesome
*= require franceconnect
*= require bootstrap-wysihtml5
*= require select2
*= require select2-bootstrap
*/
@import "variables";
@import "bootstrap-sprockets";