Rebuild interface elements on upload
authorAlexander Ebert <ebert@woltlab.com>
Fri, 10 Jul 2020 18:49:36 +0000 (20:49 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Fri, 10 Jul 2020 18:49:36 +0000 (20:49 +0200)
wcfsetup/install/files/js/WCF.Attachment.js

index 6968f565868c46a7ac714ee033ff6f266fc2059d..41a2bf63496176f25610f5f4756b63cdf358a0ff 100644 (file)
@@ -620,6 +620,10 @@ WCF.Attachment.Upload = WCF.Upload.extend({
                        }
                }
                
+               this._rebuildInterface();
+       },
+       
+       _rebuildInterface: function () {
                this._makeSortable();
                
                if (this._fileListSelector.children('li:not(.uploadFailed)').length) {
@@ -790,9 +794,15 @@ WCF.Attachment.Upload = WCF.Upload.extend({
                        this._fileListSelector[0].appendChild(attachment);
                        
                        elShow(this._fileListSelector[0]);
+                       
+                       this._rebuildInterface();
                }).bind(this));
        },
        
+       /**
+        * @param {string} type
+        * @param {Object} data
+        */
        _triggerSync: function (type, data) {
                WCF.System.Event.fireEvent('com.woltlab.wcf.redactor2', 'sync_' + this._tmpHash, {
                        source: this,