Fixed message sort order setting
authorMarcel Werk <burntime@woltlab.com>
Wed, 15 Jan 2014 22:30:48 +0000 (23:30 +0100)
committerMarcel Werk <burntime@woltlab.com>
Wed, 15 Jan 2014 22:30:48 +0000 (23:30 +0100)
wcfsetup/install/files/js/WCF.Message.js

index fccfb57ec02d4e11621ce87503539e66e283655c..7c5748932d95401a18c644f2f5cd7498cd2a0847 100644 (file)
@@ -915,7 +915,12 @@ WCF.Message.QuickReply = Class.extend({
                        if (data.returnValues.template) {
                                // insert HTML
                                var $message = $('' + data.returnValues.template);
-                               $message.insertBefore(this._container);
+                               if (this._container.data('sortOrder') == 'DESC') {
+                                       $message.insertAfter(this._container);
+                               }
+                               else {
+                                       $message.insertBefore(this._container);
+                               }
                                
                                // update last post time
                                this._container.data('lastPostTime', data.returnValues.lastPostTime);