From 999ba592a93610efc5112f30c824d29c2c2e7413 Mon Sep 17 00:00:00 2001 From: ClemDee Date: Mon, 1 Jul 2019 11:09:06 +0200 Subject: [PATCH] Add button in toolbar notifications to go to app --- customize.dist/src/less2/include/notifications.less | 12 ++++++++++++ www/common/toolbar3.js | 7 +++++++ 2 files changed, 19 insertions(+) diff --git a/customize.dist/src/less2/include/notifications.less b/customize.dist/src/less2/include/notifications.less index 475894b98..4b04ba6db 100644 --- a/customize.dist/src/less2/include/notifications.less +++ b/customize.dist/src/less2/include/notifications.less @@ -39,6 +39,18 @@ } } } + .cp-notifications-gotoapp { + background-color: #ccc; + p { + padding: 10px 0 !important; + text-align: center !important; + font-weight: bold; + cursor: pointer; + &:hover { + background-color: rgba(0,0,0,0.1); + } + } + } } diff --git a/www/common/toolbar3.js b/www/common/toolbar3.js index 589dec496..f95334b72 100644 --- a/www/common/toolbar3.js +++ b/www/common/toolbar3.js @@ -944,10 +944,17 @@ MessengerUI, Messages) { var createNotifications = function (toolbar, config) { var $notif = toolbar.$top.find('.'+NOTIFICATIONS_CLS).show(); + var openNotifsApp = h('div.cp-notifications-gotoapp', h('p', Messages.openNotificationsApp || "Open notifications App")); + $(openNotifsApp).click(function () { + Common.openURL("/notifications"); + }) var div = h('div.cp-notifications-container', [ h('div.cp-notifications-empty', Messages.notifications_empty) ]); var pads_options = [div]; + if (Common.isLoggedIn()) { + pads_options.unshift(openNotifsApp); + } var dropdownConfig = { text: '', // Button initial text options: pads_options, // Entries displayed in the menu