r86995 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r86994‎ | r86995 | r86996 >
Date:23:05, 26 April 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
work on Yahoo! Maps form input
Modified paths:
  • /trunk/extensions/SemanticMaps/includes/services/OpenLayers/SM_OpenLayers.php (modified) (history)
  • /trunk/extensions/SemanticMaps/includes/services/YahooMaps/SM_YahooMaps.php (modified) (history)
  • /trunk/extensions/SemanticMaps/includes/services/YahooMaps/SM_YahooMapsFormInput.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMaps/includes/services/YahooMaps/SM_YahooMaps.php
@@ -20,6 +20,25 @@
2121 die( 'Not an entry point.' );
2222 }
2323
 24+$wgResourceModules['ext.sm.fi.yahoomaps'] = array(
 25+ 'dependencies' => array( 'ext.maps.yahoomaps' ),
 26+ 'localBasePath' => dirname( __FILE__ ),
 27+ 'remoteBasePath' => $smgScriptPath . '/includes/services/OpenLayers',
 28+ 'group' => 'ext.semanticmaps',
 29+ 'scripts' => array(
 30+ 'jquery.openlayersinput.js',
 31+ 'ext.sm.openlayersinput.js'
 32+ ),
 33+ 'messages' => array(
 34+ 'semanticmaps_enteraddresshere',
 35+ 'semanticmaps-updatemap',
 36+ 'semanticmaps_lookupcoordinates',
 37+ 'semanticmaps-forminput-remove',
 38+ 'semanticmaps-forminput-add',
 39+ 'semanticmaps-forminput-locations'
 40+ )
 41+);
 42+
2443 $wgHooks['MappingServiceLoad'][] = 'smfInitYahooMaps';
2544
2645 function smfInitYahooMaps() {
Index: trunk/extensions/SemanticMaps/includes/services/YahooMaps/SM_YahooMapsFormInput.php
@@ -1,57 +1,25 @@
22 <?php
33
44 /**
5 - * File holding the SMYahooMapsFormInput class.
 5+ * Yahoo! Maps form input class.
66 *
7 - * @file SM_YahooMapsFormInput.php
8 - * @ingroup SMYahooMaps
9 - *
10 - * @author Jeroen De Dauw
 7+ * @file SM_GoogleMaps3FormInput.php
 8+ * @ingroup SemanticMaps
 9+ *
 10+ * @licence GNU GPL v3
 11+ * @author Jeroen De Dauw < jeroendedauw@gmail.com >
1112 */
12 -
13 -/**
14 - * Class for Yahoo Maps! form inputs.
15 - *
16 - * @ingroup SMYahooMaps
17 - *
18 - * @author Jeroen De Dauw
19 - */
2013 class SMYahooMapsFormInput extends SMFormInput {
21 -
 14+
2215 /**
23 - * @see SMFormInput::getShowAddressFunction
24 - *
25 - * @since 0.6.5
26 - */
27 - protected function getShowAddressFunction() {
28 - global $egYahooMapsKey;
29 - return $egYahooMapsKey == '' ? false : 'showYAddress';
30 - }
31 -
32 - /**
33 - * @see MapsMapFeature::addFormDependencies()
 16+ * @see SMFormInput::getResourceModules
 17+ *
 18+ * @since 0.8
 19+ *
 20+ * @return array of string
3421 */
35 - protected function addFormDependencies() {
36 - global $wgOut;
37 - global $smgScriptPath, $smgStyleVersion;
38 -
39 - $this->service->addDependency( Html::linkedScript( "$smgScriptPath/includes/services/YahooMaps/SM_YahooMapsForms.js?$smgStyleVersion" ) );
40 - $this->service->addDependencies( $wgOut );
 22+ protected function getResourceModules() {
 23+ return array_merge( parent::getResourceModules(), array( 'ext.sm.fi.yahoomaps' ) );
4124 }
42 -
43 - /**
44 - * @see MapsMapFeature::addSpecificMapHTML
45 - */
46 - public function addSpecificMapHTML() {
47 - return Html::element(
48 - 'div',
49 - array(
50 - 'id' => $this->service->getMapId( false ),
51 - 'style' => "width: $this->width; height: $this->height; background-color: #cccccc; overflow: hidden;",
52 - ),
53 - wfMsg( 'maps-loading-map' )
54 - );
5525
56 - }
57 -
5826 }
\ No newline at end of file
Index: trunk/extensions/SemanticMaps/includes/services/OpenLayers/SM_OpenLayers.php
@@ -21,13 +21,13 @@
2222 }
2323
2424 $wgResourceModules['ext.sm.fi.openlayers'] = array(
25 - 'dependencies' => array( 'ext.maps.openlayers', 'jquery.ui.button', 'jquery.ui.dialog' ),
 25+ 'dependencies' => array( 'ext.maps.openlayers' ),
2626 'localBasePath' => dirname( __FILE__ ),
27 - 'remoteBasePath' => $smgScriptPath . '/includes/services/OpenLayers',
 27+ 'remoteBasePath' => $smgScriptPath . '/includes/services/YahooMaps',
2828 'group' => 'ext.semanticmaps',
2929 'scripts' => array(
30 - 'jquery.openlayersinput.js',
31 - 'ext.sm.openlayersinput.js'
 30+ 'jquery.yahoomapsinput.js',
 31+ 'ext.sm.yahoomapsinput.js'
3232 ),
3333 'messages' => array(
3434 'semanticmaps_enteraddresshere',

Follow-up revisions

RevisionCommit summaryAuthorDate
r86997follow up to r86995jeroendedauw23:15, 26 April 2011

Status & tagging log