Fixed newly inserted messages not being recognized
authorAlexander Ebert <ebert@woltlab.com>
Thu, 21 Jul 2016 21:57:55 +0000 (23:57 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Thu, 21 Jul 2016 21:57:55 +0000 (23:57 +0200)
wcfsetup/install/files/js/WoltLab/WCF/Ui/Message/InlineEditor.js
wcfsetup/install/files/js/WoltLab/WCF/Ui/Message/Manager.js
wcfsetup/install/files/js/WoltLab/WCF/Ui/Message/Reply.js

index 93b531be2596bca539c3d62d83435e7e30514b70..edbbfba01bfd84e4072ad8b0f42f2ccc2d23f4ae 100644 (file)
@@ -9,12 +9,12 @@
 define(
        [
                'Ajax',         'Core',            'Dictionary',          'Environment',
-               'EventHandler', 'Language',        'ObjectMap',           'Dom/Traverse',
+               'EventHandler', 'Language',        'ObjectMap',           'Dom/ChangeListener', 'Dom/Traverse',
                'Dom/Util',     'Ui/Notification', 'Ui/ReusableDropdown', 'WoltLab/WCF/Ui/Scroll'
        ],
        function(
                Ajax,            Core,              Dictionary,            Environment,
-               EventHandler,    Language,          ObjectMap,             DomTraverse,
+               EventHandler,    Language,          ObjectMap,             DomChangeListener,    DomTraverse,
                DomUtil,         UiNotification,    UiReusableDropdown,    UiScroll
        )
 {
@@ -49,6 +49,8 @@ define(
                        }, options);
                        
                        this.rebuild();
+                       
+                       DomChangeListener.add('Ui/Message/InlineEdit_' + this._options.className, this.rebuild.bind(this));
                },
                
                /**
index e7347e03d05c0d24a9c16eccd8c82836fdae02c7..84f07c938e8f9b76e03888701d13843adce4b6c6 100644 (file)
@@ -6,7 +6,7 @@
  * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
  * @module     WoltLab/WCF/Ui/Message/Manager
  */
-define(['Ajax', 'Core', 'Dictionary', 'Language', 'Dom/Util'], function(Ajax, Core, Dictionary, Language, DomUtil) {
+define(['Ajax', 'Core', 'Dictionary', 'Language', 'Dom/ChangeListener', 'Dom/Util'], function(Ajax, Core, Dictionary, Language, DomChangeListener, DomUtil) {
        "use strict";
        
        /**
@@ -28,6 +28,8 @@ define(['Ajax', 'Core', 'Dictionary', 'Language', 'Dom/Util'], function(Ajax, Co
                        }, options);
                        
                        this.rebuild();
+                       
+                       DomChangeListener.add('Ui/Message/Manager' + this._options.className, this.rebuild.bind(this));
                },
                
                /**
index 762a9a8b868a695fb76a8d4053ee0d863f17a26b..2ad6fe0715b2d05292fbcf6ac935c773fd4dcb16 100644 (file)
@@ -6,7 +6,7 @@
  * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
  * @module     WoltLab/WCF/Ui/Message/Reply
  */
-define(['Ajax', 'Core', 'EventHandler', 'Language', 'Dom/Util', 'Ui/Notification', '../Scroll'], function(Ajax, Core, EventHandler, Language, DomUtil, UiNotification, UiScroll) {
+define(['Ajax', 'Core', 'EventHandler', 'Language', 'Dom/ChangeListener', 'Dom/Util', 'Ui/Notification', '../Scroll'], function(Ajax, Core, EventHandler, Language, DomChangeListener, DomUtil, UiNotification, UiScroll) {
        "use strict";
        
        /**
@@ -249,6 +249,8 @@ define(['Ajax', 'Core', 'EventHandler', 'Language', 'Dom/Util', 'Ui/Notification
                                if (this._options.quoteManager) {
                                        this._options.quoteManager.countQuotes();
                                }
+                               
+                               DomChangeListener.trigger();
                        }
                },