Permalink
Browse files

Added options to define the upload/download template IDs.

  • Loading branch information...
1 parent 442856e commit 3f5c97b953a7f68b07e383d7b38d60b6b269043f @blueimp blueimp committed Feb 28, 2012
Showing with 10 additions and 5 deletions.
  1. +9 −4 js/jquery.fileupload-ui.js
  2. +1 −1 package.json
@@ -1,5 +1,5 @@
/*
- * jQuery File Upload User Interface Plugin 6.5.2
+ * jQuery File Upload User Interface Plugin 6.5.3
* https://github.com/blueimp/jQuery-File-Upload
*
* Copyright 2010, Sebastian Tschan
@@ -65,6 +65,10 @@
// if supported by the browser. Set the following option to false
// to always display preview images as img elements:
previewAsCanvas: true,
+ // The ID of the upload template:
+ uploadTemplateId: 'template-upload',
+ // The ID of the download template:
+ downloadTemplateId: 'template-download',
// The expected data type of the upload response, sets the dataType
// option of the $.ajax upload requests:
dataType: 'json',
@@ -559,11 +563,12 @@
},
_initTemplates: function () {
- this.options.templateContainer = document.createElement(
+ var options = this.options;
+ options.templateContainer = document.createElement(
this._files.prop('nodeName')
);
- this.options.uploadTemplate = tmpl('template-upload');
- this.options.downloadTemplate = tmpl('template-download');
+ options.uploadTemplate = tmpl(options.uploadTemplateId);
+ options.downloadTemplate = tmpl(options.downloadTemplateId);
},
_initFiles: function () {
View
@@ -1,6 +1,6 @@
{
"name": "blueimp-file-upload",
- "version": "6.5.2",
+ "version": "6.5.3",
"title": "jQuery File Upload",
"description": "File Upload widget with multiple file selection, drag&drop support, progress bars and preview images for jQuery. Supports cross-domain, chunked and resumable file uploads and client-side image resizing. Works with any server-side platform (PHP, Python, Ruby on Rails, Java, Node.js, Go etc.) that supports standard HTML form file uploads.",
"keywords": [

0 comments on commit 3f5c97b

Please sign in to comment.