Index: trunk/extensions/SlippyMap/SlippyMap.hook.php |
— | — | @@ -38,8 +38,12 @@ |
39 | 39 | $wgHooks['MakeGlobalVariablesScript'][] = array( &$this, 'jsVariables' ); |
40 | 40 | |
41 | 41 | // 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 | + } |
42 | 47 | $wgOut->addScriptFile( $wgScriptPath . '/extensions/SlippyMap/OpenLayers/public/OpenLayers.js?' . $wgStyleVersion ); |
43 | | - $wgOut->addScriptFile( $wgScriptPath . '/extensions/SlippyMap/js/' . $wgSlippyMapJs . '?' . $wgStyleVersion ); |
44 | 48 | |
45 | 49 | // Add our CSS to <head> |
46 | 50 | $wgOut->addExtensionStyle( $wgScriptPath . '/extensions/SlippyMap/SlippyMap.css?' . $wgStyleVersion ); |
Index: trunk/extensions/SlippyMap/SlippyMap.php |
— | — | @@ -70,6 +70,8 @@ |
71 | 71 | */ |
72 | 72 | //$wgSlippyMapJs = 'SlippyMap.js'; |
73 | 73 | $wgSlippyMapJs = 'SlippyMapCassini.js'; |
| 74 | +$wgJSAutoloadClasses['OpenLayers'] = "extensions/SlippyMap/OpenLayers/public/OpenLayers.js"; // Does not work yet |
| 75 | +$wgJSAutoloadClasses['SlippyMap'] = "extensions/SlippyMap/js/$wgSlippyMapJs"; |
74 | 76 | |
75 | 77 | /** |
76 | 78 | * $wgSlippyMapModes |