MDL-68890 progressbar: prevent display exist file's progress bar
authorhiendinh <hdpv2@open.ac.uk>
Tue, 2 Jun 2020 07:07:03 +0000 (14:07 +0700)
committerJun Pataleta <jun@moodle.com>
Wed, 17 Jun 2020 11:54:06 +0000 (19:54 +0800)
lib/form/dndupload.js

index 2d460c4..fc073fe 100644 (file)
@@ -445,12 +445,12 @@ M.form_dndupload.init = function(Y, options) {
                 if (dispfilename.length > 50) {
                     dispfilename = dispfilename.substr(0, 49)+'&hellip;';
                 }
-                var progressouter = this.container.create(dispfilename +
+                var progressouter = this.container.create('<div>' + dispfilename +
                     '<div class="progress">' +
                     '   <div class="progress-bar" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100">' +
                     '       <span class="sr-only"></span>' +
                     '   </div>' +
-                    '</div>');
+                    '</div></div>');
                 var progressinner = progressouter.one('.progress-bar');
                 var progressinnertext = progressinner.one('.sr-only');
                 var progresscontainer = this.container.one('.dndupload-progressbars');