select_multiple: add select2
This commit is contained in:
parent
3ed14bf1a4
commit
1fa1e9e8e8
5 changed files with 14 additions and 0 deletions
2
Gemfile
2
Gemfile
|
@ -102,6 +102,8 @@ gem 'simple_form'
|
||||||
|
|
||||||
gem 'newrelic_rpm'
|
gem 'newrelic_rpm'
|
||||||
|
|
||||||
|
gem 'select2-rails'
|
||||||
|
|
||||||
group :test do
|
group :test do
|
||||||
gem 'capybara'
|
gem 'capybara'
|
||||||
gem 'launchy'
|
gem 'launchy'
|
||||||
|
|
|
@ -543,6 +543,8 @@ GEM
|
||||||
json (~> 1.7, >= 1.7.7)
|
json (~> 1.7, >= 1.7.7)
|
||||||
rdoc (~> 4.0)
|
rdoc (~> 4.0)
|
||||||
securecompare (1.0.0)
|
securecompare (1.0.0)
|
||||||
|
select2-rails (4.0.3)
|
||||||
|
thor (~> 0.14)
|
||||||
selenium-webdriver (3.0.3)
|
selenium-webdriver (3.0.3)
|
||||||
childprocess (~> 0.5)
|
childprocess (~> 0.5)
|
||||||
rubyzip (~> 1.0)
|
rubyzip (~> 1.0)
|
||||||
|
@ -709,6 +711,7 @@ DEPENDENCIES
|
||||||
sass-rails (~> 5.0)
|
sass-rails (~> 5.0)
|
||||||
scenic
|
scenic
|
||||||
sdoc (~> 0.4.0)
|
sdoc (~> 0.4.0)
|
||||||
|
select2-rails
|
||||||
selenium-webdriver
|
selenium-webdriver
|
||||||
sentry-raven
|
sentry-raven
|
||||||
shoulda-matchers
|
shoulda-matchers
|
||||||
|
|
|
@ -31,6 +31,7 @@
|
||||||
//= require bootstrap-wysihtml5/locales/fr-FR
|
//= require bootstrap-wysihtml5/locales/fr-FR
|
||||||
//= require handlebars
|
//= require handlebars
|
||||||
//= require typeahead.bundle
|
//= require typeahead.bundle
|
||||||
|
//= require select2
|
||||||
|
|
||||||
$(document).on('page:load', application_init);
|
$(document).on('page:load', application_init);
|
||||||
$(document).ready(application_init);
|
$(document).ready(application_init);
|
||||||
|
|
6
app/assets/javascripts/user/description.js
Normal file
6
app/assets/javascripts/user/description.js
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
$(document).on('page:load', activeSelect2);
|
||||||
|
$(document).ready(activeSelect2);
|
||||||
|
|
||||||
|
function activeSelect2() {
|
||||||
|
$('select.select2').select2({ theme: "bootstrap", width: '100%' });
|
||||||
|
}
|
|
@ -19,6 +19,8 @@
|
||||||
*= require font-awesome
|
*= require font-awesome
|
||||||
*= require franceconnect
|
*= require franceconnect
|
||||||
*= require bootstrap-wysihtml5
|
*= require bootstrap-wysihtml5
|
||||||
|
*= require select2
|
||||||
|
*= require select2-bootstrap
|
||||||
*/
|
*/
|
||||||
@import "variables";
|
@import "variables";
|
||||||
@import "bootstrap-sprockets";
|
@import "bootstrap-sprockets";
|
||||||
|
|
Loading…
Add table
Reference in a new issue