Index: trunk/extensions/Babel/Babel.php |
— | — | @@ -40,6 +40,12 @@ |
41 | 41 | $wgAutoloadClasses['BabelStatic'] = $dir . 'BabelStatic.class.php'; |
42 | 42 | $wgAutoloadClasses['BabelAutoCreate'] = $dir . 'BabelAutoCreate.class.php'; |
43 | 43 | |
| 44 | +$wgResourceModules['BabelExtension'] = array( |
| 45 | + 'styles' => 'Babel.css', |
| 46 | + 'localBasePath' => dirname( __FILE__ ), |
| 47 | + 'remoteExtPath' => 'Babel', |
| 48 | +); |
| 49 | + |
44 | 50 | // Configuration setttings. |
45 | 51 | // Language names and codes constant database files, the defaults should suffice. |
46 | 52 | $wgBabelLanguageCodesCdb = $dir . 'codes.cdb'; |
Index: trunk/extensions/Babel/Babel.css |
— | — | @@ -12,8 +12,8 @@ |
13 | 13 | /* Babel wrapper layout. */ |
14 | 14 | /* @noflip */table.mw-babel-wrapper { |
15 | 15 | width: 238px; |
16 | | - float: right; /* change this to 'left' on RTL wikis */ |
17 | | - clear: right; /* change this to 'left' on RTL wikis */ |
| 16 | + float: right; |
| 17 | + clear: right; |
18 | 18 | margin: 1em; |
19 | 19 | background-color: white; |
20 | 20 | border-style: solid; |
— | — | @@ -21,13 +21,31 @@ |
22 | 22 | border-color: #99B3FF; |
23 | 23 | } |
24 | 24 | |
| 25 | +/* @noflip */.mw-content-ltr table.mw-babel-wrapper { |
| 26 | + float: right; |
| 27 | + clear: right; |
| 28 | +} |
| 29 | +/* @noflip */.mw-content-rtl table.mw-babel-wrapper { |
| 30 | + float: left; |
| 31 | + clear: left; |
| 32 | +} |
| 33 | + |
25 | 34 | /* Babel box layout */ |
26 | 35 | /* @noflip */div.mw-babel-box { |
27 | | - float: left; /* change this to 'right' on RTL wikis */ |
28 | | - clear: left; /* change this to 'right' on RTL wikis */ |
| 36 | + float: left; |
| 37 | + clear: left; |
29 | 38 | margin: 1px; |
30 | 39 | } |
31 | 40 | |
| 41 | +/* @noflip */.mw-content-ltr table.mw-babel-box { |
| 42 | + float: left; |
| 43 | + clear: left; |
| 44 | +} |
| 45 | +/* @noflip */.mw-content-rtl table.mw-babel-box { |
| 46 | + float: right; |
| 47 | + clear: right; |
| 48 | +} |
| 49 | + |
32 | 50 | div.mw-babel-box table { |
33 | 51 | width: 238px; |
34 | 52 | } |
Index: trunk/extensions/Babel/BabelStatic.class.php |
— | — | @@ -14,6 +14,8 @@ |
15 | 15 | * @return Boolean: True. |
16 | 16 | */ |
17 | 17 | public static function Setup( $parser ) { |
| 18 | + global $wgOut; |
| 19 | + $wgOut->addModules( 'BabelExtension' ); |
18 | 20 | $parser->setFunctionHook( 'babel', array( 'Babel', 'Render' ) ); |
19 | 21 | return true; |
20 | 22 | } |