Skip to content

Commit

Permalink
moved under admin/assets, uses submenu
Browse files Browse the repository at this point in the history
  • Loading branch information
will-r committed Sep 7, 2009
1 parent 71e85b0 commit 8756bd5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions paperclipped_uploader_extension.rb
Expand Up @@ -8,8 +8,8 @@ class PaperclippedUploaderExtension < Radiant::Extension

define_routes do |map|
map.with_options(:controller => 'admin/assets') do |asset|
asset.upload_assets "/admin/uploader", :action => 'upload'
asset.describe_new_asset "/admin/describer", :action => 'describe'
asset.upload_assets "/admin/assets/uploader", :action => 'upload'
asset.describe_new_asset "/admin/assets/describer", :action => 'describe'
asset.describe_asset "/admin/assets/:id/describe", :action => 'describe'
end
end
Expand All @@ -18,6 +18,9 @@ def activate
require 'session_cookie_hack' # to avoid duplicate alias_chains
Asset.send :include, UploadableAsset
Admin::AssetsController.send :include, AssetsControllerExtension
admin.tabs['Assets'].add_link('asset list', '/admin/assets')
admin.tabs['Assets'].add_link('uploader', '/admin/assets/uploader')

end

def deactivate
Expand Down
2 changes: 1 addition & 1 deletion public/javascripts/admin/asset_uploader.js
Expand Up @@ -204,7 +204,7 @@ Upload.prototype = {
this.setWidth(100);
this.form_holder = new Element('div', {'class' : "fileform"});
this.progress.insert(this.form_holder);
new Ajax.Updater(this.form_holder, '/admin/describer', { method: 'get', parameters: {upload: this.token} });
new Ajax.Updater(this.form_holder, '/admin/assets/describer', { method: 'get', parameters: {upload: this.token} });
},
setError: function (percentage) {
this.setFailedWorking();
Expand Down

0 comments on commit 8756bd5

Please sign in to comment.