← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 9426: Add css for row after to filter in section ( patient )

 

------------------------------------------------------------
revno: 9426
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2013-01-03 16:45:39 +0700
message:
  Add css for row after to filter in section ( patient )
modified:
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.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/webapp/dhis-web-caseentry/javascript/commons.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js	2013-01-03 09:04:36 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js	2013-01-03 09:45:39 +0000
@@ -1653,6 +1653,9 @@
 				setInnerHTML('smsError', json.message);
 				var date = new Date();
 				var currentTime = date.getHours() + ":" + date.getMinutes();
+				jQuery('#commentEntryTB').prepend("<tr><td>" + getFieldValue('currentDate') + " " + currentTime + "</td>"
+					+ "<td>" + getFieldValue('currentUsername') + "</td>"
+					+ "<td>" + field.value + "</td></tr>");
 				jQuery('#commentTB').prepend("<tr><td>" + getFieldValue('currentDate') + " " + currentTime + "</td>"
 					+ "<td>" + getFieldValue('programStageName') + "</td>"
 					+ "<td>" + getFieldValue('currentUsername') + "</td>"
@@ -1742,10 +1745,10 @@
 	jQuery("#commentTB tr").removeClass("hidden");
 	jQuery("#commentTB tr").each( function(index, item){
 		if(isHide && index > 4){
-			jQuery(this).addClass("hidden");
+			jQuery(item).addClass("hidden");
 		}
 		else if(!isHide){		
-			jQuery(this).removeClass("hidden");
+			jQuery(item).removeClass("hidden");
 		}
 		index++;
 	});
@@ -1817,5 +1820,6 @@
 
 function refreshZebraStripes( $tbody )
 {
-    $tbody.find( 'tr:visible:odd' ).find( 'td:first-child' ).removeClass( 'reg' ).addClass( 'reg' );
+     $tbody.find( 'tr:visible:even' ).removeClass( 'listRow' ).removeClass( 'listAlternateRow' ).addClass( 'listRow' );
+     $tbody.find( 'tr:visible:odd' ).removeClass( 'listRow' ).removeClass( 'listAlternateRow' ).addClass( 'listAlternateRow' );
 }
\ No newline at end of file