From 8dea412e69d62d336a079dc0f27eacd0566c6242 Mon Sep 17 00:00:00 2001 From: Mark Longair Date: Wed, 21 Aug 2013 14:26:49 +0100 Subject: Serve admin.js as a static file admin.js was being generated from a view so that the config variable ADMIN_PUBLIC_URL could be used to direct AJAX requests in the admin interface correctly. ADMIN_PUBLIC_URL was necessary for WhatDoTheyKnow when the admin interface was proxied over SSL, while the rest of the site was non-SSL. Now that the whole site is served over SSL, however, the proxy for the admin interface is not longer used and ADMIN_PUBLIC_URL / ADMIN_BASE_URL have been removed. As a result, admin.js is now being generated from a Rails view unnecessarily, and at some performance cost. This commit moves admin.coffee and admin.js to the public directory, so they will be served more efficiently. In addition, this commit removes admin.coffee / admin.js from public/javascripts/ where there was a second (and different) version that now appears to be unused. --- public/javascripts/admin.js | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 public/javascripts/admin.js (limited to 'public/javascripts/admin.js') diff --git a/public/javascripts/admin.js b/public/javascripts/admin.js deleted file mode 100644 index 21725ded4..000000000 --- a/public/javascripts/admin.js +++ /dev/null @@ -1,14 +0,0 @@ -// Generated by CoffeeScript 1.3.1 -(function() { - - (function($) { - $(document).ready(function() { - return $('.locales a:first').tab('show'); - }); - return $('.toggle-hidden').live('click', function() { - $(this).parents('td').find('div:hidden').show(); - return false; - }); - })(jQuery); - -}).call(this); -- cgit v1.2.3