Permalink
Browse files

Build files for fixes to 2532690 and 2532680

  • Loading branch information...
1 parent f846927 commit 46331b119804c6059aa7125695312ced7b46d6a8 @allenrabinovich committed Nov 10, 2012

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -344,46 +344,48 @@ Y.UploaderHTML5 = Y.extend( UploaderHTML5, Y.Widget, {
event.stopPropagation();
event.preventDefault();
-
- switch (event.type) {
- case "dragenter":
- this.fire("dragenter");
- break;
- case "dragover":
- this.fire("dragover");
- break;
- case "dragleave":
- this.fire("dragleave");
- break;
- case "drop":
-
- var newfiles = event._event.dataTransfer.files,
- parsedFiles = [],
- filterFunc = this.get("fileFilterFunction");
-
- if (filterFunc) {
- Y.each(newfiles, function (value) {
- var newfile = new Y.FileHTML5(value);
- if (filterFunc(newfile)) {
- parsedFiles.push(newfile);
- }
- });
- }
- else {
- Y.each(newfiles, function (value) {
- parsedFiles.push(new Y.FileHTML5(value));
- });
- }
-
- if (parsedFiles.length > 0) {
- var oldfiles = this.get("fileList");
- this.set("fileList",
- this.get("appendNewFiles") ? oldfiles.concat(parsedFiles) : parsedFiles);
- this.fire("fileselect", {fileList: parsedFiles});
- }
-
- this.fire("drop");
- break;
+
+ if (Y.Array.indexOf(event._event.dataTransfer.types, 'Files') > -1) {
+ switch (event.type) {
+ case "dragenter":
+ this.fire("dragenter");
+ break;
+ case "dragover":
+ this.fire("dragover");
+ break;
+ case "dragleave":
+ this.fire("dragleave");
+ break;
+ case "drop":
+
+ var newfiles = event._event.dataTransfer.files,
+ parsedFiles = [],
+ filterFunc = this.get("fileFilterFunction");
+
+ if (filterFunc) {
+ Y.each(newfiles, function (value) {
+ var newfile = new Y.FileHTML5(value);
+ if (filterFunc(newfile)) {
+ parsedFiles.push(newfile);
+ }
+ });
+ }
+ else {
+ Y.each(newfiles, function (value) {
+ parsedFiles.push(new Y.FileHTML5(value));
+ });
+ }
+
+ if (parsedFiles.length > 0) {
+ var oldfiles = this.get("fileList");
+ this.set("fileList",
+ this.get("appendNewFiles") ? oldfiles.concat(parsedFiles) : parsedFiles);
+ this.fire("fileselect", {fileList: parsedFiles});
+ }
+
+ this.fire("drop");
+ break;
+ }
}
},

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -344,46 +344,48 @@ Y.UploaderHTML5 = Y.extend( UploaderHTML5, Y.Widget, {
event.stopPropagation();
event.preventDefault();
-
- switch (event.type) {
- case "dragenter":
- this.fire("dragenter");
- break;
- case "dragover":
- this.fire("dragover");
- break;
- case "dragleave":
- this.fire("dragleave");
- break;
- case "drop":
-
- var newfiles = event._event.dataTransfer.files,
- parsedFiles = [],
- filterFunc = this.get("fileFilterFunction");
-
- if (filterFunc) {
- Y.each(newfiles, function (value) {
- var newfile = new Y.FileHTML5(value);
- if (filterFunc(newfile)) {
- parsedFiles.push(newfile);
- }
- });
- }
- else {
- Y.each(newfiles, function (value) {
- parsedFiles.push(new Y.FileHTML5(value));
- });
- }
-
- if (parsedFiles.length > 0) {
- var oldfiles = this.get("fileList");
- this.set("fileList",
- this.get("appendNewFiles") ? oldfiles.concat(parsedFiles) : parsedFiles);
- this.fire("fileselect", {fileList: parsedFiles});
- }
-
- this.fire("drop");
- break;
+
+ if (Y.Array.indexOf(event._event.dataTransfer.types, 'Files') > -1) {
+ switch (event.type) {
+ case "dragenter":
+ this.fire("dragenter");
+ break;
+ case "dragover":
+ this.fire("dragover");
+ break;
+ case "dragleave":
+ this.fire("dragleave");
+ break;
+ case "drop":
+
+ var newfiles = event._event.dataTransfer.files,
+ parsedFiles = [],
+ filterFunc = this.get("fileFilterFunction");
+
+ if (filterFunc) {
+ Y.each(newfiles, function (value) {
+ var newfile = new Y.FileHTML5(value);
+ if (filterFunc(newfile)) {
+ parsedFiles.push(newfile);
+ }
+ });
+ }
+ else {
+ Y.each(newfiles, function (value) {
+ parsedFiles.push(new Y.FileHTML5(value));
+ });
+ }
+
+ if (parsedFiles.length > 0) {
+ var oldfiles = this.get("fileList");
+ this.set("fileList",
+ this.get("appendNewFiles") ? oldfiles.concat(parsedFiles) : parsedFiles);
+ this.fire("fileselect", {fileList: parsedFiles});
+ }
+
+ this.fire("drop");
+ break;
+ }
}
},

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -242,7 +242,7 @@ YUI.add('uploader-queue', function (Y, NAME) {
updatedEvent.originEvent = event;
updatedEvent.file = event.target;
- this.fire("uploadcacel", updatedEvent);
+ this.fire("uploadcancel", updatedEvent);
},
@@ -652,4 +652,5 @@ YUI.add('uploader-queue', function (Y, NAME) {
Y.namespace('Uploader');
Y.Uploader.Queue = UploaderQueue;
+
}, '@VERSION@', {"requires": ["base"]});

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -242,7 +242,7 @@ YUI.add('uploader-queue', function (Y, NAME) {
updatedEvent.originEvent = event;
updatedEvent.file = event.target;
- this.fire("uploadcacel", updatedEvent);
+ this.fire("uploadcancel", updatedEvent);
},
@@ -652,4 +652,5 @@ YUI.add('uploader-queue', function (Y, NAME) {
Y.namespace('Uploader');
Y.Uploader.Queue = UploaderQueue;
+
}, '@VERSION@', {"requires": ["base"]});

0 comments on commit 46331b1

Please sign in to comment.