jenkins-bot has submitted this change and it was merged.
Change subject: Clone thanked label before inserting
......................................................................
Clone thanked label before inserting
ThankedLabel is inserted before the Thank link that's being clicked.
The label needs to be cloned on each insertion so it is not removed
on subsequent $.insert().
Bug: 63506
Change-Id: I8327158880cba9a141a4d9977414022173c4c8ac
---
M modules/ext.thanks.flowthank.js
1 file changed, 2 insertions(+), 2 deletions(-)
Approvals:
Bartosz Dziewoński: Looks good to me, approved
jenkins-bot: Verified
diff --git a/modules/ext.thanks.flowthank.js b/modules/ext.thanks.flowthank.js
index 74a7076..f9cbeda 100644
--- a/modules/ext.thanks.flowthank.js
+++ b/modules/ext.thanks.flowthank.js
@@ -12,7 +12,7 @@
$( 'a.mw-thanks-flow-thank-link' ).each( function( idx, el ) {
var $thankLink = $( el );
if ( mw.thanks.thanked.contains( $thankLink ) ) {
- $thankLink.before( $thankedLabel );
+ $thankLink.before( $thankedLabel.clone() );
$thankLink.remove();
}
} );
@@ -25,7 +25,7 @@
'token' : mw.user.tokens.get( 'editToken' )
} )
.done( function( data ) {
- $thankLink.before( $thankedLabel );
+ $thankLink.before( $thankedLabel.clone() );
$thankLink.remove();
mw.thanks.thanked.push( $thankLink );
} )
--
To view, visit https://gerrit.wikimedia.org/r/122116
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I8327158880cba9a141a4d9977414022173c4c8ac
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Thanks
Gerrit-Branch: master
Gerrit-Owner: Bencmq <[email protected]>
Gerrit-Reviewer: Bartosz Dziewoński <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: Spage <[email protected]>
Gerrit-Reviewer: Wctaiwan <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits