← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 9753: Add loading symbol when to click Run Validation button in case entry form.

 

------------------------------------------------------------
revno: 9753
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2013-02-06 21:08:33 +0700
message:
  Add loading symbol when to click Run Validation button in case entry form.
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/webapp/dhis-web-caseentry/dataEntryForm.vm
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/entry.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	2013-01-30 07:54:43 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties	2013-02-06 14:08:33 +0000
@@ -546,4 +546,5 @@
 total = Total
 confirm_delete_date_range_list=Are you sure you want to delete date range list?
 invalid_position = Please select at most two row positions or two filter positions.
-select_a_dataelement_for_sum_avg_operator = Please select a data element for sum/avg operator
\ No newline at end of file
+select_a_dataelement_for_sum_avg_operator = Please select a data element for sum/avg operator
+runing_validation_rules = Validation rules are being processed, please wait ...
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataEntryForm.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataEntryForm.vm	2013-01-23 04:48:39 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataEntryForm.vm	2013-02-06 14:08:33 +0000
@@ -70,6 +70,11 @@
 
 </div>
 
+<div id="loading-bar" class="hidden" align='center'>
+	<p>Validation rules are being processed, please wait ...<br>
+	<img src='../images/ajax-loader-circle.gif'></p>
+</div>
+
 <div id='validateProgramDiv'></div>
 
 <script>

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/entry.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/entry.js	2013-01-24 04:15:05 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/entry.js	2013-02-06 14:08:33 +0000
@@ -426,8 +426,16 @@
 	
 	if(getFieldValue('validCompleteOnly')=="true")
 	{
+		$('#loading-bar').show();
+		$('#loading-bar').dialog({
+			modal:true,
+			width: 330
+		});
+		$("#loading-bar").siblings(".ui-dialog-titlebar").hide(); 
+		
 		jQuery.get( 'validateProgram.action'
 			, function(html){ 
+				$( "#loading-bar" ).dialog( "close" );
 				$('#validateProgramDiv').html(html);
 				if(getFieldValue('violateValidation')=='true'){
 					$('#validateProgramDiv' ).dialog({
@@ -637,7 +645,17 @@
 
 function runValidation()
 {
-	$('#validateProgramDiv' ).load( 'validateProgram.action' ).dialog({
+	$('#loading-bar').show();
+	$('#loading-bar').dialog({
+		modal:true,
+		width: 330
+	});
+	$("#loading-bar").siblings(".ui-dialog-titlebar").hide(); 
+	
+	$('#validateProgramDiv' ).load( 'validateProgram.action',
+		function(){
+			$( "#loading-bar" ).dialog( "close" );
+		}).dialog({
 			title: i18n_violate_validation,
 			maximize: true, 
 			closable: true,