MDL-31642 added 'max attachments' to filemanager and 'drag and drop' message inside the box

This commit is contained in:
Davo Smith 2012-02-23 19:34:59 +00:00
parent 5bbf3cb72b
commit adce023069
6 changed files with 30 additions and 4 deletions

View file

@ -95,6 +95,15 @@ M.form_dndupload.init = function(Y, options) {
// Needed to tell the filemanager to redraw when files uploaded
// and to check how many files are already uploaded
this.filemanager = options.filemanager;
// Add a callback to show the 'drag and drop enabled' message
// within the filemanager box once it has finished loading,
// if there are no files yet uploaded
this.filemanager.emptycallback = function(clientid) {
var el = Y.one('#dndenabled2-'+clientid);
if (el) {
el.setStyle('display', 'inline');
}
}
} else if (options.formcallback) {
// Needed to tell the filepicker to update when a new