Index: trunk/extensions/SemanticMaps/includes/services/YahooMaps/SM_YahooMaps.php |
— | — | @@ -20,6 +20,25 @@ |
21 | 21 | die( 'Not an entry point.' ); |
22 | 22 | } |
23 | 23 | |
| 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 | + |
24 | 43 | $wgHooks['MappingServiceLoad'][] = 'smfInitYahooMaps'; |
25 | 44 | |
26 | 45 | function smfInitYahooMaps() { |
Index: trunk/extensions/SemanticMaps/includes/services/YahooMaps/SM_YahooMapsFormInput.php |
— | — | @@ -1,57 +1,25 @@ |
2 | 2 | <?php |
3 | 3 | |
4 | 4 | /** |
5 | | - * File holding the SMYahooMapsFormInput class. |
| 5 | + * Yahoo! Maps form input class. |
6 | 6 | * |
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 > |
11 | 12 | */ |
12 | | - |
13 | | -/** |
14 | | - * Class for Yahoo Maps! form inputs. |
15 | | - * |
16 | | - * @ingroup SMYahooMaps |
17 | | - * |
18 | | - * @author Jeroen De Dauw |
19 | | - */ |
20 | 13 | class SMYahooMapsFormInput extends SMFormInput { |
21 | | - |
| 14 | + |
22 | 15 | /** |
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 |
34 | 21 | */ |
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' ) ); |
41 | 24 | } |
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 | | - ); |
55 | 25 | |
56 | | - } |
57 | | - |
58 | 26 | } |
\ No newline at end of file |
Index: trunk/extensions/SemanticMaps/includes/services/OpenLayers/SM_OpenLayers.php |
— | — | @@ -21,13 +21,13 @@ |
22 | 22 | } |
23 | 23 | |
24 | 24 | $wgResourceModules['ext.sm.fi.openlayers'] = array( |
25 | | - 'dependencies' => array( 'ext.maps.openlayers', 'jquery.ui.button', 'jquery.ui.dialog' ), |
| 25 | + 'dependencies' => array( 'ext.maps.openlayers' ), |
26 | 26 | 'localBasePath' => dirname( __FILE__ ), |
27 | | - 'remoteBasePath' => $smgScriptPath . '/includes/services/OpenLayers', |
| 27 | + 'remoteBasePath' => $smgScriptPath . '/includes/services/YahooMaps', |
28 | 28 | 'group' => 'ext.semanticmaps', |
29 | 29 | 'scripts' => array( |
30 | | - 'jquery.openlayersinput.js', |
31 | | - 'ext.sm.openlayersinput.js' |
| 30 | + 'jquery.yahoomapsinput.js', |
| 31 | + 'ext.sm.yahoomapsinput.js' |
32 | 32 | ), |
33 | 33 | 'messages' => array( |
34 | 34 | 'semanticmaps_enteraddresshere', |