From 9ba4fc1585fba3febd8b6179b044c9119b45fcfc Mon Sep 17 00:00:00 2001 From: Marina Glancy Date: Thu, 4 Sep 2014 15:46:20 +0800 Subject: [PATCH] MDL-46834 dndupload: Hide dnd message when user cant upload files --- lib/form/dndupload.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/form/dndupload.js b/lib/form/dndupload.js index 60b78bb4091..b53446d6a6c 100644 --- a/lib/form/dndupload.js +++ b/lib/form/dndupload.js @@ -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;