fix error handling in guest-wcf dialog
authorJoshua Rüsweg <josh@bastelstu.be>
Tue, 21 Oct 2014 19:15:16 +0000 (21:15 +0200)
committerJoshua Rüsweg <josh@bastelstu.be>
Tue, 21 Oct 2014 19:15:16 +0000 (21:15 +0200)
Is currently writing as a guest a response to a comment and choose for example an blocked name, the dialog is closed anyway, instead of displaying the error message.

wcfsetup/install/files/js/WCF.Comment.js

index 11d90fb0da039eaf09774a02487844b17e0b3338..8197b8a06f5bdafa732384fd6a9e7181370fd54b 100644 (file)
@@ -568,10 +568,10 @@ WCF.Comment.Handler = Class.extend({
                                        var $responseList = $comment.find('ul.commentResponseList');
                                        if (!$responseList.length) $responseList = $('<ul class="commentResponseList" />').insertBefore($comment.find('.commentOptionContainer'));
                                        $(data.returnValues.template).appendTo($responseList).wcfFadeIn();
-                               }
-                               
-                               if (!WCF.User.userID) {
-                                       this._guestDialog.wcfDialog('close');
+                                       
+                                       if (!WCF.User.userID) {
+                                               this._guestDialog.wcfDialog('close');
+                                       }
                                }
                        break;