From: Alexander Ebert Date: Thu, 21 Jul 2016 21:57:55 +0000 (+0200) Subject: Fixed newly inserted messages not being recognized X-Git-Tag: 3.0.0_Beta_1~1007 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9448e5026f476fa7bb1951fb38b56bcee2b3f4da;p=GitHub%2FWoltLab%2FWCF.git Fixed newly inserted messages not being recognized --- diff --git a/wcfsetup/install/files/js/WoltLab/WCF/Ui/Message/InlineEditor.js b/wcfsetup/install/files/js/WoltLab/WCF/Ui/Message/InlineEditor.js index 93b531be25..edbbfba01b 100644 --- a/wcfsetup/install/files/js/WoltLab/WCF/Ui/Message/InlineEditor.js +++ b/wcfsetup/install/files/js/WoltLab/WCF/Ui/Message/InlineEditor.js @@ -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)); }, /** diff --git a/wcfsetup/install/files/js/WoltLab/WCF/Ui/Message/Manager.js b/wcfsetup/install/files/js/WoltLab/WCF/Ui/Message/Manager.js index e7347e03d0..84f07c938e 100644 --- a/wcfsetup/install/files/js/WoltLab/WCF/Ui/Message/Manager.js +++ b/wcfsetup/install/files/js/WoltLab/WCF/Ui/Message/Manager.js @@ -6,7 +6,7 @@ * @license GNU Lesser General Public License * @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)); }, /** diff --git a/wcfsetup/install/files/js/WoltLab/WCF/Ui/Message/Reply.js b/wcfsetup/install/files/js/WoltLab/WCF/Ui/Message/Reply.js index 762a9a8b86..2ad6fe0715 100644 --- a/wcfsetup/install/files/js/WoltLab/WCF/Ui/Message/Reply.js +++ b/wcfsetup/install/files/js/WoltLab/WCF/Ui/Message/Reply.js @@ -6,7 +6,7 @@ * @license GNU Lesser General Public License * @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(); } },