r92260 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r92259‎ | r92260 | r92261 >
Date:18:02, 15 July 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
small tweak
Modified paths:
  • /trunk/extensions/SemanticMaps/includes/forminputs/jquery.mapforminput.js (modified) (history)
  • /trunk/extensions/SemanticMaps/includes/services/GoogleMaps3/jquery.gmapsmultiinput.js (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMaps/includes/services/GoogleMaps3/jquery.gmapsmultiinput.js
@@ -9,7 +9,7 @@
1010 * @author Jeroen De Dauw <jeroendedauw at gmail dot com>
1111 */
1212
13 -(function( $ ){ $.fn.gmapsmultiinput = function( mapDivId, options ) {
 13+(function( $, mw ){ $.fn.gmapsmultiinput = function( mapDivId, options ) {
1414 var MAPFILES_URL = "http://maps.gstatic.com/intl/en_us/mapfiles/";
1515
1616 var clickIcon = new google.maps.MarkerImage(
@@ -55,7 +55,7 @@
5656 }
5757
5858 table.append(
59 - '<thead><tr class="ui-widget-header "><th colspan="2">' + mediaWiki.msg( 'semanticmaps-forminput-locations' ) + '</th></tr></thead><tbody>'
 59+ '<thead><tr class="ui-widget-header "><th colspan="2">' + mw.msg( 'semanticmaps-forminput-locations' ) + '</th></tr></thead><tbody>'
6060 );
6161
6262 var rowNr = options.locations.length;
@@ -68,7 +68,7 @@
6969 '<tr id="' + mapDivId + '_addrow"><td width="300px">' +
7070 '<input type="text" class="text ui-widget-content ui-corner-all" width="95%" id="' + mapDivId + '_addfield" />' +
7171 '</td><td>' +
72 - '<button id="' + mapDivId + '_addbutton" mapid="' + mapDivId + '">' + mediaWiki.msg( 'semanticmaps-forminput-add' ) + '</button>' +
 72+ '<button id="' + mapDivId + '_addbutton" mapid="' + mapDivId + '">' + mw.msg( 'semanticmaps-forminput-add' ) + '</button>' +
7373 '</td></tr></tbody>'
7474 );
7575
@@ -290,7 +290,7 @@
291291 coord.dms( lat, lon ) +
292292 '</td><td>' +
293293 '<button class="forminput-remove" rowid="' + i + '" id="' + mapDivId + '_addbutton_' + i + '">' +
294 - mediaWiki.msg( 'semanticmaps-forminput-remove' ) +
 294+ mw.msg( 'semanticmaps-forminput-remove' ) +
295295 '</button>' +
296296 '</td></tr>'
297297 );
@@ -314,4 +314,4 @@
315315
316316 return this;
317317
318 -}; })( jQuery );
\ No newline at end of file
 318+}; })( jQuery, mediaWiki );
\ No newline at end of file
Index: trunk/extensions/SemanticMaps/includes/forminputs/jquery.mapforminput.js
@@ -19,7 +19,7 @@
2020 * @licence GNU GPL v3
2121 * @author Jeroen De Dauw <jeroendedauw at gmail dot com>
2222 */
23 -(function( $ ){ $.fn.mapforminput = function( mapDivId, options ) {
 23+(function( $, mw ){ $.fn.mapforminput = function( mapDivId, options ) {
2424
2525 var self = this;
2626
@@ -54,7 +54,7 @@
5555 'size': options.fieldsize
5656 } );
5757
58 - var updateButton = $( '<button />' ).text( mediaWiki.msg( 'semanticmaps-updatemap' ) );
 58+ var updateButton = $( '<button />' ).text( mw.msg( 'semanticmaps-updatemap' ) );
5959
6060 updateButton.click( function() {
6161 var locations = coord.split( self.input.attr( 'value' ) );
@@ -77,13 +77,13 @@
7878 this.geofield = $( '<input />' ).attr( {
7979 'type': 'text',
8080 'id': mapDivId + '_geofield',
81 - 'value': mediaWiki.msg( 'semanticmaps_enteraddresshere' ),
 81+ 'value': mw.msg( 'semanticmaps_enteraddresshere' ),
8282 'style': 'color: darkgray',
8383 'size': options.fieldsize
8484 } );
8585
8686 this.geofield.focus( function() {
87 - if ( this.value == mediaWiki.msg( 'semanticmaps_enteraddresshere' ) ) {
 87+ if ( this.value == mw.msg( 'semanticmaps_enteraddresshere' ) ) {
8888 this.value = '';
8989 $( this ).css( 'color', '' );
9090 }
@@ -91,12 +91,12 @@
9292
9393 this.geofield.blur( function() {
9494 if ( this.value == '' ) {
95 - this.value = mediaWiki.msg( 'semanticmaps_enteraddresshere' );
 95+ this.value = mw.msg( 'semanticmaps_enteraddresshere' );
9696 $( this ).css( 'color', 'darkgray' );
9797 }
9898 } );
9999
100 - var geoButton = $( '<button />' ).text( mediaWiki.msg( 'semanticmaps_lookupcoordinates' ) );
 100+ var geoButton = $( '<button />' ).text( mw.msg( 'semanticmaps_lookupcoordinates' ) );
101101
102102 geoButton.click( function() {
103103 self.geocodeAddress( self.geofield.attr( 'value' ) );
@@ -133,4 +133,4 @@
134134
135135 return this;
136136
137 -}; })( jQuery );
\ No newline at end of file
 137+}; })( jQuery, mediaWiki );
\ No newline at end of file