File tree Expand file tree Collapse file tree 1 file changed +12
-11
lines changed
app/assets/javascripts/jquery-fileupload Expand file tree Collapse file tree 1 file changed +12
-11
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * jQuery File Upload Plugin 5.42.2
2
+ * jQuery File Upload Plugin 5.42.3
3
3
* https://github.com/blueimp/jQuery-File-Upload
4
4
*
5
5
* Copyright 2010, Sebastian Tschan
1344
1344
_initDataAttributes : function ( ) {
1345
1345
var that = this ,
1346
1346
options = this . options ,
1347
- clone = $ ( this . element [ 0 ] . cloneNode ( false ) ) ,
1348
- data = clone . data ( ) ;
1349
- // Avoid memory leaks:
1350
- clone . remove ( ) ;
1347
+ data = this . element . data ( ) ;
1351
1348
// Initialize options set via HTML5 data-attributes:
1352
1349
$ . each (
1353
- data ,
1354
- function ( key , value ) {
1355
- var dataAttributeName = 'data-' +
1356
- // Convert camelCase to hyphen-ated key:
1357
- key . replace ( / ( [ a - z ] ) ( [ A - Z ] ) / g, '$1-$2' ) . toLowerCase ( ) ;
1358
- if ( clone . attr ( dataAttributeName ) ) {
1350
+ this . element [ 0 ] . attributes ,
1351
+ function ( index , attr ) {
1352
+ var key = attr . name . toLowerCase ( ) ,
1353
+ value ;
1354
+ if ( / ^ d a t a - / . test ( key ) ) {
1355
+ // Convert hyphen-ated key to camelCase:
1356
+ key = key . slice ( 5 ) . replace ( / - [ a - z ] / g, function ( str ) {
1357
+ return str . charAt ( 1 ) . toUpperCase ( ) ;
1358
+ } ) ;
1359
+ value = data [ key ] ;
1359
1360
if ( that . _isRegExpOption ( key , value ) ) {
1360
1361
value = that . _getRegExp ( value ) ;
1361
1362
}
You can’t perform that action at this time.
0 commit comments