r82728 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r82727‎ | r82728 | r82729 >
Date:15:59, 24 February 2011
Author:junaidpv
Status:ok
Tags:
Comment:
little more documentation
Modified paths:
  • /trunk/extensions/Narayam/Narayam.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Narayam/Narayam.php
@@ -37,14 +37,21 @@
3838 );
3939
4040 /// @todo Document all settings
 41+// control key included in short key combination??
4142 $wgNarayamConfig['shortcut_controlkey'] = true;
 43+// alt key included in short key combination??
4244 $wgNarayamConfig['shortcut_altkey'] = false;
 45+// shift key included in short key combination??
4346 $wgNarayamConfig['shortcut_shiftkey'] = false;
 47+// meta key included in short key combination?? (only effects mac clients)
4448 $wgNarayamConfig['shortcut_metakey'] = false;
 49+// short key in short key combination
4550 $wgNarayamConfig['shortcut_key'] = 'M';
46 -// $wgNarayamConfig['default_state'] = true;
 51+// list of schemes to be loaded when no one specified
4752 $wgNarayamConfig['schemes'] = array( 'ml', 'ta99', 'ml_inscript' );
 53+// which scheme should come as default in the list box
4854 $wgNarayamConfig['default_scheme_index'] = 0;
 55+// whether the input method should be active as default or not
4956 $wgNarayamConfig['enabled'] = true;
5057
5158 // localization
@@ -80,7 +87,7 @@
8188 *
8289 * @var Skin
8390 */
84 - private $_sk;
 91+ private $_skin;
8592 /**
8693 * Only skins listed here are supported
8794 * @var array
@@ -115,8 +122,8 @@
116123 }
117124 global $wgExtensionAssetsPath, $wgNarayamConfig;
118125 $this->_out = $out;
119 - $this->_sk = $sk;
120 - // add script tag for each scheme
 126+ $this->_skin = $sk;
 127+ // add script tag for each scheme to be loaded
121128 foreach ( $wgNarayamConfig['schemes'] as $scheme ) {
122129 $out->addScriptFile( "$wgExtensionAssetsPath/Narayam/{$scheme}_rules.js" );
123130 }
@@ -183,8 +190,8 @@
184191 $str .= "elements = document.getElementsByTagName('textarea');";
185192 $str .= "inputRewrite(elements);\n";
186193 // $str .= sprintf("Narayam.init(%d);\n", $wgNarayamConfig['default_scheme_index']);
187 - if ( in_array( $this->_sk->getSkinName(), $this->_supportedSkins ) ) {
188 - $str .= 'setupNarayamFor' . $this->_sk->getSkinName() . "();\n";
 194+ if ( in_array( $this->_skin->getSkinName(), $this->_supportedSkins ) ) {
 195+ $str .= 'setupNarayamFor' . $this->_skin->getSkinName() . "();\n";
189196 }
190197 $str .= "}\n";
191198 $str .= "if (window.addEventListener){\n";

Status & tagging log