r89355 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r89354‎ | r89355 | r89356 >
Date:18:54, 2 June 2011
Author:catrope
Status:ok
Tags:
Comment:
1.17wmf1: MFT r88146, r88151, r89198, r89274
Modified paths:
  • /branches/wmf/1.17wmf1/extensions/ArticleFeedback/modules/ext.articleFeedback/ext.articleFeedback.js (modified) (history)
  • /branches/wmf/1.17wmf1/extensions/ArticleFeedback/modules/ext.articleFeedback/ext.articleFeedback.startup.js (modified) (history)
  • /branches/wmf/1.17wmf1/extensions/ArticleFeedback/modules/jquery.articleFeedback/jquery.articleFeedback.css (modified) (history)

Diff [purge]

Index: branches/wmf/1.17wmf1/extensions/ArticleFeedback/modules/jquery.articleFeedback/jquery.articleFeedback.css
@@ -8,6 +8,12 @@
99 margin-top: 1em;
1010 }
1111
 12+@media print {
 13+ .articleFeedback {
 14+ display:none;
 15+ }
 16+}
 17+
1218 .articleFeedback-panel {
1319 background-color: #f9f9f9;
1420 border: 1px solid #cccccc;
Index: branches/wmf/1.17wmf1/extensions/ArticleFeedback/modules/ext.articleFeedback/ext.articleFeedback.js
@@ -290,15 +290,20 @@
291291 'action': function() {
292292 // Mute for 7 days
293293 mutePitch( 'edit', 7 );
294 - // Go to edit page
295 - // Track the click through an API redirect
 294+ // Setup edit page link
 295+ var params = {
 296+ 'title': mw.config.get( 'wgPageName' ),
 297+ 'action': 'edit'
 298+ };
 299+ if ( tracked ) {
 300+ // Keep track of tracked users' edits
 301+ params.clicktrackingsession = $.cookie( 'clicktracking-session' );
 302+ params.clicktrackingevent = prefix( 'pitch-edit-save' );
 303+ }
 304+ // Track the click through an API redirect (automatically bypasses if !tracked)
296305 window.location = trackClickURL(
297 - mw.config.get( 'wgScript' ) + '?' + $.param( {
298 - 'title': mw.config.get( 'wgPageName' ),
299 - 'action': 'edit',
300 - 'clicktrackingsession': $.cookie( 'clicktracking-session' ),
301 - 'clicktrackingevent': prefix( 'pitch-edit-save' )
302 - } ), 'pitch-edit-accept' );
 306+ mw.config.get( 'wgScript' ) + '?' + $.param( params ), 'pitch-edit-accept'
 307+ );
303308 return false;
304309 },
305310 'title': 'articlefeedback-pitch-thanks',
Index: branches/wmf/1.17wmf1/extensions/ArticleFeedback/modules/ext.articleFeedback/ext.articleFeedback.startup.js
@@ -13,6 +13,10 @@
1414 // Current revision
1515 && mw.util.getParamValue( 'diff' ) == null
1616 && mw.util.getParamValue( 'oldid' ) == null
 17+ // Not viewing a redirect
 18+ && mw.util.getParamValue( 'redirect' ) != 'no'
 19+ // Not viewing the printable version
 20+ && mw.util.getParamValue( 'printable' ) != 'yes'
1721 ) {
1822 var trackingBucket = mw.user.bucket(
1923 'ext.articleFeedback-tracking', mw.config.get( 'wgArticleFeedbackTracking' )

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r88146Suppress article feedback tool on redirects. (Bug reported on English...erik10:41, 15 May 2011
r88151Move to startup per r88146 code review commenterik11:01, 15 May 2011
r89198Suppress AFT from all print outputs. I am adding a @media rule, but also...erik02:12, 31 May 2011
r89274Fixes bug #29222 by conditionally adding the clicktracking parameters to the...tparscal17:34, 1 June 2011

Status & tagging log