← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 9585: Disable Sum/Avg for data element with non-int value-type in Add/Update data element form

 

------------------------------------------------------------
revno: 9585
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2013-01-23 14:51:47 +0700
message:
  Disable Sum/Avg for data element with non-int value-type in Add/Update data element form
modified:
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/dataElement.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-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/dataElement.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/dataElement.js	2013-01-23 06:24:02 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/dataElement.js	2013-01-23 07:51:47 +0000
@@ -28,6 +28,7 @@
 
 function changeValueType( value )
 {
+	enable('aggregationOperatorSelect');
     if ( value == 'int' )
     {
 		showById( 'numberTypeTR' );
@@ -38,9 +39,11 @@
         disable( 'zeroIsSignificant' );
 		hideById( 'numberTypeTR' );
 		hideById( 'textTypeTR' );
-		if( value=='string'){
+		if( value=='string' ){
 			showById( 'textTypeTR' );
 		}
+		
+		disable('aggregationOperatorSelect');
     }
 
     updateAggreationOperation( value );