From 39795b4e9a5f71d36b7428b44f2ad2889ef45c64 Mon Sep 17 00:00:00 2001 From: Mark Longair Date: Thu, 26 Sep 2013 15:07:47 +0100 Subject: Bundle up admin javascript using the asset pipeline This includes adding coffee-rails so that the .js.coffee file is compiled to .js automatically. --- app/assets/javascripts/admin.js | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 app/assets/javascripts/admin.js (limited to 'app/assets/javascripts/admin.js') diff --git a/app/assets/javascripts/admin.js b/app/assets/javascripts/admin.js new file mode 100644 index 000000000..25f3dc81f --- /dev/null +++ b/app/assets/javascripts/admin.js @@ -0,0 +1,7 @@ +// ... +//= require jquery +//= require admin/jquery-ui.min +//= require admin/bootstrap-collapse +//= require admin/bootstrap-tab +//= require admin/admin +//= require jquery_ujs -- cgit v1.2.3 From 68a8a9945d73e22d19d58f89162f46c3d175fc58 Mon Sep 17 00:00:00 2001 From: Mark Longair Date: Mon, 25 Nov 2013 17:44:58 +0000 Subject: Remove jquery-ui; in a later commit we'll add it back via the gem The intention is to stop including our own custom build of jquery-ui but instead use the jquery-ui-rails gem, which works well with the asset pipeline. This commit should remove all traces of the old download of jquery-ui. --- app/assets/javascripts/admin.js | 1 - 1 file changed, 1 deletion(-) (limited to 'app/assets/javascripts/admin.js') diff --git a/app/assets/javascripts/admin.js b/app/assets/javascripts/admin.js index 25f3dc81f..f7684f3be 100644 --- a/app/assets/javascripts/admin.js +++ b/app/assets/javascripts/admin.js @@ -1,6 +1,5 @@ // ... //= require jquery -//= require admin/jquery-ui.min //= require admin/bootstrap-collapse //= require admin/bootstrap-tab //= require admin/admin -- cgit v1.2.3 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.) --- app/assets/javascripts/admin.js | 1 + 1 file changed, 1 insertion(+) (limited to 'app/assets/javascripts/admin.js') 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 -- cgit v1.2.3