← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 8091: added js to make sure that the zebra stripes are always correctly updated in data entry (when usi...

 

------------------------------------------------------------
revno: 8091
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Sat 2012-09-15 11:31:19 +0700
message:
  added js to make sure that the zebra stripes are always correctly updated in data entry (when using section filtering)
modified:
  dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.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-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js	2012-09-14 12:07:06 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js	2012-09-15 04:31:19 +0000
@@ -470,6 +470,14 @@
         $matched.parent().parent(). show();
         $not_matched.parent().parent(). hide();
     }
+
+    refreshZebraStripes($tbody);
+}
+
+function refreshZebraStripes($tbody)
+{
+    $tbody.find( 'tr:not([colspan]):visible:even' ).find('td:first-child').removeClass('reg alt').addClass('alt');
+    $tbody.find( 'tr:not([colspan]):visible:odd' ).find('td:first-child').removeClass('reg alt').addClass('reg');
 }
 
 function getDataElementType( dataElementId )