From 02afbc58e4f92d7ea8df2267cffe768210345fe0 Mon Sep 17 00:00:00 2001 From: danialf Date: Fri, 8 Nov 2013 10:59:35 -0500 Subject: [PATCH] v1.1.3 fixed #37 #39 --- angular-file-upload-shim.js | 2 +- angular-file-upload-shim.min.js | 2 +- angular-file-upload.js | 2 +- angular-file-upload.min.js | 10 +++++----- war/js/angular-file-upload-shim.js | 2 +- war/js/angular-file-upload-shim.min.js | 2 +- war/js/angular-file-upload.js | 12 ++++++------ war/js/angular-file-upload.min.js | 10 +++++----- 8 files changed, 21 insertions(+), 21 deletions(-) diff --git a/angular-file-upload-shim.js b/angular-file-upload-shim.js index 1a99ea8d..af21dc0f 100644 --- a/angular-file-upload-shim.js +++ b/angular-file-upload-shim.js @@ -1,7 +1,7 @@ /**! * AngularJS file upload shim for HTML5 FormData * @author Danial - * @version 1.1.2 + * @version 1.1.3 */ (function() { diff --git a/angular-file-upload-shim.min.js b/angular-file-upload-shim.min.js index 2b7a5a9a..0eed48bc 100644 --- a/angular-file-upload-shim.min.js +++ b/angular-file-upload-shim.min.js @@ -1,7 +1,7 @@ /**! * AngularJS file upload shim for HTML5 FormData * @author Danial - * @version 1.1.2 + * @version 1.1.3 */ (function(){window.XMLHttpRequest&&(XMLHttpRequest=window.FormData?function(b){return function(){var a=new b;a.send=function(b){return function(){if(arguments[0]instanceof FormData&&arguments[0].__uploadProgress_){var c=arguments[0];c.__uploadProgress_&&a.upload.addEventListener("progress",function(a){c.__uploadProgress_(a)},!1);c.__setAbortFunction_&&c.__setAbortFunction_(function(){a.abort()})}b.apply(a,arguments)}}(a.send);return a}}(XMLHttpRequest):function(b){return function(){var a=new b,g= a.send;a.__requestHeaders=[];a.open=function(c){a.upload={addEventListener:function(c,d,b){"progress"==c&&(a.__progress=d)}};return function(f,d,b){c.apply(a,[f,d,b]);a.__url=d}}(a.open);a.getResponseHeader=function(c){return function(b){return a.__fileApiXHR?a.__fileApiXHR.getResponseHeader(b):c.apply(a,[b])}}(a.getResponseHeader);a.getAllResponseHeaders=function(c){return function(){return a.__fileApiXHR?a.__fileApiXHR.getAllResponseHeaders():c.apply(a)}}(a.getAllResponseHeaders);a.abort=function(c){return function(){return a.__fileApiXHR? diff --git a/angular-file-upload.js b/angular-file-upload.js index f30beb29..255e996d 100644 --- a/angular-file-upload.js +++ b/angular-file-upload.js @@ -1,7 +1,7 @@ /**! * AngularJS file upload/drop directive with http post and progress * @author Danial - * @version 1.1.2 + * @version 1.1.3 */ (function() { diff --git a/angular-file-upload.min.js b/angular-file-upload.min.js index 2db1c624..9125600e 100644 --- a/angular-file-upload.min.js +++ b/angular-file-upload.min.js @@ -1,9 +1,9 @@ /**! * AngularJS file upload/drop directive with http post and progress * @author Danial - * @version 1.1.2 + * @version 1.1.3 */ -(function(){var k=angular.module("angularFileUpload",[]);k.service("$upload",["$http",function(d){this.upload=function(a){a.method=a.method||"POST";a.headers=a.headers||{};a.headers["Content-Type"]=void 0;a.transformRequest=angular.identity;var c=new FormData;if(a.data)for(key in a.data)c.append(key,a.data[key]);c.append(a.fileFormDataName||"file",a.file,a.file.name);c.__uploadProgress_=function(c){c&&a.progress(c)};a.data=c;var b=d(a);b.abort=function(){throw"upload is not started yet";};c.__setAbortFunction_= -function(c){b.abort=c};return b}}]);k.directive("ngFileSelect",["$parse","$http",function(d,a){return function(c,a,f){var h=d(f.ngFileSelect);a.bind("change",function(a){var b=[],g,e;g=a.target.files;if(null!=g)for(e=0;e - * @version 1.1.2 + * @version 1.1.3 */ (function() { diff --git a/war/js/angular-file-upload-shim.min.js b/war/js/angular-file-upload-shim.min.js index 2b7a5a9a..0eed48bc 100644 --- a/war/js/angular-file-upload-shim.min.js +++ b/war/js/angular-file-upload-shim.min.js @@ -1,7 +1,7 @@ /**! * AngularJS file upload shim for HTML5 FormData * @author Danial - * @version 1.1.2 + * @version 1.1.3 */ (function(){window.XMLHttpRequest&&(XMLHttpRequest=window.FormData?function(b){return function(){var a=new b;a.send=function(b){return function(){if(arguments[0]instanceof FormData&&arguments[0].__uploadProgress_){var c=arguments[0];c.__uploadProgress_&&a.upload.addEventListener("progress",function(a){c.__uploadProgress_(a)},!1);c.__setAbortFunction_&&c.__setAbortFunction_(function(){a.abort()})}b.apply(a,arguments)}}(a.send);return a}}(XMLHttpRequest):function(b){return function(){var a=new b,g= a.send;a.__requestHeaders=[];a.open=function(c){a.upload={addEventListener:function(c,d,b){"progress"==c&&(a.__progress=d)}};return function(f,d,b){c.apply(a,[f,d,b]);a.__url=d}}(a.open);a.getResponseHeader=function(c){return function(b){return a.__fileApiXHR?a.__fileApiXHR.getResponseHeader(b):c.apply(a,[b])}}(a.getResponseHeader);a.getAllResponseHeaders=function(c){return function(){return a.__fileApiXHR?a.__fileApiXHR.getAllResponseHeaders():c.apply(a)}}(a.getAllResponseHeaders);a.abort=function(c){return function(){return a.__fileApiXHR? diff --git a/war/js/angular-file-upload.js b/war/js/angular-file-upload.js index 10ab064a..255e996d 100644 --- a/war/js/angular-file-upload.js +++ b/war/js/angular-file-upload.js @@ -1,7 +1,7 @@ /**! * AngularJS file upload/drop directive with http post and progress * @author Danial - * @version 1.1.2 + * @version 1.1.3 */ (function() { @@ -15,7 +15,7 @@ angularFileUpload.service('$upload', ['$http', function($http) { config.transformRequest = angular.identity; var formData = new FormData(); if (config.data) { - for (key in config.data) { + for (var key in config.data) { formData.append(key, config.data[key]); } } @@ -83,15 +83,15 @@ angularFileUpload.directive('ngFileDrop', [ '$parse', '$http', function($parse, elem[0].addEventListener("dragover", function(evt) { evt.stopPropagation(); evt.preventDefault(); - elem.addClass("dragover"); + elem.addClass(attr['ngFileDragOverClass'] || "dragover"); }, false); elem[0].addEventListener("dragleave", function(evt) { - elem.removeClass("dragover"); + elem.removeClass(attr['ngFileDragOverClass'] || "dragover"); }, false); elem[0].addEventListener("drop", function(evt) { evt.stopPropagation(); evt.preventDefault(); - elem.removeClass("dragover"); + elem.removeClass(attr['ngFileDragOverClass'] || "dragover"); var files = [], fileList = evt.dataTransfer.files, i; if (fileList != null) { for (i = 0; i < fileList.length; i++) { @@ -109,4 +109,4 @@ angularFileUpload.directive('ngFileDrop', [ '$parse', '$http', function($parse, }; } ]); -})(); \ No newline at end of file +})(); diff --git a/war/js/angular-file-upload.min.js b/war/js/angular-file-upload.min.js index 2db1c624..9125600e 100644 --- a/war/js/angular-file-upload.min.js +++ b/war/js/angular-file-upload.min.js @@ -1,9 +1,9 @@ /**! * AngularJS file upload/drop directive with http post and progress * @author Danial - * @version 1.1.2 + * @version 1.1.3 */ -(function(){var k=angular.module("angularFileUpload",[]);k.service("$upload",["$http",function(d){this.upload=function(a){a.method=a.method||"POST";a.headers=a.headers||{};a.headers["Content-Type"]=void 0;a.transformRequest=angular.identity;var c=new FormData;if(a.data)for(key in a.data)c.append(key,a.data[key]);c.append(a.fileFormDataName||"file",a.file,a.file.name);c.__uploadProgress_=function(c){c&&a.progress(c)};a.data=c;var b=d(a);b.abort=function(){throw"upload is not started yet";};c.__setAbortFunction_= -function(c){b.abort=c};return b}}]);k.directive("ngFileSelect",["$parse","$http",function(d,a){return function(c,a,f){var h=d(f.ngFileSelect);a.bind("change",function(a){var b=[],g,e;g=a.target.files;if(null!=g)for(e=0;e