r99077 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r99076‎ | r99077 | r99078 >
Date:04:12, 6 October 2011
Author:awjrichards
Status:ok
Tags:
Comment:
ResourceLoader-ifying globalcollect_test forms, core CSS for forms and input validation js
Modified paths:
  • /trunk/extensions/DonationInterface/payflowpro_gateway/forms/Form.php (modified) (history)
  • /trunk/extensions/DonationInterface/payflowpro_gateway/forms/rapidhtml/html/globalcollect_test.html (modified) (history)
  • /trunk/extensions/DonationInterface/payflowpro_gateway/forms/rapidhtml/html/globalcollect_test_2.html (modified) (history)
  • /trunk/extensions/DonationInterface/payflowpro_gateway/payflowpro_gateway.body.php (modified) (history)
  • /trunk/extensions/DonationInterface/payflowpro_gateway/payflowpro_gateway.php (modified) (history)

Diff [purge]

Index: trunk/extensions/DonationInterface/payflowpro_gateway/payflowpro_gateway.body.php
@@ -54,15 +54,6 @@
5555 $wgPayFlowProGatewayCSSVersion,
5656 $wgPayflowGatewaySalt;
5757
58 - $wgOut->addExtensionStyle(
59 - "{$wgScriptPath}/extensions/DonationInterface/payflowpro_gateway/payflowpro_gateway.css?284" .
60 - $wgPayFlowProGatewayCSSVersion );
61 -
62 - // Hide unneeded interface elements
63 - $wgOut->addExtensionStyle(
64 - "{$wgScriptPath}/extensions/DonationInterface/payflowpro_gateway/payflowpro_gateway.css?284" .
65 - $wgPayFlowProGatewayCSSVersion );
66 -
6758 $scriptVars = array(
6859 'payflowproGatewayErrorMsgJs' => wfMsg( 'payflowpro_gateway-error-msg-js' ),
6960 'payflowproGatewayErrorMsgEmail' => wfMsg( 'payflowpro_gateway-error-msg-email' ),
Index: trunk/extensions/DonationInterface/payflowpro_gateway/forms/rapidhtml/html/globalcollect_test.html
@@ -1,6 +1,6 @@
2 -<link rel="stylesheet" href="@script_path/skins/vector/main-ltr.css" />
3 -<link rel="stylesheet" href="@script_path/extensions/DonationInterface/payflowpro_gateway/forms/css/TwoStepTwoColumnLetter3.css" />
4 -<link rel="stylesheet" href="@script_path/extensions/DonationInterface/payflowpro_gateway/payflowpro_gateway.css" />
 2+<script type="text/javascript">
 3+mw.loader.load('pfp.form.rapidhtml.globalcollect_test');
 4+</script>
55 <style>
66 .step2hidden{ display:none; }
77 #footer-places { display:none; }
Index: trunk/extensions/DonationInterface/payflowpro_gateway/forms/rapidhtml/html/globalcollect_test_2.html
@@ -1,6 +1,6 @@
2 -<link rel="stylesheet" href="@script_path/skins/vector/main-ltr.css" />
3 -<link rel="stylesheet" href="@script_path/extensions/DonationInterface/payflowpro_gateway/forms/css/TwoStepTwoColumnLetter3.css" />
4 -<link rel="stylesheet" href="@script_path/extensions/DonationInterface/payflowpro_gateway/payflowpro_gateway.css" />
 2+<script type="text/javascript">
 3+mw.loader.load('pfp.form.rapidhtml.globalcollect_test');
 4+</script>
55 <style>
66 .step2hidden{ display:none; }
77 #footer-places { display:none; }
Index: trunk/extensions/DonationInterface/payflowpro_gateway/forms/Form.php
@@ -652,10 +652,8 @@
653653 }
654654
655655 protected function loadValidateJs() {
656 - global $wgOut, $wgScriptPath;
657 - $wgOut->addHeadItem( 'validatescript', '<script type="text/javascript" src="' .
658 - $wgScriptPath .
659 - '/extensions/DonationInterface/payflowpro_gateway/validate_input.js?284"></script>' );
 656+ global $wgOut;
 657+ $wgOut->addModules( 'pfp.form.core.validate' );
660658 }
661659
662660 protected function loadApiJs() {
Index: trunk/extensions/DonationInterface/payflowpro_gateway/payflowpro_gateway.php
@@ -183,6 +183,37 @@
184184 'remoteExtPath' => 'DonationInterface/payflowpro_gateway'
185185 );
186186
 187+// RapidHtml globalcollect_test form resources
 188+$wgResourceModules[ 'pfp.form.rapidhtml.globalcollect_test' ] = array(
 189+ 'styles' => array(
 190+ 'forms/css/TwoStepTwoColumnLetter3.css',
 191+ 'payflowpro_gateway.css',
 192+ ),
 193+ 'scripts' => array(),
 194+ 'dependencies' => array(),
 195+ 'localBasePath' => dirname( __FILE__ ),
 196+ 'remoteExtPath' => 'DonationInterface/payflowpro_gateway'
 197+);
 198+
 199+// form validation resource
 200+$wgResourceModules[ 'pfp.form.core.validate' ] = array(
 201+ 'styles' => array(),
 202+ 'scripts' => 'validate_input.js',
 203+ 'dependencies' => 'pfp.form.core.pfp_css',
 204+ 'localBasePath' => dirname( __FILE__ ),
 205+ 'remoteExtPath' => 'DonationInterface/payflowpro_gateway'
 206+);
 207+
 208+// general PFP css
 209+$wgResourceModules[ 'pfp.form.core.pfp_css' ] = array(
 210+ 'styles' => 'payflowpro_gateway.css',
 211+ 'scripts' => array(),
 212+ 'dependencies' => array(),
 213+ 'localBasePath' => dirname( __FILE__ ),
 214+ 'remoteExtPath' => 'DonationInterface/payflowpro_gateway'
 215+);
 216+
 217+// RapidHtml lightbox form resources
187218 $wgResourceModules[ 'pfp.form.rapidhtml.lightbox.js' ] = array(
188219 'scripts' => array(
189220 'forms/rapidhtml/js/lightbox1.js',
@@ -202,6 +233,9 @@
203234 'position' => 'top',
204235 );
205236
 237+// RapidHtml lightbox form css resources (these are separate from the js
 238+// resources for a good reason but I forget what - I believe to facilitate
 239+// ensuring proper load order?
206240 $wgResourceModules[ 'pfp.form.rapidhtml.lightbox.css' ] = array(
207241 'styles' => array(
208242 'forms/rapidhtml/css/lightbox1.css',

Follow-up revisions

RevisionCommit summaryAuthorDate
r100196Merging the fundraising branch of DonationInterface back into trunk....khorn00:47, 19 October 2011

Status & tagging log