Skip to content

Update assets to v9.11.2 #80

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 23, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ jquery-fileupload-rails is a library that integrates jQuery File Upload for Rail

## Plugin versions

* jQuery File Upload User Interface Plugin 9.6.1
* jQuery File Upload Plugin 5.42.3
* jQuery UI Widget 1.11.1+CommonJS
* jQuery File Upload Plugin v9.11.2

## Installing Gem

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* jQuery postMessage Transport Plugin 1.1.2
* jQuery postMessage Transport Plugin
* https://github.com/blueimp/jQuery-File-Upload
*
* Copyright 2011, Sebastian Tschan
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* jQuery XDomainRequest Transport Plugin 1.1.4
* jQuery XDomainRequest Transport Plugin
* https://github.com/blueimp/jQuery-File-Upload
*
* Copyright 2011, Sebastian Tschan
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* jQuery File Upload AngularJS Plugin 2.2.0
* jQuery File Upload AngularJS Plugin
* https://github.com/blueimp/jQuery-File-Upload
*
* Copyright 2013, Sebastian Tschan
Expand Down Expand Up @@ -91,7 +91,7 @@
angular.forEach(data.files, function (file) {
filesCopy.push(file);
});
scope.$apply(function () {
scope.$parent.$applyAsync(function () {
addFileMethods(scope, data);
var method = scope.option('prependFiles') ?
'unshift' : 'push';
Expand All @@ -100,7 +100,7 @@
data.process(function () {
return scope.process(data);
}).always(function () {
scope.$apply(function () {
scope.$parent.$applyAsync(function () {
addFileMethods(scope, data);
scope.replace(filesCopy, data.files);
});
Expand All @@ -112,12 +112,6 @@
}
});
},
progress: function (e, data) {
if (e.isDefaultPrevented()) {
return false;
}
data.scope.$apply();
},
done: function (e, data) {
if (e.isDefaultPrevented()) {
return false;
Expand Down Expand Up @@ -320,9 +314,11 @@
'fileuploadprocessalways',
'fileuploadprocessstop'
].join(' '), function (e, data) {
if ($scope.$emit(e.type, data).defaultPrevented) {
e.preventDefault();
}
$scope.$parent.$applyAsync(function () {
if ($scope.$emit(e.type, data).defaultPrevented) {
e.preventDefault();
}
});
}).on('remove', function () {
// Remove upload methods from the scope,
// when the widget is removed:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* jQuery File Upload Audio Preview Plugin 1.0.4
* jQuery File Upload Audio Preview Plugin
* https://github.com/blueimp/jQuery-File-Upload
*
* Copyright 2013, Sebastian Tschan
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* jQuery File Upload Image Preview & Resize Plugin 1.7.3
* jQuery File Upload Image Preview & Resize Plugin
* https://github.com/blueimp/jQuery-File-Upload
*
* Copyright 2013, Sebastian Tschan
Expand Down Expand Up @@ -242,7 +242,7 @@
blob.name = file.name;
} else if (file.name) {
blob.name = file.name.replace(
/\..+$/,
/\.\w+$/,
'.' + blob.type.substr(6)
);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* jQuery File Upload jQuery UI Plugin 8.7.2
* jQuery File Upload jQuery UI Plugin
* https://github.com/blueimp/jQuery-File-Upload
*
* Copyright 2013, Sebastian Tschan
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* jQuery File Upload Processing Plugin 1.3.1
* jQuery File Upload Processing Plugin
* https://github.com/blueimp/jQuery-File-Upload
*
* Copyright 2012, Sebastian Tschan
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* jQuery File Upload User Interface Plugin 9.6.1
* jQuery File Upload User Interface Plugin
* https://github.com/blueimp/jQuery-File-Upload
*
* Copyright 2010, Sebastian Tschan
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* jQuery File Upload Validation Plugin 1.1.3
* jQuery File Upload Validation Plugin
* https://github.com/blueimp/jQuery-File-Upload
*
* Copyright 2013, Sebastian Tschan
Expand Down Expand Up @@ -36,7 +36,7 @@
{
action: 'validate',
// Always trigger this action,
// even if the previous action was rejected:
// even if the previous action was rejected:
always: true,
// Options taken from the global options map:
acceptFileTypes: '@',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* jQuery File Upload Video Preview Plugin 1.0.4
* jQuery File Upload Video Preview Plugin
* https://github.com/blueimp/jQuery-File-Upload
*
* Copyright 2013, Sebastian Tschan
Expand Down
18 changes: 14 additions & 4 deletions app/assets/javascripts/jquery-fileupload/jquery.fileupload.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* jQuery File Upload Plugin 5.42.3
* jQuery File Upload Plugin
* https://github.com/blueimp/jQuery-File-Upload
*
* Copyright 2010, Sebastian Tschan
Expand Down Expand Up @@ -277,7 +277,8 @@
// The following are jQuery ajax settings required for the file uploads:
processData: false,
contentType: false,
cache: false
cache: false,
timeout: 0
},

// A list of options that require reinitializing event listeners and/or
Expand Down Expand Up @@ -983,7 +984,10 @@
fileSet,
i,
j = 0;
if (limitSize && (!filesLength || files[0].size === undefined)) {
if (!filesLength) {
return false;
}
if (limitSize && files[0].size === undefined) {
limitSize = undefined;
}
if (!(options.singleFileUploads || limit || limitSize) ||
Expand Down Expand Up @@ -1042,13 +1046,19 @@

_replaceFileInput: function (data) {
var input = data.fileInput,
inputClone = input.clone(true);
inputClone = input.clone(true),
restoreFocus = input.is(document.activeElement);
// Add a reference for the new cloned file input to the data argument:
data.fileInputClone = inputClone;
$('<form></form>').append(inputClone)[0].reset();
// Detaching allows to insert the fileInput on another form
// without loosing the file input value:
input.after(inputClone).detach();
// If the fileInput had focus before it was detached,
// restore focus to the inputClone.
if (restoreFocus) {
inputClone.focus();
}
// Avoid memory leaks with the detached file input:
$.cleanData(input.unbind('remove'));
// Replace the original file input element in the fileInput
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* jQuery Iframe Transport Plugin 1.8.3
* jQuery Iframe Transport Plugin
* https://github.com/blueimp/jQuery-File-Upload
*
* Copyright 2011, Sebastian Tschan
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,4 @@
} else {
window.dataURLtoBlob = dataURLtoBlob;
}
}(this));
}(window));
45 changes: 27 additions & 18 deletions app/assets/javascripts/jquery-fileupload/vendor/jquery.ui.widget.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
/*! jQuery UI - v1.11.1+CommonJS - 2014-09-17
/*! jQuery UI - v1.11.4+CommonJS - 2015-08-28
* http://jqueryui.com
* Includes: widget.js
* Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */
* Copyright 2015 jQuery Foundation and other contributors; Licensed MIT */

(function( factory ) {
if ( typeof define === "function" && define.amd ) {

// AMD. Register as an anonymous module.
define([ "jquery" ], factory );

} else if (typeof exports === "object") {
// Node/CommonJS:
factory(require("jquery"));
} else if ( typeof exports === "object" ) {

// Node/CommonJS
factory( require( "jquery" ) );

} else {

Expand All @@ -20,10 +21,10 @@
}
}(function( $ ) {
/*!
* jQuery UI Widget 1.11.1
* jQuery UI Widget 1.11.4
* http://jqueryui.com
*
* Copyright 2014 jQuery Foundation and other contributors
* Copyright jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
Expand All @@ -47,7 +48,7 @@ $.cleanData = (function( orig ) {
}

// http://bugs.jquery.com/ticket/8235
} catch( e ) {}
} catch ( e ) {}
}
orig( elems );
};
Expand Down Expand Up @@ -201,11 +202,6 @@ $.widget.bridge = function( name, object ) {
args = widget_slice.call( arguments, 1 ),
returnValue = this;

// allow multiple hashes to be passed on init
options = !isMethodCall && args.length ?
$.widget.extend.apply( null, [ options ].concat(args) ) :
options;

if ( isMethodCall ) {
this.each(function() {
var methodValue,
Expand All @@ -230,6 +226,12 @@ $.widget.bridge = function( name, object ) {
}
});
} else {

// Allow multiple hashes to be passed on init
if ( args.length ) {
options = $.widget.extend.apply( null, [ options ].concat(args) );
}

this.each(function() {
var instance = $.data( this, fullName );
if ( instance ) {
Expand Down Expand Up @@ -265,10 +267,6 @@ $.Widget.prototype = {
this.element = $( element );
this.uuid = widget_uuid++;
this.eventNamespace = "." + this.widgetName + this.uuid;
this.options = $.widget.extend( {},
this.options,
this._getCreateOptions(),
options );

this.bindings = $();
this.hoverable = $();
Expand All @@ -291,6 +289,11 @@ $.Widget.prototype = {
this.window = $( this.document[0].defaultView || this.document[0].parentWindow );
}

this.options = $.widget.extend( {},
this.options,
this._getCreateOptions(),
options );

this._create();
this._trigger( "create", null, this._getCreateEventData() );
this._init();
Expand Down Expand Up @@ -453,8 +456,14 @@ $.Widget.prototype = {
},

_off: function( element, eventName ) {
eventName = (eventName || "").split( " " ).join( this.eventNamespace + " " ) + this.eventNamespace;
eventName = (eventName || "").split( " " ).join( this.eventNamespace + " " ) +
this.eventNamespace;
element.unbind( eventName ).undelegate( eventName );

// Clear the stack to avoid memory leaks (#10056)
this.bindings = $( this.bindings.not( element ).get() );
this.focusable = $( this.focusable.not( element ).get() );
this.hoverable = $( this.hoverable.not( element ).get() );
},

_delay: function( handler, delay ) {
Expand Down

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion app/assets/stylesheets/jquery.fileupload-noscript.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@charset "UTF-8";
/*
* jQuery File Upload Plugin NoScript CSS 1.2.0
* jQuery File Upload Plugin NoScript CSS
* https://github.com/blueimp/jQuery-File-Upload
*
* Copyright 2013, Sebastian Tschan
Expand Down
2 changes: 1 addition & 1 deletion app/assets/stylesheets/jquery.fileupload-ui-noscript.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@charset "UTF-8";
/*
* jQuery File Upload UI Plugin NoScript CSS 8.8.5
* jQuery File Upload UI Plugin NoScript CSS
* https://github.com/blueimp/jQuery-File-Upload
*
* Copyright 2012, Sebastian Tschan
Expand Down
2 changes: 1 addition & 1 deletion app/assets/stylesheets/jquery.fileupload-ui.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@charset "UTF-8";
/*
* jQuery File Upload UI Plugin CSS 9.0.0
* jQuery File Upload UI Plugin CSS
* https://github.com/blueimp/jQuery-File-Upload
*
* Copyright 2010, Sebastian Tschan
Expand Down
3 changes: 2 additions & 1 deletion app/assets/stylesheets/jquery.fileupload.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@charset "UTF-8";
/*
* jQuery File Upload Plugin CSS 1.3.0
* jQuery File Upload Plugin CSS
* https://github.com/blueimp/jQuery-File-Upload
*
* Copyright 2013, Sebastian Tschan
Expand All @@ -13,6 +13,7 @@
.fileinput-button {
position: relative;
overflow: hidden;
display: inline-block;
}
.fileinput-button input {
position: absolute;
Expand Down