r75405 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r75404‎ | r75405 | r75406 >
Date:23:57, 25 October 2010
Author:nimishg
Status:deferred
Tags:
Comment:
changed JS code for jquery
Modified paths:
  • /branches/fundraising/OWA/DonationInterface/payflowpro_gateway/forms/Form.php (modified) (history)
  • /branches/fundraising/OWA/DonationInterface/payflowpro_gateway/owa_get_info.js (modified) (history)

Diff [purge]

Index: branches/fundraising/OWA/DonationInterface/payflowpro_gateway/forms/Form.php
@@ -665,10 +665,10 @@
666666 protected function loadOwaJs() {
667667 global $wgOut, $wgScriptPath;
668668 $wgOut->addHeadItem('owa_tracker_analytics', '<script type="text/javascript" src="http://analytics.tesla.usability.wikimedia.org/wiki/d/extensions/owa/modules/base/js/owa.tracker-combined-min.js"></script>');
669 - $wgOut->addHeadItem('owa_get_info', '<script type="text/javascript" src="http://analytics.tesla.usability.wikimedia.org/owa_get_info.js"></script>');
670 - /*$wgOut->addHeadItem( 'owa_get_info', '<script type="text/javascript" src="' .
 669+
 670+ $wgOut->addHeadItem( 'owa_get_info', '<script type="text/javascript" src="' .
671671 $wgScriptPath .
672 - '/extensions/DonationInterface/payflowpro_gateway/owa_get_info.js?284"></script>' );*/
 672+ '/extensions/DonationInterface/payflowpro_gateway/owa_get_info.js?284"></script>' );
673673 $wgOut->addHeadItem( 'owa_tracker', '<script type="text/javascript" src="' .
674674 $wgScriptPath .
675675 '/extensions/DonationInterface/payflowpro_gateway/owa.tracker-combined-min.js?284"></script>' );
Index: branches/fundraising/OWA/DonationInterface/payflowpro_gateway/owa_get_info.js
@@ -1,18 +1,7 @@
22 var get_owa_information = function() {
3 -if(OWA.util.readCookie){
4 - var owa_s_val = OWA.util.readCookie("owa_s");
5 - var owa_s_ident = "sid%3D%3E";
6 - var owaS_start_index = owa_s_val.indexOf(owa_s_ident);
7 - //NOTE: This only works as long as sid is the last param in the OWA cookie
8 - if(owaS_start_index >= 0){
9 - var owaSessionID = owa_s_val.substr(owaS_start_index + owa_s_ident.length);
10 - if(document.getElementById("owa_session") &&
11 - document.getElementById("owa_ref")){
12 - document.getElementById("owa_session").value = owaSessionID;
13 - document.getElementById("owa_ref").value = encode(window.location);
14 - }
15 - }
 3+if(OWA.util.getState){
 4+ jQuery("input[name=owa_session]").val( OWA.util.getState('s', 'sid') );
 5+ jQuery("input[name=owa_ref]").val( escape(window.location) );
166 }
177 };
18 -
198 if(jQuery){jQuery(document).ready(get_owa_information);}

Status & tagging log