From 5331eebb3e1fce0fa812461bd26a795ab2a888ec Mon Sep 17 00:00:00 2001 From: yflory Date: Thu, 23 May 2019 16:09:04 +0200 Subject: [PATCH] Enable notifications everywhere --- www/common/onlyoffice/inner.js | 3 ++- www/common/toolbar3.js | 3 ++- www/drive/inner.js | 2 +- www/poll/inner.js | 3 ++- www/profile/inner.js | 2 +- www/settings/inner.js | 2 +- www/todo/inner.js | 2 +- 7 files changed, 10 insertions(+), 7 deletions(-) diff --git a/www/common/onlyoffice/inner.js b/www/common/onlyoffice/inner.js index a473d5fca..31436321d 100644 --- a/www/common/onlyoffice/inner.js +++ b/www/common/onlyoffice/inner.js @@ -857,7 +857,8 @@ define([ 'newpad', 'share', 'limit', - 'unpinnedWarning' + 'unpinnedWarning', + 'notifications' ], title: Title.getTitleConfig(), metadataMgr: metadataMgr, diff --git a/www/common/toolbar3.js b/www/common/toolbar3.js index ec9ffa7d2..86b94ca16 100644 --- a/www/common/toolbar3.js +++ b/www/common/toolbar3.js @@ -167,6 +167,7 @@ MessengerUI, Messages) { }; var showColors = false; var updateUserList = function (toolbar, config) { + if (!config.displayed || config.displayed.indexOf('userlist') === -1) { return; } // Make sure the elements are displayed var $userButtons = toolbar.userlist; var $userlistContent = toolbar.userlistContent; @@ -974,11 +975,11 @@ MessengerUI, Messages) { $n.hide(); return void $button.addClass('fa-bell-o'); } - $button.attr('title', Messages.notifications_title); if (n > 99) { n = '99+'; $n.addClass('cp-notifications-small'); } + $button.attr('title', Messages.notifications_title); $empty.hide(); $n.text(n).show(); $button.addClass('fa-bell'); diff --git a/www/drive/inner.js b/www/drive/inner.js index f517443bb..43b351690 100644 --- a/www/drive/inner.js +++ b/www/drive/inner.js @@ -3641,7 +3641,7 @@ define([ var pageTitle = (!APP.loggedIn && APP.newSharedFolder) ? SHARED_FOLDER_NAME : Messages.type.drive; var configTb = { - displayed: ['useradmin', 'pageTitle', 'newpad', 'limit'], + displayed: ['useradmin', 'pageTitle', 'newpad', 'limit', 'notifications'], pageTitle: pageTitle, metadataMgr: metadataMgr, readOnly: privateData.readOnly, diff --git a/www/poll/inner.js b/www/poll/inner.js index 19d3daf9c..146bc05a5 100644 --- a/www/poll/inner.js +++ b/www/poll/inner.js @@ -1137,7 +1137,8 @@ define([ 'newpad', 'share', 'limit', - 'unpinnedWarning' + 'unpinnedWarning', + 'notifications' ], title: Title.getTitleConfig(), metadataMgr: metadataMgr, diff --git a/www/profile/inner.js b/www/profile/inner.js index 75f1a0753..3dcd91f1d 100644 --- a/www/profile/inner.js +++ b/www/profile/inner.js @@ -458,7 +458,7 @@ define([ }; var createToolbar = function () { - var displayed = ['useradmin', 'newpad', 'limit', 'pageTitle']; + var displayed = ['useradmin', 'newpad', 'limit', 'pageTitle', 'notifications']; var configTb = { displayed: displayed, sfCommon: common, diff --git a/www/settings/inner.js b/www/settings/inner.js index 85934c765..d785391d0 100644 --- a/www/settings/inner.js +++ b/www/settings/inner.js @@ -1578,7 +1578,7 @@ define([ privateData = metadataMgr.getPrivateData(); // Toolbar - var displayed = ['useradmin', 'newpad', 'limit', 'pageTitle']; + var displayed = ['useradmin', 'newpad', 'limit', 'pageTitle', 'notifications']; var configTb = { displayed: displayed, sfCommon: common, diff --git a/www/todo/inner.js b/www/todo/inner.js index eb749c35a..75bcb4fb1 100644 --- a/www/todo/inner.js +++ b/www/todo/inner.js @@ -232,7 +232,7 @@ define([ var $bar = $('.cp-toolbar-container'); - var displayed = ['useradmin', 'newpad', 'limit', 'pageTitle']; + var displayed = ['useradmin', 'newpad', 'limit', 'pageTitle', 'notifications']; var configTb = { displayed: displayed, sfCommon: common,