r112717 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r112716‎ | r112717 | r112718 >
Date:20:33, 29 February 2012
Author:foxtrott
Status:deferred
Tags:
Comment:
bugfix (Cannot read property 'regional' of undefined)
Modified paths:
  • /trunk/extensions/SemanticFormsInputs/includes/SFI_DatePicker.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticFormsInputs/includes/SFI_DatePicker.php
@@ -74,22 +74,16 @@
7575 static private function setup() {
7676
7777 global $wgOut, $wgLang;
78 -// global $sfgScriptPath, $sfigSettings;
7978
8079 static $hasRun = false;
8180
8281 if ( !$hasRun ) {
8382 $hasRun = true;
8483
85 -// $wgOut->addExtensionStyle( $sfgScriptPath . '/skins/jquery-ui/base/jquery.ui.datepicker.css' );
86 -// $wgOut->addExtensionStyle( $sfgScriptPath . '/skins/jquery-ui/base/jquery.ui.theme.css' );
87 -// $wgOut->addScript( '<script type="text/javascript" src="' . $sfgScriptPath . '/libs/jquery-ui/jquery.ui.datepicker.min.js"></script> ' );
88 -// $wgOut->addScript( '<script type="text/javascript" src="' . $sfigSettings->scriptPath . '/libs/datepicker.js"></script> ' );
89 -
9084 // set localized messages (use MW i18n, not jQuery i18n)
9185 $jstext =
92 -// "mw.loader.using('ext.semanticformsinputs.datepicker', function(){\n" .
93 - " jQuery.datepicker.regional['wiki'] = {\n"
 86+ "mw.loader.using('ext.semanticformsinputs.datepicker', function(){\n"
 87+ . " jQuery.datepicker.regional['wiki'] = {\n"
9488 . " closeText: '" . Xml::escapeJsString( wfMsg( 'semanticformsinputs-close' ) ) . "',\n"
9589 . " prevText: '" . Xml::escapeJsString( wfMsg( 'semanticformsinputs-prev' ) ) . "',\n"
9690 . " nextText: '" . Xml::escapeJsString( wfMsg( 'semanticformsinputs-next' ) ) . "',\n"
@@ -150,8 +144,8 @@
151145 . " isRTL: " . ( $wgLang->isRTL() ? "true" : "false" ) . ",\n"
152146 . " showMonthAfterYear: false,\n"
153147 . " yearSuffix: ''};\n"
154 - . " jQuery.datepicker.setDefaults(jQuery.datepicker.regional['wiki']);\n";
155 -// . "});\n";
 148+ . " jQuery.datepicker.setDefaults(jQuery.datepicker.regional['wiki']);\n"
 149+ . "});\n";
156150
157151 $wgOut->addScript( Html::inlineScript( $jstext ) );
158152