MDL-46834 dndupload: Hide dnd message when user cant upload files

This commit is contained in:
Marina Glancy
2014-09-09 10:04:14 +08:00
parent 6b6b8b9403
commit 9ba4fc1585
+3 -1
View File
@@ -83,15 +83,17 @@ M.form_dndupload.init = function(Y, options) {
Y.one('body').addClass('dndnotsupported');
return; // Browser does not support the required functionality
}
Y.one('body').addClass('dndsupported');
// try and retrieve enabled upload repository
this.repositoryid = this.get_upload_repositoryid(options.repositories);
if (!this.repositoryid) {
Y.one('body').addClass('dndnotsupported');
return; // no upload repository is enabled to upload to
}
Y.one('body').addClass('dndsupported');
this.options = options;
this.acceptedtypes = options.acceptedtypes;
this.clientid = options.clientid;