diff options
author | Mark Longair <mhl@pobox.com> | 2013-11-25 18:02:58 +0000 |
---|---|---|
committer | Mark Longair <mhl@pobox.com> | 2013-11-26 10:16:47 +0000 |
commit | f91d66d42f517f778cac130466b7cffc7fd8b085 (patch) | |
tree | 84937da3e4d3fde691b65218b1bda631c79ac406 | |
parent | 27b0f4016b4dec406261061b4916e02df346b57d (diff) |
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.)
-rw-r--r-- | Gemfile | 1 | ||||
-rw-r--r-- | Gemfile.lock | 3 | ||||
-rw-r--r-- | app/assets/javascripts/admin.js | 1 | ||||
-rw-r--r-- | app/assets/javascripts/application.js | 1 | ||||
-rw-r--r-- | app/assets/stylesheets/application.css | 2 |
5 files changed, 8 insertions, 0 deletions
@@ -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 */ |