http://www.mediawiki.org/wiki/Special:Code/MediaWiki/75405

Revision: 75405
Author:   nimishg
Date:     2010-10-25 23:57:16 +0000 (Mon, 25 Oct 2010)
Log Message:
-----------
changed JS code for jquery

Modified Paths:
--------------
    branches/fundraising/OWA/DonationInterface/payflowpro_gateway/forms/Form.php
    
branches/fundraising/OWA/DonationInterface/payflowpro_gateway/owa_get_info.js

Modified: 
branches/fundraising/OWA/DonationInterface/payflowpro_gateway/forms/Form.php
===================================================================
--- 
branches/fundraising/OWA/DonationInterface/payflowpro_gateway/forms/Form.php    
    2010-10-25 23:57:10 UTC (rev 75404)
+++ 
branches/fundraising/OWA/DonationInterface/payflowpro_gateway/forms/Form.php    
    2010-10-25 23:57:16 UTC (rev 75405)
@@ -665,10 +665,10 @@
        protected function loadOwaJs() {
                global $wgOut, $wgScriptPath;
                $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>');
-               $wgOut->addHeadItem('owa_get_info', '<script 
type="text/javascript" 
src="http://analytics.tesla.usability.wikimedia.org/owa_get_info.js";></script>');
-               /*$wgOut->addHeadItem( 'owa_get_info', '<script 
type="text/javascript" src="' .
+               
+               $wgOut->addHeadItem( 'owa_get_info', '<script 
type="text/javascript" src="' .
                                                        $wgScriptPath .
-                                                       
'/extensions/DonationInterface/payflowpro_gateway/owa_get_info.js?284"></script>'
 );*/
+                                                       
'/extensions/DonationInterface/payflowpro_gateway/owa_get_info.js?284"></script>'
 );
                $wgOut->addHeadItem( 'owa_tracker', '<script 
type="text/javascript" src="' .
                                                        $wgScriptPath .
                                                        
'/extensions/DonationInterface/payflowpro_gateway/owa.tracker-combined-min.js?284"></script>'
 );

Modified: 
branches/fundraising/OWA/DonationInterface/payflowpro_gateway/owa_get_info.js
===================================================================
--- 
branches/fundraising/OWA/DonationInterface/payflowpro_gateway/owa_get_info.js   
    2010-10-25 23:57:10 UTC (rev 75404)
+++ 
branches/fundraising/OWA/DonationInterface/payflowpro_gateway/owa_get_info.js   
    2010-10-25 23:57:16 UTC (rev 75405)
@@ -1,18 +1,7 @@
 var get_owa_information = function() {
-if(OWA.util.readCookie){
-        var owa_s_val = OWA.util.readCookie("owa_s");
-        var owa_s_ident = "sid%3D%3E";
-        var owaS_start_index = owa_s_val.indexOf(owa_s_ident);
-        //NOTE: This only works as long as sid is the last param in the OWA 
cookie
-        if(owaS_start_index >= 0){
-          var owaSessionID = owa_s_val.substr(owaS_start_index + 
owa_s_ident.length);
-          if(document.getElementById("owa_session") && 
-                    document.getElementById("owa_ref")){
-                    document.getElementById("owa_session").value = 
owaSessionID;
-                                       
document.getElementById("owa_ref").value = encode(window.location);
-          }
-        }
+if(OWA.util.getState){
+       jQuery("input[name=owa_session]").val( OWA.util.getState('s', 'sid') );
+       jQuery("input[name=owa_ref]").val( escape(window.location) );
 }
 };
-
 if(jQuery){jQuery(document).ready(get_owa_information);}


_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to