Skip to content

Commit 69132dd

Browse files
Danial FaridDanial Farid
authored andcommitted
1 parent 5b227f1 commit 69132dd

18 files changed

+32
-37
lines changed

demo/src/main/webapp/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ <h3>
123123
<div class="up-buttons">
124124
<div ngf-select ngf-drop ng-model="files" ng-model-rejected="rejFiles"
125125
ngf-multiple="multiple" ngf-accept="accept" accept="{{acceptSelect}}"
126-
ngf-disabled="disabled" ngf-capture="capture"
126+
ng-disabled="disabled" ngf-capture="capture"
127127
ngf-drag-over-class="{accept:'dragover', reject:'dragover-err', delay:100}"
128128
ngf-min-size="minSize" ngf-max-size="maxSize"
129129
ngf-keep="keep" ngf-keep-distinct="keepDistinct" ngf-reset-on-click="resetOnClick"

demo/src/main/webapp/js/FileAPI.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demo/src/main/webapp/js/ng-file-upload-all.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/**!
22
* AngularJS file upload/drop directive and service with progress and abort
33
* @author Danial <danial.farid@gmail.com>
4-
* @version 5.0.7
4+
* @version 5.0.8
55
*/
66
var ngFileUpload = angular.module('ngFileUpload', []);
77

8-
ngFileUpload.version = '5.0.7';
8+
ngFileUpload.version = '5.0.8';
99
ngFileUpload.service('Upload', ['$http', '$q', '$timeout', function ($http, $q, $timeout) {
1010
function patchXHR(fnName, newFn) {
1111
window.XMLHttpRequest.prototype[fnName] = newFn(window.XMLHttpRequest.prototype[fnName]);
@@ -290,8 +290,6 @@ ngFileUpload.service('Upload', ['$http', '$q', '$timeout', function ($http, $q,
290290
}
291291

292292
function createFileInput(evt, resetOnClick) {
293-
if (elem.attr('disabled') || disabled) return;
294-
295293
if (!resetOnClick && (evt || isInputTypeFile())) return elem.$$ngfRefElem || elem;
296294

297295
var fileElem = angular.element('<input type="file">');
@@ -321,6 +319,7 @@ ngFileUpload.service('Upload', ['$http', '$q', '$timeout', function ($http, $q,
321319
}
322320

323321
function clickHandler(evt) {
322+
if (elem.attr('disabled') || disabled) return false;
324323
if (evt != null) {
325324
evt.preventDefault();
326325
evt.stopPropagation();
@@ -736,7 +735,7 @@ ngFileUpload.service('Upload', ['$http', '$q', '$timeout', function ($http, $q,
736735
* AngularJS file upload/drop directive and service with progress and abort
737736
* FileAPI Flash shim for old browsers not supporting FormData
738737
* @author Danial <danial.farid@gmail.com>
739-
* @version 5.0.7
738+
* @version 5.0.8
740739
*/
741740

742741
(function () {

demo/src/main/webapp/js/ng-file-upload-all.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demo/src/main/webapp/js/ng-file-upload-shim.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* AngularJS file upload/drop directive and service with progress and abort
33
* FileAPI Flash shim for old browsers not supporting FormData
44
* @author Danial <danial.farid@gmail.com>
5-
* @version 5.0.7
5+
* @version 5.0.8
66
*/
77

88
(function () {

demo/src/main/webapp/js/ng-file-upload-shim.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demo/src/main/webapp/js/ng-file-upload.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/**!
22
* AngularJS file upload/drop directive and service with progress and abort
33
* @author Danial <danial.farid@gmail.com>
4-
* @version 5.0.7
4+
* @version 5.0.8
55
*/
66
var ngFileUpload = angular.module('ngFileUpload', []);
77

8-
ngFileUpload.version = '5.0.7';
8+
ngFileUpload.version = '5.0.8';
99
ngFileUpload.service('Upload', ['$http', '$q', '$timeout', function ($http, $q, $timeout) {
1010
function patchXHR(fnName, newFn) {
1111
window.XMLHttpRequest.prototype[fnName] = newFn(window.XMLHttpRequest.prototype[fnName]);
@@ -290,8 +290,6 @@ ngFileUpload.service('Upload', ['$http', '$q', '$timeout', function ($http, $q,
290290
}
291291

292292
function createFileInput(evt, resetOnClick) {
293-
if (elem.attr('disabled') || disabled) return;
294-
295293
if (!resetOnClick && (evt || isInputTypeFile())) return elem.$$ngfRefElem || elem;
296294

297295
var fileElem = angular.element('<input type="file">');
@@ -321,6 +319,7 @@ ngFileUpload.service('Upload', ['$http', '$q', '$timeout', function ($http, $q,
321319
}
322320

323321
function clickHandler(evt) {
322+
if (elem.attr('disabled') || disabled) return false;
324323
if (evt != null) {
325324
evt.preventDefault();
326325
evt.stopPropagation();

0 commit comments

Comments
 (0)