From f91d66d42f517f778cac130466b7cffc7fd8b085 Mon Sep 17 00:00:00 2001 From: Mark Longair Date: Mon, 25 Nov 2013 18:02:58 +0000 Subject: Use the jquery-rails-ui gem, just including the modules we need As far as I can tell, we only use the 'tabs' module in admin and 'datepicker' on the user-facing part of the site. The advantage of using this packaging of the gem is that its assets are in the gem, which simplifies things greatly - otherwise we'd end up doing something like rewrite the jquery-ui CSS to SCSS, referencing the image assets via sass-rails helpers or keep them in their expected paths in public or something. (Thanks to Louise Crow for pointing out the problem of just moving jquery-ui's image assets into the asset pipeline.) --- Gemfile | 1 + Gemfile.lock | 3 +++ app/assets/javascripts/admin.js | 1 + app/assets/javascripts/application.js | 1 + app/assets/stylesheets/application.css | 2 ++ 5 files changed, 8 insertions(+) diff --git a/Gemfile b/Gemfile index 9fa16540a..071808e5d 100644 --- a/Gemfile +++ b/Gemfile @@ -18,6 +18,7 @@ gem 'dynamic_form' gem 'exception_notification' gem 'fastercsv', '>=1.5.5' gem 'jquery-rails', '~> 3.0.4' +gem 'jquery-ui-rails' gem 'json' gem 'mahoro' gem 'net-http-local' diff --git a/Gemfile.lock b/Gemfile.lock index cdbfcba64..3f73bcce7 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -117,6 +117,8 @@ GEM jquery-rails (3.0.4) railties (>= 3.0, < 5.0) thor (>= 0.14, < 2.0) + jquery-ui-rails (4.1.0) + railties (>= 3.1.0) json (1.8.0) libv8 (3.16.14.3) linecache (0.46) @@ -294,6 +296,7 @@ DEPENDENCIES gettext_i18n_rails globalize3! jquery-rails (~> 3.0.4) + jquery-ui-rails json locale mahoro diff --git a/app/assets/javascripts/admin.js b/app/assets/javascripts/admin.js index f7684f3be..0b5d56525 100644 --- a/app/assets/javascripts/admin.js +++ b/app/assets/javascripts/admin.js @@ -1,5 +1,6 @@ // ... //= require jquery +//= require jquery.ui.tabs //= require admin/bootstrap-collapse //= require admin/bootstrap-tab //= require admin/admin diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index f2413bde9..d8aed6346 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -1,5 +1,6 @@ // ... //= require jquery +//= require jquery.ui.datepicker //= require jquery.cookie //= require general //= require ba-throttle-debounce diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css index 207e3e980..097221b2f 100644 --- a/app/assets/stylesheets/application.css +++ b/app/assets/stylesheets/application.css @@ -2,4 +2,6 @@ *= require_self *= require main *= require custom +*= require jquery.ui.datepicker +*= require jquery.ui.tabs */ -- cgit v1.2.3