diff options
author | Mark Longair <mhl@pobox.com> | 2013-08-21 14:26:49 +0100 |
---|---|---|
committer | Mark Longair <mhl@pobox.com> | 2013-08-21 14:26:49 +0100 |
commit | 8dea412e69d62d336a079dc0f27eacd0566c6242 (patch) | |
tree | 807b08ed7cf957a69e85166fa6bbd86d12269ae1 /doc/ADMIN.md | |
parent | 4dc5bfce6f8a34aa9f01e9232190fa2c169727a9 (diff) |
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.
Diffstat (limited to 'doc/ADMIN.md')
-rw-r--r-- | doc/ADMIN.md | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/doc/ADMIN.md b/doc/ADMIN.md index 07fe9398d..6248e6cfc 100644 --- a/doc/ADMIN.md +++ b/doc/ADMIN.md @@ -11,11 +11,9 @@ If you want to work on the CSS, you'll want to use $ gem install compass $ compass compile --config .compass/config.rb -The javascript is included in a funky way -[for reasons explained in this commit](https://github.com/sebbacon/adminbootstraptheme/commit/45a73d53fc9e8f0b728933ff58764bd8d0612dab). -To change it, edit the coffeescript at -`lib/view/general/admin.coffee`, and then do something like: +To change the JavaScript, edit `public/admin/javascripts/admin.coffee` +and then run: - $ coffee -o /tmp/ -c app/views/admin_general/admin.coffee - $ mv /tmp/admin.js app/views/admin_general/admin_js.erb + $ coffee -c public/admin/javascripts/admin.coffee +That will update `public/admin/javascripts/admin.js`.
\ No newline at end of file |