http://www.mediawiki.org/wiki/Special:Code/MediaWiki/96145

Revision: 96145
Author:   jeroendedauw
Date:     2011-09-02 19:39:43 +0000 (Fri, 02 Sep 2011)
Log Message:
-----------
added small feature suggested on mailing list

Modified Paths:
--------------
    trunk/extensions/SemanticMaps/RELEASE-NOTES
    trunk/extensions/SemanticMaps/SemanticMaps.i18n.php
    trunk/extensions/SemanticMaps/includes/forminputs/SM_FormInput.php
    trunk/extensions/SemanticMaps/includes/forminputs/jquery.mapforminput.js

Modified: trunk/extensions/SemanticMaps/RELEASE-NOTES
===================================================================
--- trunk/extensions/SemanticMaps/RELEASE-NOTES 2011-09-02 19:35:31 UTC (rev 
96144)
+++ trunk/extensions/SemanticMaps/RELEASE-NOTES 2011-09-02 19:39:43 UTC (rev 
96145)
@@ -7,6 +7,11 @@
 
http://www.mediawiki.org/wiki/Extension:Semantic_Maps/Version_history#Semantic_Maps_change_log
 
 
+=== Semantic Maps 1.0.3 ===
+(2011-09-xx)
+
+* Added geocodecontrol parameter for the form inputs.
+
 === Semantic Maps 1.0.2 ===
 (2011-08-24)
 

Modified: trunk/extensions/SemanticMaps/SemanticMaps.i18n.php
===================================================================
--- trunk/extensions/SemanticMaps/SemanticMaps.i18n.php 2011-09-02 19:35:31 UTC 
(rev 96144)
+++ trunk/extensions/SemanticMaps/SemanticMaps.i18n.php 2011-09-02 19:39:43 UTC 
(rev 96145)
@@ -37,7 +37,9 @@
        'semanticmaps-par-forceshow'            => 'Show the map even when 
there are no locations to display?',
        'semanticmaps-par-showtitle'            => 'Show a title in the marker 
info window or not. Disabling this is often usefull when using a template to 
format the info window content.',
        'semanticmaps-par-centre'               => 'The centre of the map. When 
not provided, the map will automatically pick the optimal centre to display all 
markers on the map.',
-       'semanticmaps-par-template'             => 'A template to use to format 
the info window contents.'
+       'semanticmaps-par-template'             => 'A template to use to format 
the info window contents.',
+       
+       'semanticmaps-par-geocodecontrol'               => 'Show the geocoding 
control.',
 );
 
 /** Message documentation (Message documentation)

Modified: trunk/extensions/SemanticMaps/includes/forminputs/SM_FormInput.php
===================================================================
--- trunk/extensions/SemanticMaps/includes/forminputs/SM_FormInput.php  
2011-09-02 19:35:31 UTC (rev 96144)
+++ trunk/extensions/SemanticMaps/includes/forminputs/SM_FormInput.php  
2011-09-02 19:39:43 UTC (rev 96145)
@@ -78,6 +78,10 @@
                $manipulation->toJSONObj = true;
                $params['locations']->addManipulations( $manipulation );        
        
                
+               $params['geocodecontrol'] = new Parameter( 'geocodecontrol', 
Parameter::TYPE_BOOLEAN );
+               $params['geocodecontrol']->setDefault( true, false );
+               $params['geocodecontrol']->setMessage( 
'semanticmaps-par-geocodecontrol' );
+               
                return $params;
        }
        

Modified: 
trunk/extensions/SemanticMaps/includes/forminputs/jquery.mapforminput.js
===================================================================
--- trunk/extensions/SemanticMaps/includes/forminputs/jquery.mapforminput.js    
2011-09-02 19:35:31 UTC (rev 96144)
+++ trunk/extensions/SemanticMaps/includes/forminputs/jquery.mapforminput.js    
2011-09-02 19:39:43 UTC (rev 96145)
@@ -125,7 +125,7 @@
                this.html( $( '<p />' ).append( this.input ).append( 
updateButton ) );
        }
        
-       if ( this.geocodeAddress ) {
+       if ( options.geocodecontrol && this.geocodeAddress ) {
                this.append( $( '<p />' ).append( this.geofield ).append( 
geoButton ) );                        
        }
 


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to