Index: trunk/extensions/Maps/Maps.php |
— | — | @@ -263,7 +263,11 @@ |
264 | 264 | ) |
265 | 265 | ); |
266 | 266 | |
| 267 | +$wgResourceModules['ext.maps.resizable'] = array( |
| 268 | + 'dependencies' => 'jquery.ui.resizable' |
| 269 | +); |
267 | 270 | |
| 271 | + |
268 | 272 | /** |
269 | 273 | * Initialization function for the Maps extension. |
270 | 274 | * |
Index: trunk/extensions/Maps/RELEASE-NOTES |
— | — | @@ -16,6 +16,8 @@ |
17 | 17 | |
18 | 18 | * Fixed zoom parameter for Google Maps v3. |
19 | 19 | |
| 20 | +* Minor improvement to script loading. |
| 21 | + |
20 | 22 | === Maps 1.0 === |
21 | 23 | (2011-07-19) |
22 | 24 | |
Index: trunk/extensions/Maps/includes/services/GoogleMaps3/jquery.googlemap.js |
— | — | @@ -7,6 +7,8 @@ |
8 | 8 | |
9 | 9 | (function( $, mw ){ $.fn.googlemaps = function( options ) { |
10 | 10 | |
| 11 | + var _this = this; |
| 12 | + |
11 | 13 | /** |
12 | 14 | * All markers that are currently on the map. |
13 | 15 | * @type {Array} |
— | — | @@ -182,8 +184,10 @@ |
183 | 185 | } |
184 | 186 | |
185 | 187 | if ( options.resizable ) { |
186 | | - this.resizable() |
187 | | - } |
| 188 | + mw.loader.using( 'ext.maps.resizable', function() { |
| 189 | + _this.resizable(); |
| 190 | + } ); |
| 191 | + } |
188 | 192 | |
189 | 193 | return this; |
190 | 194 | |
Index: trunk/extensions/Maps/includes/services/GoogleMaps3/GoogleMaps3.php |
— | — | @@ -21,7 +21,7 @@ |
22 | 22 | } |
23 | 23 | |
24 | 24 | $wgResourceModules['ext.maps.googlemaps3'] = array( |
25 | | - 'dependencies' => array( 'ext.maps.common', 'jquery.ui.resizable' ), |
| 25 | + 'dependencies' => array( 'ext.maps.common' ), |
26 | 26 | 'localBasePath' => dirname( __FILE__ ), |
27 | 27 | 'remoteBasePath' => $egMapsScriptPath . '/includes/services/GoogleMaps3', |
28 | 28 | 'group' => 'ext.maps', |
Index: trunk/extensions/Maps/includes/services/YahooMaps/YahooMaps.php |
— | — | @@ -21,7 +21,7 @@ |
22 | 22 | } |
23 | 23 | |
24 | 24 | $wgResourceModules['ext.maps.yahoomaps'] = array( |
25 | | - 'dependencies' => array( 'ext.maps.common', 'jquery.ui.resizable' ), |
| 25 | + 'dependencies' => array( 'ext.maps.common' ), |
26 | 26 | 'localBasePath' => dirname( __FILE__ ), |
27 | 27 | 'remoteBasePath' => $egMapsScriptPath . '/includes/services/YahooMaps', |
28 | 28 | 'group' => 'ext.maps', |
Index: trunk/extensions/Maps/includes/services/YahooMaps/jquery.yahoomaps.js |
— | — | @@ -77,7 +77,9 @@ |
78 | 78 | if ( options.centre !== false ) map.drawZoomAndCenter( new YGeoPoint( options.centre.lat, options.centre.lon ) ); |
79 | 79 | |
80 | 80 | if ( options.resizable ) { |
81 | | - this.resizable() |
| 81 | + mw.loader.using( 'ext.maps.resizable', function() { |
| 82 | + _this.resizable(); |
| 83 | + } ); |
82 | 84 | } |
83 | 85 | |
84 | 86 | this.addMarker = function( location ) { |
Index: trunk/extensions/Maps/includes/services/OpenLayers/OpenLayers.php |
— | — | @@ -21,7 +21,7 @@ |
22 | 22 | } |
23 | 23 | |
24 | 24 | $wgResourceModules['ext.maps.openlayers'] = array( |
25 | | - 'dependencies' => array( 'ext.maps.common', 'jquery.ui.resizable' ), |
| 25 | + 'dependencies' => array( 'ext.maps.common' ), |
26 | 26 | 'localBasePath' => dirname( __FILE__ ), |
27 | 27 | 'remoteBasePath' => $egMapsScriptPath . '/includes/services/OpenLayers', |
28 | 28 | 'group' => 'ext.maps', |
Index: trunk/extensions/Maps/includes/services/OpenLayers/jquery.openlayers.js |
— | — | @@ -173,7 +173,9 @@ |
174 | 174 | } |
175 | 175 | |
176 | 176 | if ( options.resizable ) { |
177 | | - this.resizable() |
| 177 | + mw.loader.using( 'ext.maps.resizable', function() { |
| 178 | + _this.resizable(); |
| 179 | + } ); |
178 | 180 | } |
179 | 181 | |
180 | 182 | return this; |
Index: trunk/extensions/Maps/includes/services/GoogleMaps/GoogleMaps.php |
— | — | @@ -21,7 +21,7 @@ |
22 | 22 | } |
23 | 23 | |
24 | 24 | $wgResourceModules['ext.maps.googlemaps2'] = array( |
25 | | - 'dependencies' => array( 'ext.maps.common', 'jquery.ui.resizable' ), |
| 25 | + 'dependencies' => array( 'ext.maps.common' ), |
26 | 26 | 'localBasePath' => dirname( __FILE__ ), |
27 | 27 | 'remoteBasePath' => $egMapsScriptPath . '/includes/services/GoogleMaps', |
28 | 28 | 'group' => 'ext.maps', |
Index: trunk/extensions/Maps/includes/services/GoogleMaps/jquery.googlemap2.js |
— | — | @@ -120,7 +120,9 @@ |
121 | 121 | } |
122 | 122 | |
123 | 123 | if ( options.resizable ) { |
124 | | - this.resizable() |
| 124 | + mw.loader.using( 'ext.maps.resizable', function() { |
| 125 | + _this.resizable(); |
| 126 | + } ); |
125 | 127 | } |
126 | 128 | |
127 | 129 | function ensureTypeIsSelectable( type, types ) { |