← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 10080: Minor fix for aggreation query builder form.

 

------------------------------------------------------------
revno: 10080
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2013-03-08 21:07:03 +0700
message:
  Minor fix for aggreation query builder form.
modified:
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/caseAggregationForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/caseaggregation.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patientAttribute.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/updatePatientAttributeForm.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-patient/src/main/webapp/dhis-web-maintenance-patient/caseAggregationForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/caseAggregationForm.vm	2013-02-07 13:44:38 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/caseAggregationForm.vm	2013-03-08 14:07:03 +0000
@@ -100,8 +100,8 @@
 			<input type='button' class="small-button" alt="$i18n.getString( 'left_parent' )" onclick='insertOperator( "(" );' value="(" />
 			<input type='button' class="small-button" alt="$i18n.getString( 'right_parent' )" onclick='insertOperator( ")" );' value=")" />
 			&nbsp;&nbsp;&nbsp;
-			<input type='button' class="nornal-button" alt="$i18n.getString( 'yes' )" onclick='insertOperator( "true" );' value="$i18n.getString( 'yes' )" />
-			<input type='button' class="nornal-button" alt="$i18n.getString( 'no' )" onclick='insertOperator( "false" );' value="$i18n.getString( 'no' )" />
+			<input type='button' class="nornal-button" alt="$i18n.getString( 'yes' )" onclick='insertBoolValue( "true" );' value="$i18n.getString( 'yes' )" />
+			<input type='button' class="nornal-button" alt="$i18n.getString( 'no' )" onclick='insertBoolValue( "false" );' value="$i18n.getString( 'no' )" />
 			<input type='button' class="nornal-button" alt="$i18n.getString( 'is_null' )" onclick='insertOperator( "is null" );' value="==NULL" />
 			<input type='button' class="nornal-button" alt="$i18n.getString( 'not_null' )" onclick='insertOperator( "is not null" );' value="!=NULL" />
 			&nbsp;&nbsp;&nbsp;

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/caseaggregation.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/caseaggregation.js	2013-02-07 13:44:38 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/caseaggregation.js	2013-03-08 14:07:03 +0000
@@ -249,6 +249,12 @@
 	getConditionDescription();
 }
 
+function insertBoolValue( value )
+{
+	insertTextCommon("aggregationCondition", " ='" + value + "' " );
+	getConditionDescription();
+}
+
 // -----------------------------------------------------------------------------
 // Remove Case Aggregation Condition
 // -----------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patientAttribute.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patientAttribute.js	2013-03-08 13:56:13 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patientAttribute.js	2013-03-08 14:07:03 +0000
@@ -121,20 +121,3 @@
 		return "<tr><td><input type='text' name='attrOptions' /><a href='#' style='text-decoration: none; margin-left:0.5em;' title='"+i18n_remove_option+"'  onClick='ATTRIBUTE_OPTION.remove(this,null)'>[ - ]</a></td></tr>";
 	}
 }
-
-function getConditionDescription()
-{
-	$.postUTF8( 'getCaseAggregationDescription.action', 
-		{ 
-			condition:getFieldValue('expression') 
-		},function(html)
-		{
-			setInnerHTML('expDescription', html);
-		});
-}
-
-function insertOperator( value )
-{
-	insertTextCommon('expression', ' ' + value + ' ' );
-	getConditionDescription();
-}

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/updatePatientAttributeForm.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/updatePatientAttributeForm.js	2012-12-21 09:23:20 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/updatePatientAttributeForm.js	2013-03-08 14:07:03 +0000
@@ -16,9 +16,6 @@
 	});
 	
 	ATTRIBUTE_OPTION.selectValueType(byId("valueType"));
-	if( getFieldValue('expression') != "" ){
-		getConditionDescription();
-	}
 	
 	checkValueIsExist( "name", "validatePatientAttribute.action", {id:getFieldValue('id')});
 });		
\ No newline at end of file