Skip to content

Commit

Permalink
Fixes #3464: Updated multifile plugin used by CMultiFileUpload to ver…
Browse files Browse the repository at this point in the history
…sion 1.48
  • Loading branch information
samdark committed Oct 23, 2014
1 parent f63e5d3 commit 0309678
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ Version 1.1.16 under development
- Enh #3571: Extracted rendering of data cell in CGridView.renderTableRow() to separate method for extensibility (hijarian).
- Chg #3137: Upgraded HTMLPurifier to 4.6.0 (samdark)
- Chg #3298: ListView and GridView: Added check for the existence of a href attribute in link pager (dutchakdev)
- Chg #3464: Updated multifile plugin used by CMultiFileUpload to version 1.48 (samdark)
- Chg: Updated the i18n data bundled with the framework to CLDR23.1 <http://cldr.unicode.org/index/downloads/cldr-23-1> this adds new locales and has many fixes and additional data for existing ones (cebe, dralshehri)
- New #2955: Added official support for MariaDB (cebe, DaSourcerer)

Expand Down
23 changes: 13 additions & 10 deletions framework/web/js/source/jquery.multifile.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
/*
### jQuery Multiple File Upload Plugin v1.47 - 2010-03-26 ###
### jQuery Multiple File Upload Plugin v1.48 - 2012-07-19 ###
* Home: http://www.fyneworks.com/jquery/multiple-file-upload/
* Code: http://code.google.com/p/jquery-multifile-plugin/
*
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
* Licensed under http://en.wikipedia.org/wiki/MIT_License
###
*/

Expand Down Expand Up @@ -87,12 +85,12 @@
// limit number of files that can be selected?
if(!(o.max>0) /*IsNull(MultiFile.max)*/){
o.max = MultiFile.E.attr('maxlength');
if(!(o.max>0) /*IsNull(MultiFile.max)*/){
o.max = (String(MultiFile.e.className.match(/\b(max|limit)\-([0-9]+)\b/gi) || ['']).match(/[0-9]+/gi) || [''])[0];
if(!(o.max>0)) o.max = -1;
else o.max = String(o.max).match(/[0-9]+/gi)[0];
}
};
if(!(o.max>0) /*IsNull(MultiFile.max)*/){
o.max = (String(MultiFile.e.className.match(/\b(max|limit)\-([0-9]+)\b/gi) || ['']).match(/[0-9]+/gi) || [''])[0];
if(!(o.max>0)) o.max = -1;
else o.max = String(o.max).match(/[0-9]+/gi)[0];
}
o.max = new Number(o.max);
// limit extensions?
o.accept = o.accept || MultiFile.E.attr('accept') || '';
Expand Down Expand Up @@ -448,7 +446,7 @@
$.fn[method] = function(){
$.fn.MultiFile.disableEmpty();
value = $.fn.MultiFile.intercepted[method].apply(this, arguments);
//SEE-http://code.google.com/p/jquery-multifile-plugin/issues/detail?id=27
//SEE http://code.google.com/p/jquery-multifile-plugin/issues/detail?id=27
setTimeout(function(){ $.fn.MultiFile.reEnableEmpty() },1000);
return value;
}; // interception
Expand All @@ -471,6 +469,11 @@

// name to use for newly created elements
namePattern: '$name', // same name by default (which creates an array)
/*master name*/ // use $name
/*master id */ // use $id
/*group count*/ // use $g
/*slave count*/ // use $i
/*other */ // use any combination of he above, eg.: $name_file$i

// STRING: collection lets you show messages in different languages
STRING: {
Expand Down

0 comments on commit 0309678

Please sign in to comment.