From 55dd3747f7c8eb5a3acc9c9f6b7c1d40f89ab324 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Thu, 18 Jun 2015 13:29:47 +0200 Subject: [PATCH] notifications: remove on click This allows one to get rid of them faster in case access to the underlying content is needed --- public/css/icinga/footer-elements.less | 4 ++++ public/js/icinga/events.js | 3 +++ 2 files changed, 7 insertions(+) diff --git a/public/css/icinga/footer-elements.less b/public/css/icinga/footer-elements.less index d9c49f100..f3b248b69 100644 --- a/public/css/icinga/footer-elements.less +++ b/public/css/icinga/footer-elements.less @@ -26,6 +26,10 @@ div#footer { background-position: 1em center; } +#notifications > li:hover { + cursor: pointer; +} + #notifications > li.info { background-color: @colorFormNotificationInfo; } diff --git a/public/js/icinga/events.js b/public/js/icinga/events.js index 84354c960..5e49fbda9 100644 --- a/public/js/icinga/events.js +++ b/public/js/icinga/events.js @@ -105,6 +105,9 @@ // We catch scroll events in our containers $('.container').on('scroll', { self: this }, this.icinga.events.onContainerScroll); + // Remove notifications on click + $(document).on('click', '#notifications li', function () { $(this).remove(); }); + // We want to catch each link click $(document).on('click', 'a', { self: this }, this.linkClicked); $(document).on('click', 'tr[href]', { self: this }, this.linkClicked);