Index: trunk/extensions/TreeAndMenu/TreeAndMenu.php |
— | — | @@ -14,7 +14,7 @@ |
15 | 15 | |
16 | 16 | if( !defined( 'MEDIAWIKI' ) ) die( 'Not an entry point.' ); |
17 | 17 | |
18 | | -define( 'TREEANDMENU_VERSION','1.3.0, 2012-01-08' ); |
| 18 | +define( 'TREEANDMENU_VERSION','1.2.4, 2012-01-09' ); |
19 | 19 | |
20 | 20 | // Set any unset images to default titles |
21 | 21 | if( !isset( $wgTreeViewImages ) || !is_array( $wgTreeViewImages ) ) $wgTreeViewImages = array(); |
— | — | @@ -29,8 +29,10 @@ |
30 | 30 | 'path' => __FILE__, |
31 | 31 | 'name' => 'TreeAndMenu', |
32 | 32 | 'author' => array( '[http://www.organicdesign.co.nz/User:Nad Nad]', '[http://www.organicdesign.co.nz/User:Sven Sven]' ), |
33 | | - 'url' => 'https://www.mediawiki.org/wiki/Extension:TreeAndMenu', |
34 | | - 'descriptionmsg' => 'treeandmenu-desc', |
| 33 | + 'url' => 'http://www.mediawiki.org/wiki/Extension:TreeAndMenu', |
| 34 | + 'description' => 'Adds #tree and #menu parser functions which contain bullet-lists to be rendered as collapsible treeview\'s or dropdown menus. |
| 35 | + The treeview\'s use the [http://www.destroydrop.com/javascripts/tree dTree] JavaScript tree menu, |
| 36 | + and the dropdown menu\'s use [http://www.htmldog.com/articles/suckerfish/dropdowns/ Son of Suckerfish]', |
35 | 37 | 'version' => TREEANDMENU_VERSION |
36 | 38 | ); |
37 | 39 | |
— | — | @@ -138,7 +140,7 @@ |
139 | 141 | * Called after parser has finished (ParserAfterTidy) so all transcluded parts can be assembled into final trees |
140 | 142 | */ |
141 | 143 | public function renderTreeAndMenu( &$parser, &$text ) { |
142 | | - global $wgJsMimeType, $wgOut, $wgVersion; |
| 144 | + global $wgJsMimeType, $wgOut; |
143 | 145 | $u = $this->uniq; |
144 | 146 | |
145 | 147 | // Determine which trees are sub trees |
— | — | @@ -232,9 +234,6 @@ |
233 | 235 | document.getElementById('$id').innerHTML = $objid.toString(); |
234 | 236 | $opennodesjs"; |
235 | 237 | |
236 | | - // If MediaWiki version 1.16+ bind the script to jQuery's ready hook |
237 | | - if( version_compare( $wgVersion, '1.16.0' ) >= 0 ) $script = "jQuery( function() { $script } );"; |
238 | | - |
239 | 238 | // Embed the script into the output |
240 | 239 | $html = "$top<div class='$class' id='$id'>$dTreeScript<script type=\"$wgJsMimeType\">/*<![CDATA[*/ |
241 | 240 | // TreeAndMenu-{$this->version} |