r111433 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r111432‎ | r111433 | r111434 >
Date:23:31, 13 February 2012
Author:werdna
Status:ok
Tags:
Comment:
Do ClickTracking and actual URL following in series rather than in parallel.
Modified paths:
  • /trunk/extensions/ArticleCreationWorkflow/modules/ext.articleCreation.user/ext.articleCreation.user.js (modified) (history)

Diff [purge]

Index: trunk/extensions/ArticleCreationWorkflow/modules/ext.articleCreation.user/ext.articleCreation.user.js
@@ -160,9 +160,10 @@
161161 urlTemplate = urlTemplate.replace( '{{USER}}', encodeURIComponent( wgUserName ) );
162162 urlTemplate = urlTemplate.replace( '{{SCRIPT}}', wgScript );
163163
164 - ac.trackAction(article, action);
165 -
166 - window.location.href = urlTemplate;
 164+ ac.trackAction(article, action)
 165+ .complete( function() {
 166+ window.location.href = urlTemplate;
 167+ });
167168 },
168169
169170 disableInterstitial : function(button) {
@@ -198,7 +199,7 @@
199200 title = title.charAt(0).toUpperCase() + title.substr(1);
200201 title = title.replace(' ', '_' );
201202
202 - jQuery.trackActionWithOptions( {
 203+ return jQuery.trackActionWithOptions( {
203204 id : ac.config['tracking-code-prefix'] + action,
204205 namespace : namespaceNumber,
205206 info : title

Status & tagging log