r54670 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r54669‎ | r54670 | r54671 >
Date:16:52, 9 August 2009
Author:nikerabbit
Status:deferred
Tags:
Comment:
* Support new script loader for slippymap, openlayers doesn't work with it
Modified paths:
  • /trunk/extensions/SlippyMap/SlippyMap.hook.php (modified) (history)
  • /trunk/extensions/SlippyMap/SlippyMap.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SlippyMap/SlippyMap.hook.php
@@ -38,8 +38,12 @@
3939 $wgHooks['MakeGlobalVariablesScript'][] = array( &$this, 'jsVariables' );
4040
4141 // Add JavaScript files to <head>
 42+ if ( method_exists( $wgOut, 'addScriptClass' ) ) {
 43+ $wgOut->addScriptClass( 'SlippyMap' );
 44+ } else {
 45+ $wgOut->addScriptFile( $wgScriptPath . '/extensions/SlippyMap/js/' . $wgSlippyMapJs . '?' . $wgStyleVersion );
 46+ }
4247 $wgOut->addScriptFile( $wgScriptPath . '/extensions/SlippyMap/OpenLayers/public/OpenLayers.js?' . $wgStyleVersion );
43 - $wgOut->addScriptFile( $wgScriptPath . '/extensions/SlippyMap/js/' . $wgSlippyMapJs . '?' . $wgStyleVersion );
4448
4549 // Add our CSS to <head>
4650 $wgOut->addExtensionStyle( $wgScriptPath . '/extensions/SlippyMap/SlippyMap.css?' . $wgStyleVersion );
Index: trunk/extensions/SlippyMap/SlippyMap.php
@@ -70,6 +70,8 @@
7171 */
7272 //$wgSlippyMapJs = 'SlippyMap.js';
7373 $wgSlippyMapJs = 'SlippyMapCassini.js';
 74+$wgJSAutoloadClasses['OpenLayers'] = "extensions/SlippyMap/OpenLayers/public/OpenLayers.js"; // Does not work yet
 75+$wgJSAutoloadClasses['SlippyMap'] = "extensions/SlippyMap/js/$wgSlippyMapJs";
7476
7577 /**
7678 * $wgSlippyMapModes

Status & tagging log