r58222 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r58221‎ | r58222 | r58223 >
Date:21:16, 27 October 2009
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Modified paths:
  • /trunk/extensions/SemanticMaps/GoogleMaps/SM_GoogleMapsFormInput.php (modified) (history)
  • /trunk/extensions/SemanticMaps/GoogleMaps/SM_GoogleMapsQP.php (modified) (history)
  • /trunk/extensions/SemanticMaps/OpenLayers/SM_OpenLayersFormInput.php (modified) (history)
  • /trunk/extensions/SemanticMaps/OpenLayers/SM_OpenLayersQP.php (modified) (history)
  • /trunk/extensions/SemanticMaps/SemanticMaps.php (modified) (history)
  • /trunk/extensions/SemanticMaps/YahooMaps/SM_YahooMapsFormInput.php (modified) (history)
  • /trunk/extensions/SemanticMaps/YahooMaps/SM_YahooMapsQP.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMaps/YahooMaps/SM_YahooMapsQP.php
@@ -53,9 +53,6 @@
5454 $this->type = MapsYahooMapsUtils::getYMapType($this->type, true);
5555 $this->controls = MapsYahooMapsUtils::createControlsString($this->controls);
5656
57 - MapsUtils::makePxValue($this->width);
58 - MapsUtils::makePxValue($this->height);
59 -
6057 $this->autozoom = MapsYahooMapsUtils::getAutozoomJSValue($this->autozoom);
6158
6259 $markerItems = array();
@@ -77,10 +74,10 @@
7875 $typesString = MapsYahooMapsUtils::createTypesString($this->types);
7976
8077 $this->output .= "
81 - <div id='$this->mapName' style='width: $this->width; height: $this->height;'></div>
 78+ <div id='$this->mapName' style='width: {$this->width}px; height: {$this->height}px;'></div>
8279
8380 <script type='$wgJsMimeType'>/*<![CDATA[*/
84 - addLoadEvent(
 81+ addOnloadHook(
8582 initializeYahooMap('$this->mapName', $this->centre_lat, $this->centre_lon, $this->zoom, $this->type, [$typesString], [$this->controls], $this->autozoom, [$markersString])
8683 );
8784 /*]]>*/</script>";
Index: trunk/extensions/SemanticMaps/YahooMaps/SM_YahooMapsFormInput.php
@@ -77,18 +77,15 @@
7878
7979 $controlItems = MapsYahooMapsUtils::createControlsString($this->controls);
8080
81 - MapsUtils::makePxValue($this->width);
82 - MapsUtils::makePxValue($this->height);
83 -
8481 $this->types = explode(",", $this->types);
8582
8683 $typesString = MapsYahooMapsUtils::createTypesString($this->types);
8784
8885 $this->output .="
89 - <div id='".$this->mapName."' style='width: $this->width; height: $this->height;'></div>
 86+ <div id='".$this->mapName."' style='width: {$this->width}px; height: {$this->height}px;'></div>
9087
9188 <script type='$wgJsMimeType'>/*<![CDATA[*/
92 - addLoadEvent(makeFormInputYahooMap('$this->mapName', '$this->coordsFieldName', $this->centre_lat, $this->centre_lon, $this->zoom, $type, [$typesString], [$controlItems], $this->autozoom, $this->marker_lat, $this->centre_lon));
 89+ addOnloadHook(makeFormInputYahooMap('$this->mapName', '$this->coordsFieldName', $this->centre_lat, $this->centre_lon, $this->zoom, $type, [$typesString], [$controlItems], $this->autozoom, $this->marker_lat, $this->centre_lon));
9390 /*]]>*/</script>";
9491 }
9592
Index: trunk/extensions/SemanticMaps/OpenLayers/SM_OpenLayersQP.php
@@ -54,9 +54,6 @@
5555
5656 MapsMapper::enforceArrayValues($this->layers);
5757 $layerItems = MapsOpenLayersUtils::createLayersStringAndLoadDependencies($this->output, $this->layers);
58 -
59 - MapsUtils::makePxValue($this->width);
60 - MapsUtils::makePxValue($this->height);
6158
6259 $markerItems = array();
6360
@@ -72,9 +69,9 @@
7370
7471 $markersString = implode(',', $markerItems);
7572
76 - $this->output .= "<div id='$this->mapName' style='width: $this->width; height: $this->height; background-color: #cccccc;'></div>
 73+ $this->output .= "<div id='$this->mapName' style='width: {$this->width}px; height: {$this->height}px; background-color: #cccccc;'></div>
7774 <script type='$wgJsMimeType'> /*<![CDATA[*/
78 - addLoadEvent(
 75+ addOnloadHook(
7976 initOpenLayer('$this->mapName', $this->centre_lon, $this->centre_lat, $this->zoom, [$layerItems], [$controlItems], [$markersString])
8077 );
8178 /*]]>*/ </script>";
Index: trunk/extensions/SemanticMaps/OpenLayers/SM_OpenLayersFormInput.php
@@ -75,14 +75,11 @@
7676
7777 $layerItems = MapsOpenLayersUtils::createLayersStringAndLoadDependencies($this->output, $this->layers);
7878
79 - $width = $this->width . 'px';
80 - $height = $this->height . 'px';
81 -
8279 $this->output .="
83 - <div id='".$this->mapName."' style='width: $width; height: $height; background-color: #cccccc;'></div>
 80+ <div id='".$this->mapName."' style='width: {$this->width}px; height: {$this->height}px; background-color: #cccccc;'></div>
8481
8582 <script type='$wgJsMimeType'>/*<![CDATA[*/
86 - addLoadEvent(makeFormInputOpenLayer('".$this->mapName."', '".$this->coordsFieldName."', ".$this->centre_lat.", ".$this->centre_lon.", ".$this->zoom.", ".$this->marker_lat.", ".$this->marker_lon.", [$layerItems], [$controlItems]));
 83+ addOnloadHook(makeFormInputOpenLayer('".$this->mapName."', '".$this->coordsFieldName."', ".$this->centre_lat.", ".$this->centre_lon.", ".$this->zoom.", ".$this->marker_lat.", ".$this->marker_lon.", [$layerItems], [$controlItems]));
8784 /*]]>*/</script>";
8885 }
8986
Index: trunk/extensions/SemanticMaps/SemanticMaps.php
@@ -23,7 +23,7 @@
2424 die( 'Not an entry point.' );
2525 }
2626
27 -define('SM_VERSION', '0.4 a8');
 27+define('SM_VERSION', '0.4 a9');
2828
2929 $smgScriptPath = $wgScriptPath . '/extensions/SemanticMaps';
3030 $smgIP = $IP . '/extensions/SemanticMaps';
Index: trunk/extensions/SemanticMaps/GoogleMaps/SM_GoogleMapsQP.php
@@ -86,7 +86,7 @@
8787 $this->output .= <<<END
8888 <div id="$this->mapName" class="$this->class" style="$this->style" ></div>
8989 <script type="$wgJsMimeType"> /*<![CDATA[*/
90 -addLoadEvent(
 90+addOnloadHook(
9191 initializeGoogleMap('$this->mapName', $this->width, $this->height, $this->centre_lat, $this->centre_lon, $this->zoom, $this->type, [$typesString], [$this->controls], $this->autozoom, [$markersString])
9292 );
9393 /*]]>*/ </script>
Index: trunk/extensions/SemanticMaps/GoogleMaps/SM_GoogleMapsFormInput.php
@@ -89,7 +89,7 @@
9090 <div id='".$this->mapName."' class='".$this->class."'></div>
9191
9292 <script type='$wgJsMimeType'>/*<![CDATA[*/
93 - addLoadEvent(makeFormInputGoogleMap('$this->mapName', '$this->coordsFieldName', $this->width, $this->height, $this->centre_lat, $this->centre_lon, $this->zoom, $this->type, [$typesString], [$this->controls], $this->autozoom, $this->marker_lat, $this->marker_lon));
 93+ addOnloadHook(makeFormInputGoogleMap('$this->mapName', '$this->coordsFieldName', $this->width, $this->height, $this->centre_lat, $this->centre_lon, $this->zoom, $this->type, [$typesString], [$this->controls], $this->autozoom, $this->marker_lat, $this->marker_lon));
9494 window.unload = GUnload;
9595 /*]]>*/</script>";
9696 }

Status & tagging log