Permalink
Browse files

set file/image title to filename (instead of 'uploaded') in frontend …

…admin
  • Loading branch information...
1 parent 50e0512 commit c11fb26e240c7a26ef66c31d7ea3f034883437fb Niels van Dijk committed Nov 5, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 fiber/static/fiber/js/admin.js
@@ -669,9 +669,9 @@ var BaseFileSelectDialog = AdminRESTDialog.extend({
element: upload_button_pane[0],
button: upload_button_pane[0], // connecting directly to the jQUery UI upload_button doesn't work
action: this.get_upload_path(),
- params: {
- title: 'uploaded'
- },
+ onSubmit: $.proxy(function(id, fileName) {
+ uploader._options.params.title = fileName;
+ }, this),
onComplete: $.proxy(function(id, fileName, responseJSON) {
this.refresh_grid();
}, this),

0 comments on commit c11fb26

Please sign in to comment.