r108091 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r108090‎ | r108091 | r108092 >
Date:22:01, 4 January 2012
Author:rsterbin
Status:ok
Tags:aft 
Comment:
Tracking IDs for feedback links now follow the same pattern as the others (as per discussion with Dario on IRC)
Modified paths:
  • /trunk/extensions/ArticleFeedbackv5/modules/ext.articleFeedbackv5/ext.articleFeedbackv5.js (modified) (history)

Diff [purge]

Index: trunk/extensions/ArticleFeedbackv5/modules/ext.articleFeedbackv5/ext.articleFeedbackv5.js
@@ -18,20 +18,11 @@
1919
2020 /* Setup for feedback links */
2121
22 -// Info about each of the links
23 -var linkInfo = {
24 - 'A': { trackId: 'sitesub-link' },
25 - 'B': { trackId: 'titlebar-link' },
26 - 'C': { trackId: 'vertical-link' },
27 - 'D': { trackId: 'bottomright-link' },
28 - 'H': { trackId: 'section-link' },
29 - 'tbx': { trackId: 'toolbox-link' }
30 -};
31 -
3222 // Click event
3323 var clickFeedbackLink = function ( $link ) {
3424 var tracking_id = $aftDiv.articleFeedbackv5( 'bucketName' ) +
35 - linkInfo[ $link.data( 'linkId' ) ].trackId;
 25+ '-trigger' + $link.data( 'linkId' ) +
 26+ '-click-overlay';
3627 $aftDiv.articleFeedbackv5( 'trackClick', tracking_id );
3728 $aftDiv.articleFeedbackv5( 'openAsModal', $link );
3829 };
@@ -185,15 +176,15 @@
186177 .text( mw.msg( 'articlefeedbackv5-bucket5-toolbox-linktext' ) )
187178 .click( function ( e ) {
188179 // Just set the link ID -- this should act just like AFTv4
189 - $aftDiv.articleFeedbackv5( 'setLinkId', 'tbx' );
 180+ $aftDiv.articleFeedbackv5( 'setLinkId', 'TBX' );
190181 } )
191182 .end();
192183 $( '#p-tb' ).find( 'ul' ).append( $tbx );
193184 } else {
194185 var $tbx = $( '<li id="t-articlefeedbackv5"><a href="#mw-articlefeedbackv5"></a></li>' )
195 - .data( 'linkId', 'tbx' )
196186 .find( 'a' )
197187 .text( mw.msg( 'articlefeedbackv5-toolbox-linktext' ) )
 188+ .data( 'linkId', 'TBX' )
198189 .click( function ( e ) {
199190 e.preventDefault();
200191 clickFeedbackLink( $( e.target ) );

Status & tagging log