← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3508: minor fixes

 

------------------------------------------------------------
revno: 3508
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2011-05-03 14:32:37 +0200
message:
  minor fixes
modified:
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.ajax.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/struts.xml
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/indicatorExpressionBuilderForm.vm


--
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.ajax.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.ajax.js	2011-01-25 19:27:15 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.ajax.js	2011-05-03 12:32:37 +0000
@@ -184,36 +184,41 @@
 	{
 		var target = jQuery( jQuerySelectionString );
 		target.children().remove();	
-		
+
 		this.params = params;
 		this.jQuerySelectionString = jQuerySelectionString;
-		
-		jQuery.getJSON(	'../dhis-web-commons-ajax-json/getOperands.action'
-			, this.params
-			, function( json ){
+
+		jQuery.getJSON(	'../dhis-web-commons-ajax-json/getOperands.action',
+			this.params, function( json ) {
 				jQuery.each( json.operands, function(i, item){					
 					target.append('<option value="[' + item.operandId + ']">' + item.operandName + '</option>');
 				});
-			if( params.usePaging ){
-				var numberOfPages = json.paging.numberOfPages;
-				var currentPage = json.paging.currentPage;
-				var baseLink = json.paging.baseLink;
-				var pageSize = json.paging.pageSize;
-				var startPage = json.paging.startPage;
-				
-				var html = '<div id="operandPaging_div">';
-				if( numberOfPages > 1 ){
-					html += 'Page: <select onchange="dataDictionary.reloadOperands( this.value )">';
-					for(var i=1;i<=numberOfPages;i++){
-						html += '<option value="' + i + '"' + ( currentPage==i?'selected=true':'' ) + '>' + i + '</option>';
+
+				if( params.usePaging ) {
+					var numberOfPages = json.paging.numberOfPages;
+					var currentPage = json.paging.currentPage;
+					var baseLink = json.paging.baseLink;
+					var pageSize = json.paging.pageSize;
+					var startPage = json.paging.startPage;
+
+					var html = '<div id="operandPaging_div">';
+
+					if( numberOfPages > 1 ){
+						html += 'Page: <select onchange="dataDictionary.reloadOperands( this.value )">';
+
+						for(var i=1;i<=numberOfPages;i++){
+							html += '<option value="' + i + '"' + ( currentPage==i?'selected=true':'' ) + '>' + i + '</option>';
+						}
+
+						html += '</select>';
 					}
-					html += '</select>';
+
+					html += 'Size: <input type="text" style="width:50px" onchange="dataDictionary.changeOperandsPageSize( this.value )" value="' + pageSize + '"/></div>';
+					jQuery( '#operandPaging_div' ).remove();
+					jQuery( html ).insertAfter( target );
 				}
-				html += 'Size: <input type="text" style="width:50px" onchange="dataDictionary.changeOperandsPageSize( this.value )" value="' + pageSize + '"/></div>';
-				jQuery( '#operandPaging_div' ).remove();
-				jQuery( html ).insertAfter( target );
 			}
-		});		
+		);
 	}	
 }
 

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/struts.xml	2011-04-08 05:34:52 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/struts.xml	2011-05-03 12:32:37 +0000
@@ -327,8 +327,7 @@
 
 		<action name="showUpdateIndicatorForm"
 			class="org.hisp.dhis.dd.action.indicator.GetIndicatorAction">
-			<result name="success" type="chain">getIndicatorTypeList
-			</result>
+			<result name="success" type="chain">getIndicatorTypeList</result>
 			<param name="requiredAuthorities">F_INDICATOR_UPDATE</param>
 		</action>
 

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/indicatorExpressionBuilderForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/indicatorExpressionBuilderForm.vm	2011-03-20 17:57:30 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/indicatorExpressionBuilderForm.vm	2011-05-03 12:32:37 +0000
@@ -64,7 +64,7 @@
 		
 		var key = getFieldValue( "indicator-expression-container input[id=filter]");
 
-		dataDictionary.loadOperands( "#indicator-expression-container select[id=dataElementId]", {aggregationOperator: aggregationOperator, usePaging: true, key: key, includeTotals: true} );	
+		dataDictionary.loadOperands( "#indicator-expression-container select[id=dataElementId]", {aggregationOperator: aggregationOperator, usePaging: true, key: key, includeTotals: true} );
 
 		checkAggregationOperator();
 	}