=== modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/interpretationFeed.vm' --- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/interpretationFeed.vm 2013-12-03 09:47:08 +0000 +++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/interpretationFeed.vm 2013-12-03 10:10:00 +0000 @@ -31,12 +31,15 @@ jQuery('.interpretationContainer').on('click', '.gearDropDown', function( e ) { var jqTarget = jQuery(e.target).closest('.gearDropDown'); - jQuery('.gearDropDown').removeClass('active'); + + if(dropDown.is(':visible')) { + dropDown.hide(); + return false; + } + jqTarget.addClass('active'); - dropDown.show(); - dropDown.css({ top: jqTarget.offset().top + jqTarget.innerHeight(), left: jqTarget.offset().left - 34 @@ -51,6 +54,13 @@ dropDown.hide(); } }); + + $(document).keyup(function( e ) { + if( e.keyCode == 27 ) { + jQuery('.gearDropDown').removeClass('active'); + dropDown.hide(); + } + }); });