← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2449: Fixed bug, removed one of two getParamString methods. Please remember that javascript does not al...

 

------------------------------------------------------------
revno: 2449
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2010-12-29 22:48:41 +0100
message:
  Fixed bug, removed one of two getParamString methods. Please remember that javascript does not allow overloading of methods, this caused a lot of things to stop working.
modified:
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js
  dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/javascript/export.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/minMaxValidation.js
  dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/javascript/dataAnalysis.js


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js	2010-12-23 03:27:29 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js	2010-12-29 21:48:41 +0000
@@ -651,24 +651,6 @@
 }
 
 /**
- * Returns a query string with all element values in the select list with
- * the specified identifier.
- */
-function getParamString( elementId )
-{
-    var list = document.getElementById( elementId );
-    
-    var params = "";
-    
-    for ( var i = 0; i < list.options.length; i++ )
-    {
-        params += elementId + "=" + list.options[i].value + "&";
-    }
-    
-    return params;
-}
-
-/**
  * Returns a query string with all element values in the select list and
  * the specified param.
  */

=== modified file 'dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/javascript/export.js'
--- dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/javascript/export.js	2010-07-30 12:59:39 +0000
+++ dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/javascript/export.js	2010-12-29 21:48:41 +0000
@@ -89,7 +89,7 @@
 
 function getDataMartExportParams()
 {
-    var params = getParamString( "selectedDataSets" );
+    var params = getParamString( "selectedDataSets", "selectedDataSets" );
     
     params += "startDate=" + document.getElementById( "startDate" ).value + "&";
     params += "endDate=" + document.getElementById( "endDate" ).value + "&";

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/minMaxValidation.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/minMaxValidation.js	2010-10-04 16:37:51 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/minMaxValidation.js	2010-12-29 21:48:41 +0000
@@ -2,7 +2,7 @@
 	var request = new Request();
 	request.setResponseTypeXML( 'xmlObject' );
 	request.setCallbackSuccess( minMaxValueCompleted );	
-	request.sendAsPost(getParamString('dataSetIds'));
+	request.sendAsPost(getParamString('dataSetIds', 'datatSetIds'));
 	request.send( 'generateMinMaxValue.action' );
 }
 
@@ -51,7 +51,7 @@
 	var request = new Request();
 	request.setResponseTypeXML( 'xmlObject' );
 	request.setCallbackSuccess( minMaxValueCompleted );	
-	request.sendAsPost(getParamString('dataSetIds'));
+	request.sendAsPost(getParamString('dataSetIds', 'dataSetIds'));
 	request.send( 'removeMinMaxValue.action' );
 	
 }
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/javascript/dataAnalysis.js'
--- dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/javascript/dataAnalysis.js	2010-09-17 06:52:36 +0000
+++ dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/javascript/dataAnalysis.js	2010-12-29 21:48:41 +0000
@@ -17,7 +17,7 @@
 			"&toDate=" + $( "#toDate" ).val() + 
 			"&fromDate=" + $( "#fromDate" ).val() +
 			"&organisationUnit=" + selectedOrganisationUnit +
-			"&" + getParamString( "dataSets" );
+			"&" + getParamString( "dataSets", "dataSets" );
 			
 		if ( byId( "standardDeviation" ) != null )
 		{