Skip to content

Commit

Permalink
2.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Danial Farid authored and Danial Farid committed Dec 1, 2014
1 parent a8c2ec0 commit cf2fc88
Show file tree
Hide file tree
Showing 10 changed files with 40 additions and 32 deletions.
2 changes: 1 addition & 1 deletion demo/war/WEB-INF/appengine-web.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
<application>angular-file-upload</application>
<version>1-6-10</version>
<version>2-0-0</version>

<!--
Allows App Engine to send multiple requests to one instance in parallel:
Expand Down
16 changes: 9 additions & 7 deletions demo/war/js/angular-file-upload-all.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ angularFileUpload.service('$upload', ['$http', '$q', '$timeout', function($http,

this.http = function(config) {
return sendHttp(config);
}
};
}]);

angularFileUpload.directive('ngFileSelect', [ '$parse', '$timeout', function($parse, $timeout) { return {
Expand All @@ -184,10 +184,10 @@ function handleFileSelect(scope, elem, attr, ngModel, $parse, $timeout) {
fileElem.css('width', '1px').css('height', '1px').css('opacity', 0).css('position', 'absolute').css('filter', 'alpha(opacity=0)')
.css('padding', 0).css('margin', 0).css('overflow', 'hidden').attr('tabindex', '-1').attr('ng-file-generated-elem', true);
elem.append(fileElem);
elem.scope().fileClickDelegate = function() {
elem.__afu_fileClickDelegate__ = function() {
fileElem[0].click();
};
elem.bind('click', elem.scope().fileClickDelegate);
elem.bind('click', elem.__afu_fileClickDelegate__);
elem.css('overflow', 'hidden');
elem = fileElem;
}
Expand Down Expand Up @@ -336,9 +336,11 @@ function handleDrop(scope, elem, attr, ngModel, $parse, $timeout, $location) {
}
}
var clazz = scope.dragOverClass({$event : evt});
if (clazz.delay) dragOverDelay = clazz.delay;
if (clazz.accept) clazz = valid ? clazz.accept : clazz.reject;
return clazz || 'dragover';
if (clazz) {
if (clazz.delay) dragOverDelay = clazz.delay;
if (clazz.accept) clazz = valid ? clazz.accept : clazz.reject;
}
return clazz || attr['dragOverClass'] || 'dragover';
}

function extractFiles(evt, callback, allowDir, multiple) {
Expand Down Expand Up @@ -646,7 +648,7 @@ if ((window.XMLHttpRequest && !window.FormData) || (window.FileAPI && FileAPI.fo
}
el.css('top', 0).css('bottom', 0).css('left', 0).css('right', 0).css('width', '100%').css('height', '100%').
css('padding', 0).css('margin', 0);
el.parent().unbind('click', el.parent().scope().fileClickDelegate);
el.parent().unbind('click', el.parent().__afu_fileClickDelegate__);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion demo/war/js/angular-file-upload-shim.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ if ((window.XMLHttpRequest && !window.FormData) || (window.FileAPI && FileAPI.fo
}
el.css('top', 0).css('bottom', 0).css('left', 0).css('right', 0).css('width', '100%').css('height', '100%').
css('padding', 0).css('margin', 0);
el.parent().unbind('click', el.parent().scope().fileClickDelegate);
el.parent().unbind('click', el.parent().__afu_fileClickDelegate__);
}
}
}
Expand Down
14 changes: 8 additions & 6 deletions demo/war/js/angular-file-upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ angularFileUpload.service('$upload', ['$http', '$q', '$timeout', function($http,

this.http = function(config) {
return sendHttp(config);
}
};
}]);

angularFileUpload.directive('ngFileSelect', [ '$parse', '$timeout', function($parse, $timeout) { return {
Expand All @@ -184,10 +184,10 @@ function handleFileSelect(scope, elem, attr, ngModel, $parse, $timeout) {
fileElem.css('width', '1px').css('height', '1px').css('opacity', 0).css('position', 'absolute').css('filter', 'alpha(opacity=0)')
.css('padding', 0).css('margin', 0).css('overflow', 'hidden').attr('tabindex', '-1').attr('ng-file-generated-elem', true);
elem.append(fileElem);
elem.scope().fileClickDelegate = function() {
elem.__afu_fileClickDelegate__ = function() {
fileElem[0].click();
};
elem.bind('click', elem.scope().fileClickDelegate);
elem.bind('click', elem.__afu_fileClickDelegate__);
elem.css('overflow', 'hidden');
elem = fileElem;
}
Expand Down Expand Up @@ -336,9 +336,11 @@ function handleDrop(scope, elem, attr, ngModel, $parse, $timeout, $location) {
}
}
var clazz = scope.dragOverClass({$event : evt});
if (clazz.delay) dragOverDelay = clazz.delay;
if (clazz.accept) clazz = valid ? clazz.accept : clazz.reject;
return clazz || 'dragover';
if (clazz) {
if (clazz.delay) dragOverDelay = clazz.delay;
if (clazz.accept) clazz = valid ? clazz.accept : clazz.reject;
}
return clazz || attr['dragOverClass'] || 'dragover';
}

function extractFiles(evt, callback, allowDir, multiple) {
Expand Down
16 changes: 9 additions & 7 deletions dist/angular-file-upload-all.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ angularFileUpload.service('$upload', ['$http', '$q', '$timeout', function($http,

this.http = function(config) {
return sendHttp(config);
}
};
}]);

angularFileUpload.directive('ngFileSelect', [ '$parse', '$timeout', function($parse, $timeout) { return {
Expand All @@ -184,10 +184,10 @@ function handleFileSelect(scope, elem, attr, ngModel, $parse, $timeout) {
fileElem.css('width', '1px').css('height', '1px').css('opacity', 0).css('position', 'absolute').css('filter', 'alpha(opacity=0)')
.css('padding', 0).css('margin', 0).css('overflow', 'hidden').attr('tabindex', '-1').attr('ng-file-generated-elem', true);
elem.append(fileElem);
elem.scope().fileClickDelegate = function() {
elem.__afu_fileClickDelegate__ = function() {
fileElem[0].click();
};
elem.bind('click', elem.scope().fileClickDelegate);
elem.bind('click', elem.__afu_fileClickDelegate__);
elem.css('overflow', 'hidden');
elem = fileElem;
}
Expand Down Expand Up @@ -336,9 +336,11 @@ function handleDrop(scope, elem, attr, ngModel, $parse, $timeout, $location) {
}
}
var clazz = scope.dragOverClass({$event : evt});
if (clazz.delay) dragOverDelay = clazz.delay;
if (clazz.accept) clazz = valid ? clazz.accept : clazz.reject;
return clazz || 'dragover';
if (clazz) {
if (clazz.delay) dragOverDelay = clazz.delay;
if (clazz.accept) clazz = valid ? clazz.accept : clazz.reject;
}
return clazz || attr['dragOverClass'] || 'dragover';
}

function extractFiles(evt, callback, allowDir, multiple) {
Expand Down Expand Up @@ -646,7 +648,7 @@ if ((window.XMLHttpRequest && !window.FormData) || (window.FileAPI && FileAPI.fo
}
el.css('top', 0).css('bottom', 0).css('left', 0).css('right', 0).css('width', '100%').css('height', '100%').
css('padding', 0).css('margin', 0);
el.parent().unbind('click', el.parent().scope().fileClickDelegate);
el.parent().unbind('click', el.parent().__afu_fileClickDelegate__);
}
}
}
Expand Down
Loading

0 comments on commit cf2fc88

Please sign in to comment.