← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 10684: minor ui fix

 

------------------------------------------------------------
revno: 10684
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2013-04-24 20:19:01 +0700
message:
  minor ui fix
modified:
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/anonymousRegistration.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/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' );
         }