diff --git a/README.md b/README.md index 4f5e1cc1..276a6a4b 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,7 @@ HTML:
drop files here
+
This is an optional parameter
HTML5 Drop File is not supported!
diff --git a/angular-file-upload.js b/angular-file-upload.js index 10ab064a..9b030e1a 100644 --- a/angular-file-upload.js +++ b/angular-file-upload.js @@ -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 +})();