Index: trunk/extensions/Narayam/Narayam.php |
— | — | @@ -37,14 +37,21 @@ |
38 | 38 | ); |
39 | 39 | |
40 | 40 | /// @todo Document all settings |
| 41 | +// control key included in short key combination?? |
41 | 42 | $wgNarayamConfig['shortcut_controlkey'] = true; |
| 43 | +// alt key included in short key combination?? |
42 | 44 | $wgNarayamConfig['shortcut_altkey'] = false; |
| 45 | +// shift key included in short key combination?? |
43 | 46 | $wgNarayamConfig['shortcut_shiftkey'] = false; |
| 47 | +// meta key included in short key combination?? (only effects mac clients) |
44 | 48 | $wgNarayamConfig['shortcut_metakey'] = false; |
| 49 | +// short key in short key combination |
45 | 50 | $wgNarayamConfig['shortcut_key'] = 'M'; |
46 | | -// $wgNarayamConfig['default_state'] = true; |
| 51 | +// list of schemes to be loaded when no one specified |
47 | 52 | $wgNarayamConfig['schemes'] = array( 'ml', 'ta99', 'ml_inscript' ); |
| 53 | +// which scheme should come as default in the list box |
48 | 54 | $wgNarayamConfig['default_scheme_index'] = 0; |
| 55 | +// whether the input method should be active as default or not |
49 | 56 | $wgNarayamConfig['enabled'] = true; |
50 | 57 | |
51 | 58 | // localization |
— | — | @@ -80,7 +87,7 @@ |
81 | 88 | * |
82 | 89 | * @var Skin |
83 | 90 | */ |
84 | | - private $_sk; |
| 91 | + private $_skin; |
85 | 92 | /** |
86 | 93 | * Only skins listed here are supported |
87 | 94 | * @var array |
— | — | @@ -115,8 +122,8 @@ |
116 | 123 | } |
117 | 124 | global $wgExtensionAssetsPath, $wgNarayamConfig; |
118 | 125 | $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 |
121 | 128 | foreach ( $wgNarayamConfig['schemes'] as $scheme ) { |
122 | 129 | $out->addScriptFile( "$wgExtensionAssetsPath/Narayam/{$scheme}_rules.js" ); |
123 | 130 | } |
— | — | @@ -183,8 +190,8 @@ |
184 | 191 | $str .= "elements = document.getElementsByTagName('textarea');"; |
185 | 192 | $str .= "inputRewrite(elements);\n"; |
186 | 193 | // $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"; |
189 | 196 | } |
190 | 197 | $str .= "}\n"; |
191 | 198 | $str .= "if (window.addEventListener){\n"; |