Index: trunk/extensions/ArticleFeedbackv5/modules/ext.articleFeedbackv5/ext.articleFeedbackv5.js |
— | — | @@ -18,20 +18,11 @@ |
19 | 19 | |
20 | 20 | /* Setup for feedback links */ |
21 | 21 | |
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 | | - |
32 | 22 | // Click event |
33 | 23 | var clickFeedbackLink = function ( $link ) { |
34 | 24 | var tracking_id = $aftDiv.articleFeedbackv5( 'bucketName' ) + |
35 | | - linkInfo[ $link.data( 'linkId' ) ].trackId; |
| 25 | + '-trigger' + $link.data( 'linkId' ) + |
| 26 | + '-click-overlay'; |
36 | 27 | $aftDiv.articleFeedbackv5( 'trackClick', tracking_id ); |
37 | 28 | $aftDiv.articleFeedbackv5( 'openAsModal', $link ); |
38 | 29 | }; |
— | — | @@ -185,15 +176,15 @@ |
186 | 177 | .text( mw.msg( 'articlefeedbackv5-bucket5-toolbox-linktext' ) ) |
187 | 178 | .click( function ( e ) { |
188 | 179 | // Just set the link ID -- this should act just like AFTv4 |
189 | | - $aftDiv.articleFeedbackv5( 'setLinkId', 'tbx' ); |
| 180 | + $aftDiv.articleFeedbackv5( 'setLinkId', 'TBX' ); |
190 | 181 | } ) |
191 | 182 | .end(); |
192 | 183 | $( '#p-tb' ).find( 'ul' ).append( $tbx ); |
193 | 184 | } else { |
194 | 185 | var $tbx = $( '<li id="t-articlefeedbackv5"><a href="#mw-articlefeedbackv5"></a></li>' ) |
195 | | - .data( 'linkId', 'tbx' ) |
196 | 186 | .find( 'a' ) |
197 | 187 | .text( mw.msg( 'articlefeedbackv5-toolbox-linktext' ) ) |
| 188 | + .data( 'linkId', 'TBX' ) |
198 | 189 | .click( function ( e ) { |
199 | 190 | e.preventDefault(); |
200 | 191 | clickFeedbackLink( $( e.target ) ); |