From 7d2f1baf618dc26894d2ac6cd1f01b8655f4187b Mon Sep 17 00:00:00 2001 From: Fergal Moran Date: Thu, 31 Dec 2015 23:09:19 +0000 Subject: [PATCH] Fixed notifications selector --- .../notifications/notifications.directive.js | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/client/app/directives/notifications/notifications.directive.js b/client/app/directives/notifications/notifications.directive.js index 8d6efa5..c1be564 100644 --- a/client/app/directives/notifications/notifications.directive.js +++ b/client/app/directives/notifications/notifications.directive.js @@ -25,20 +25,8 @@ angular.module('dssWebApp') return x.accepted_date === null; }).length; }); - - $('#notifications').data('open', false); - $('#notifications-button').click(function() { - if($('#notifications').data('open')) { - $('#notifications').data('open', false); - markNotifications(scope); - } else - $('#notifications').data('open', true); - }); - $(document).click(function() { - if($('#notifications').data('open')) { - $('#notifications').data('open', false); - markNotifications(scope); - } + $('#navbar-notification-dropdown').on('hide.bs.dropdown', function(){ + markNotifications(scope); }); } }