mirror of
https://github.com/moodle/moodle.git
synced 2025-08-10 03:16:42 +02:00
MDL-31642 added 'max attachments' to filemanager and 'drag and drop' message inside the box
This commit is contained in:
parent
5bbf3cb72b
commit
adce023069
6 changed files with 30 additions and 4 deletions
|
@ -61,6 +61,7 @@ M.form_filemanager.init = function(Y, options) {
|
|||
this.currentpath = '/';
|
||||
this.maxfiles = options.maxfiles;
|
||||
this.maxbytes = options.maxbytes;
|
||||
this.emptycallback = null; // Used by drag and drop upload
|
||||
|
||||
this.filepicker_options = options.filepicker?options.filepicker:{};
|
||||
this.filepicker_options.client_id = this.client_id;
|
||||
|
@ -264,7 +265,15 @@ M.form_filemanager.init = function(Y, options) {
|
|||
}, this);
|
||||
},
|
||||
empty_filelist: function(container) {
|
||||
container.set('innerHTML', '<div class="mdl-align">'+M.str.repository.nofilesattached+'</div>'+this.upload_message());
|
||||
var content = '<div class="mdl-align">'+M.str.repository.nofilesattached;
|
||||
content += '<span id="dndenabled2-'+this.client_id+'" style="display: none">';
|
||||
content += ' - '+M.util.get_string('dndenabled_inbox', 'moodle')+'</span>';
|
||||
content += '</div>';
|
||||
content += this.upload_message();
|
||||
container.set('innerHTML', content);
|
||||
if (this.emptycallback) {
|
||||
this.emptycallback(this.client_id);
|
||||
}
|
||||
},
|
||||
upload_message: function() {
|
||||
var div = '<div id="filemanager-uploadmessage'+this.client_id+'" style="display:none" class="dndupload-target">';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue