← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 14819: Fixed paging in Lost-to-follow-up.

 

------------------------------------------------------------
revno: 14819
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Sun 2014-04-13 22:27:06 +0800
message:
  Fixed paging in Lost-to-follow-up.
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/javascript/smsReminder.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	2014-04-13 14:11:24 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js	2014-04-13 14:27:06 +0000
@@ -337,7 +337,7 @@
 	var program = getFieldValue('program');
 	if (registration == undefined || !registration) {
 		if (program != '') {
-			enable('statusEvent');
+			enable('status');
 			enable('listEntityInstanceBtn');
 			enable('addEntityInstanceBtn');
 			enable('advancedSearchBtn');
@@ -346,7 +346,7 @@
 				enable(this.id);
 			});
 		} else {
-			disable('statusEvent');
+			disable('status');
 			disable('listEntityInstanceBtn');
 			disable('addEntityInstanceBtn');
 			disable('advancedSearchBtn');

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/smsReminder.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/smsReminder.js	2014-04-11 00:54:51 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/smsReminder.js	2014-04-13 14:27:06 +0000
@@ -33,7 +33,7 @@
 			for ( i in json.programs ) {
 				if(json.programs[i].type==1){
 					count++;
-					jQuery( '#program').append( '<option value="' + json.programs[i].id +'" type="' + json.programs[i].type + '">' + json.programs[i].name + '</option>' );
+					jQuery( '#program').append( '<option value="' + json.programs[i].uid +'" type="' + json.programs[i].type + '">' + json.programs[i].name + '</option>' );
 				}
 			}
 			if(count==0){
@@ -86,9 +86,7 @@
 	
 }
 
-
 function displayEventList(json, page) {
-
 	var table = "";
 	
 	// Header
@@ -113,6 +111,7 @@
 		
 		table += "<thead><tr><th>#</th>";
 		table += "<th>" + i18n_event_date + "</th>";
+
 		for(var i in json.events[0].dataValues ){
 			table += "<th>" + json.events[0].dataValues[i].dataElement + "</th>";
 		}
@@ -162,6 +161,11 @@
 // Paging
 
 function paging(json, page) {
+	var searchMethod = "listAllTrackedEntityInstance";
+	if( isAdvancedSearch ){
+		searchMethod = "validateAdvancedSearch";
+	}
+	
 	var table = "<table width='100%' style='background-color: #ebf0f6;'><tr><td colspan='"
 			+ json.width + "'>";
 	table += "<div class='paging'>";
@@ -173,7 +177,7 @@
 					+ i + "</span>";
 		} else {
 			table += "<a class='page' title='" + i18n_page + " " + i
-					+ "' href='javascript:listAllTrackedEntityInstance( " + i
+					+ "' href='javascript:" + searchMethod + "( " + i
 					+ ");'>" + i + "</a>";
 		}
 		table += "<span class='seperator'>|</span>";

=== 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	2014-04-12 02:37:13 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programTrackingSelect.vm	2014-04-13 14:27:06 +0000
@@ -174,6 +174,7 @@
 	var i18n_page = '$encoder.jsEscape( $i18n.getString( "page" ) , "'")';
 	var i18n_next = '$encoder.jsEscape( $i18n.getString( "next" ) , "'")';
 	var i18n_last = '$encoder.jsEscape( $i18n.getString( "last" ) , "'")';
+	var i18n_no_result_found = '$encoder.jsEscape( $i18n.getString( "no_result_found" ) , "'")';
 	
 	var checkedDuplicate = false;
 	var registration = false;