← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 4847: Use jquery modal dialog for Case aggregation result.

 

------------------------------------------------------------
revno: 4847
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2011-10-06 12:25:34 +0700
message:
  Use  jquery modal dialog  for Case aggregation result.
modified:
  dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties
  dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/struts.xml
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/caseAggregationResult.vm
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/caseagg.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-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties	2011-10-06 05:05:42 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties	2011-10-06 05:25:34 +0000
@@ -435,4 +435,6 @@
 register_event													= Register event
 enroll_to_program												= Enroll to program
 add_dependent													= Add dependent
-edit_profile													= Edit profile
\ No newline at end of file
+edit_profile													= Edit profile
+aggregate_details												= Aggregate details
+show_details													= Show details
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/struts.xml	2011-10-04 06:28:34 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/struts.xml	2011-10-06 05:25:34 +0000
@@ -257,7 +257,7 @@
 
 		<action name="caseAggregationResultDetails"
 			class="org.hisp.dhis.caseentry.action.caseaggregation.CaseAggregationResultDetailsAction">
-			<result name="success" type="velocity">/popup.vm</result>
+			<result name="success" type="velocity">/content.vm</result>
 			<param name="page">/dhis-web-caseentry/caseAggregationResultDetails.vm</param>
 		</action>
 

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/caseAggregationResult.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/caseAggregationResult.vm	2011-03-24 17:27:39 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/caseAggregationResult.vm	2011-10-06 05:25:34 +0000
@@ -23,13 +23,15 @@
 	#set ( $keys = $mapDataValues.keySet() )
 	#set ($index = 1)
 	<tbody>
+		#set( $mark = false )
 		#foreach( $key in $keys)
-			<tr id="tr${key.dataElement.id}" style="cursor: pointer" onclick="viewResultDetails($key.source.id,$key.period.id,$mapCaseAggCondition.get($key).id)">
+			<tr #alternate( $mark ) style="cursor: pointer" title="$i18n.getString('show_details')" onclick="viewResultDetails($key.source.id,$key.period.id,$mapCaseAggCondition.get($key).id)">
 				<td>$index</td>
 				<td>$key.dataElement.getName()</td>
 				<td>$key.getValue()</td>
 				<td>$mapDataValues.get($key)</td>
 			</tr>
+			#set( $mark = !$mark  )
 			#set ($index = $index + 1)
 		#end
 	</tbody>
@@ -37,5 +39,10 @@
 #else
 	$i18n.getString('no_value_added_or_update')
 #end
-
 </div>
+
+<div id='contentDetails'></div>
+
+<script>
+	var i18n_aggregate_details = '$encoder.jsEscape( $i18n.getString( "aggregate_details" ) , "'")';
+</script>
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/caseagg.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/caseagg.js	2011-08-19 21:33:57 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/caseagg.js	2011-10-06 05:25:34 +0000
@@ -110,9 +110,8 @@
 		url+= '&periodId=' + periodId;
 		url+= '&aggregationConditionId=' + aggregationConditionId;
 		
-	$('#contentDetails').dialog('destroy').remove();
-    $('<div id="contentDetails">' ).load(url).dialog({
-        title: '',
+	$('#contentDetails' ).load(url).dialog({
+        title: i18n_aggregate_details,
 		maximize: true, 
 		closable: true,
 		modal:true,