=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/anonymousRegistration.js' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/anonymousRegistration.js 2013-04-24 13:07:12 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/anonymousRegistration.js 2013-04-24 13:19:01 +0000 @@ -65,6 +65,7 @@ if ( arr.length > 0 ) { var template = $( '#offline-event-template' ); + var matched = false; $.each( arr, function ( idx, item ) { var event = item.executionDate; @@ -74,10 +75,15 @@ var tmpl = _.template( template.html() ); var html = tmpl( event ); target.append( html ); + matched = true; } } ); - $( "#offlineListDiv table" ).removeClass( 'hidden' ); + if ( matched ) { + $( "#offlineListDiv table" ).removeClass( 'hidden' ); + } else { + $( "#offlineListDiv table" ).addClass( 'hidden' ); + } } else { $( "#offlineListDiv table" ).addClass( 'hidden' ); }