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

This commit is contained in:
Marina Glancy
2014-09-09 10:03:25 +08:00
parent 7f0bfd592e
commit d0965c1dc4
+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;