jenkins-bot has submitted this change and it was merged.

Change subject: Remove (if exists) entry from list if it'll be pulled as 
highlight
......................................................................


Remove (if exists) entry from list if it'll be pulled as highlight

The problem with only hiding it is that, after moderating the (visible) 
highlighted one, the html of $( '.articleFeedbackv5-feedback[data-id='+id+']' ) 
will be replaced with fresh html. If we only hide the original entry, it will 
also match that selector, have it's html replaced, return to visible state and 
all of a sudden the feedback will be visible twice (once the original entry in 
list, once the highlighted one on top)

Change-Id: If70c0ad684765bcb5d56374d2bb775c62d76d4db
---
M modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.special.js
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Kaldari: Looks good to me, approved
  jenkins-bot: Verified



diff --git 
a/modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.special.js 
b/modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.special.js
index d7cf945..2ff0b55 100644
--- a/modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.special.js
+++ b/modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.special.js
@@ -922,7 +922,7 @@
                                        }
                                        if ( 
$.articleFeedbackv5special.highlightId ) {
                                                if (this.info.afvffeedbackid == 
$.articleFeedbackv5special.highlightId ) {
-                                                       $( 
'.articleFeedbackv5-feedback[data-id=' + $.articleFeedbackv5special.highlightId 
+ ']:not(.articleFeedbackv5-feedback-highlighted)' ).hide();
+                                                       $( 
'.articleFeedbackv5-feedback[data-id=' + $.articleFeedbackv5special.highlightId 
+ ']:not(.articleFeedbackv5-feedback-highlighted)' ).remove();
                                                        
$.articleFeedbackv5special.highlightId = undefined;
                                                } else if ( !prependContents ) {
                                                        
$.articleFeedbackv5special.pullHighlight();

-- 
To view, visit https://gerrit.wikimedia.org/r/56148
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: If70c0ad684765bcb5d56374d2bb775c62d76d4db
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ArticleFeedbackv5
Gerrit-Branch: master
Gerrit-Owner: Matthias Mullie <[email protected]>
Gerrit-Reviewer: Kaldari <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to