r49314 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r49313‎ | r49314 | r49315 >
Date:13:38, 8 April 2009
Author:avar
Status:deferred
Tags:
Comment:
Un-break the slippymap getwiki/reset buttons
Modified paths:
  • /trunk/extensions/SlippyMap/SlippyMap.class.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SlippyMap/SlippyMap.class.php
@@ -265,8 +265,8 @@
266266
267267 <!-- This inline stylesheet defines how the two extra buttons look, and where they are positioned. -->
268268 <style> .buttonsPanel div { float:left; display:block; position:relative; left:50px; margin-left:3px; margin-top:7px; width:36px; height:19px; }</style>
269 -<style> .buttonsPanel .getWikiCodeButtonItemInactive { width:36px; height:19px; background-image:url('" . $wgScriptPath . "/extensions/SlippyMap/wikicode-button.png'); }</style>
270 -<style> .buttonsPanel .resetButtonItemInactive { width:36px; height:19px; background-image:url('" . $wgScriptPath . "/extensions/SlippyMap/reset-button.png'); }</style>
 269+<style> .buttonsPanel .getWikiCodeButtonItemInactive { width:36px; height:19px; background-image:url('$wgScriptPath/extensions/SlippyMap/wikicode-button.png'); }</style>
 270+<style> .buttonsPanel .resetButtonItemInactive { width:36px; height:19px; background-image:url('$wgScriptPath/extensions/SlippyMap/reset-button.png'); }</style>
271271
272272 <!-- bring in the OpenLayers javascript library -->
273273 <script src="http://openlayers.org/api/OpenLayers.js"></script>
@@ -286,11 +286,11 @@
287287
288288 addOnloadHook( slippymap_init );
289289
290 - function slippymap_resetPosition() {
 290+ function slippymap_resetPosition${unique}() {
291291 map${unique}.setCenter(lonLat${unique}, zoom${unique});
292292 }
293293
294 - function slippymap_getWikicode() {
 294+ function slippymap_getWikicode${unique}() {
295295 LL = map${unique}.getCenter().transform(map${unique}.getProjectionObject(), new OpenLayers.Projection("EPSG:4326"));
296296 Z = map${unique}.getZoom();
297297 size = map${unique}.getSize();
@@ -323,20 +323,20 @@
324324
325325 map${unique}.setCenter(lonLat${unique}, zoom${unique});
326326
327 - var getWikiCodeButton = new OpenLayers.Control.Button({
 327+ var getWikiCodeButton${unique} = new OpenLayers.Control.Button({
328328 title: "${slippymap_button_code}",
329329 displayClass: "getWikiCodeButton",
330 - trigger: slippymap_getWikicode
 330+ trigger: slippymap_getWikicode${unique}
331331 });
332332
333 - var resetButton = new OpenLayers.Control.Button({
 333+ var resetButton${unique} = new OpenLayers.Control.Button({
334334 title: "${slippymap_resetview}",
335335 displayClass: "resetButton",
336 - trigger: slippymap_resetPosition
 336+ trigger: slippymap_resetPosition${unique}
337337 });
338338
339339 var panel${unique} = new OpenLayers.Control.Panel( { displayClass: "buttonsPanel" } );
340 - panel${unique}.addControls([getWikiCodeButton, resetButton]);
 340+ panel${unique}.addControls([getWikiCodeButton${unique}, resetButton${unique}]);
341341 map${unique}.addControl(panel${unique});
342342 }
343343 </script>

Status & tagging log