← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 13517: in smsReminder, only allow show event list when a program is selected

 

------------------------------------------------------------
revno: 13517
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2013-12-31 12:58:04 +0100
message:
  in smsReminder, only allow show event list when a program is selected
modified:
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programTrackingSelect.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-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js	2013-12-20 22:53:53 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js	2013-12-31 11:58:04 +0000
@@ -392,6 +392,7 @@
 	var programIdAddPatient = getFieldValue('programIdAddPatient');
     if( registration == undefined || !registration ) {
 		if( programIdAddPatient!='' ) {
+            enable('statusEvent');
 			enable('listPatientBtn');
 			enable('addPatientBtn');
 			enable('advancedSearchBtn');
@@ -400,6 +401,7 @@
 				enable(this.id);
 			});
 		} else {
+            disable('statusEvent');
 			disable('listPatientBtn');
 			disable('addPatientBtn');
 			disable('advancedSearchBtn');

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programTrackingSelect.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programTrackingSelect.vm	2013-12-18 08:01:59 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programTrackingSelect.vm	2013-12-31 11:58:04 +0000
@@ -1,34 +1,37 @@
 <script>
-	jQuery(document).ready(	function(){
-		showById('programStageAddPatientTR');
-		showById('sendSmsToListBtn');
-		jQuery("#programIdAddPatient option").each(function(){
-			var item = jQuery(this);
-			if( item.attr('type')!=1 && item.val()!='' ){
-				item.remove();
-			}
-		});
-		
-		jQuery("#searchObjectId [value=prg]").remove();
-		jQuery("#searchObjectId [value=prg]").remove();
-		jQuery("#searchObjectId").prepend('<option value="-100">' + i18n_please_select_criteria + '</option>');
-		jQuery("#searchObjectId [value=]").attr("selected","selected");
-		hideById('addPatientBtn');
-		hideById('searchBySelectedUnitTD');
-		disable('advancedSearchBtn');
-		setFieldValue('searchByProgramStage', 'true');
-		setFieldValue('hideLink', 'true');
-		isDashboard = true;
-		showById('dueDateTR');
-		showById('followupTR');
-		setFieldValue('listPatientBtn','$encoder.jsEscape( $i18n.getString( "show_activity_list" ) , "'")');
-		
-		showById('advancedSearchBtn');
-		jQuery('#listPatientBtnTD').attr('rowspan',2);
-		jQuery('#listPatientBtnTD').attr('valign','bottom');
-		
-		mainPage = 0;
-	});	
+    jQuery(document).ready(function() {
+        showById('programStageAddPatientTR');
+        showById('sendSmsToListBtn');
+        jQuery("#programIdAddPatient option").each(function() {
+            var item = jQuery(this);
+            if( item.attr('type') != 1 && item.val() != '' ) {
+                item.remove();
+            }
+        });
+
+        jQuery("#searchObjectId [value=prg]").remove();
+        jQuery("#searchObjectId [value=prg]").remove();
+        jQuery("#searchObjectId").prepend('<option value="-100">' + i18n_please_select_criteria + '</option>');
+        jQuery("#searchObjectId [value=]").attr("selected", "selected");
+
+        disable('statusEvent');
+        disable('listPatientBtn');
+        hideById('addPatientBtn');
+        hideById('searchBySelectedUnitTD');
+        disable('advancedSearchBtn');
+        setFieldValue('searchByProgramStage', 'true');
+        setFieldValue('hideLink', 'true');
+        isDashboard = true;
+        showById('dueDateTR');
+        showById('followupTR');
+        setFieldValue('listPatientBtn', '$encoder.jsEscape( $i18n.getString( "show_activity_list" ) , "'")');
+
+        showById('advancedSearchBtn');
+        jQuery('#listPatientBtnTD').attr('rowspan', 2);
+        jQuery('#listPatientBtnTD').attr('valign', 'bottom');
+
+        mainPage = 0;
+    });
 </script>
 
 <h3 id='mainLinkLbl'>$i18n.getString( "program_tracking" ) #openHelp('program_tracking')</h3>