Node.js based forum software built for the modern web
fix: #4695, remove new notif alert
Barış Soner Uşaklıfd4c3cda42d1
diff --git a/public/language/en-GB/admin/settings/notifications.json b/public/language/en-GB/admin/settings/notifications.jsonindex 03fa0ac66a..da6c9680a3 100644--- a/public/language/en-GB/admin/settings/notifications.json+++ b/public/language/en-GB/admin/settings/notifications.json@@ -2,6 +2,5 @@"notifications": "Notifications","welcome-notification": "Welcome Notification","welcome-notification-link": "Welcome Notification Link",- "welcome-notification-uid": "Welcome Notification User (UID)",- "notification-alert-timeout": "Notification Alert Timeout"+ "welcome-notification-uid": "Welcome Notification User (UID)"}\ No newline at end of filediff --git a/public/src/modules/notifications.js b/public/src/modules/notifications.jsindex b6e9f04fed..cdf1d15e54 100644--- a/public/src/modules/notifications.js+++ b/public/src/modules/notifications.js@@ -55,32 +55,6 @@ define('notifications', ['sounds', 'translator', 'components', 'navigator', 'ben};Notifications.onNewNotification = function (notifData) {- // If a path is defined, show notif data, otherwise show generic data- var payload = {- alert_id: 'new_notif',- title: '[[notifications:new_notification]]',- timeout: parseInt(config.notificationAlertTimeout, 10) || 5000,- };-- if (notifData.path) {- payload.message = notifData.bodyShort;- payload.type = 'info';- payload.clickfn = function () {- markNotification(notifData.nid, true);- if (notifData.path.startsWith('http') || notifData.path.startsWith('https')) {- window.location.href = notifData.path;- } else {- window.location.href = window.location.protocol + '//' + window.location.host + config.relative_path + notifData.path;- }- };- } else {- payload.message = '[[notifications:you_have_unread_notifications]]';- payload.type = 'warning';- }-- app.alert(payload);- app.refreshTitle();-if (ajaxify.currentPage === 'notifications') {ajaxify.refresh();}diff --git a/src/controllers/api.js b/src/controllers/api.jsindex fcf0e5e81e..1e52e8113f 100644--- a/src/controllers/api.js+++ b/src/controllers/api.js@@ -61,7 +61,6 @@ apiController.loadConfig = async function (req) {searchEnabled: plugins.hasListeners('filter:search.query'),bootswatchSkin: meta.config.bootswatchSkin || '',enablePostHistory: meta.config.enablePostHistory === 1,- notificationAlertTimeout: meta.config.notificationAlertTimeout || 5000,timeagoCutoff: meta.config.timeagoCutoff !== '' ? Math.max(0, parseInt(meta.config.timeagoCutoff, 10)) : meta.config.timeagoCutoff,timeagoCodes: languages.timeagoCodes,cookies: {diff --git a/src/views/admin/settings/notifications.tpl b/src/views/admin/settings/notifications.tplindex 1f1af27037..3e68295699 100644--- a/src/views/admin/settings/notifications.tpl+++ b/src/views/admin/settings/notifications.tpl@@ -7,8 +7,6 @@<strong>[[admin/settings/notifications:welcome-notification]]</strong><br /> <textarea class="form-control" data-field="welcomeNotification"></textarea><br /><strong>[[admin/settings/notifications:welcome-notification-link]]</strong><br /> <input type="text" class="form-control" data-field="welcomeLink"><br /><strong>[[admin/settings/notifications:welcome-notification-uid]]</strong><br /> <input type="text" class="form-control" data-field="welcomeUid"><br />-- <strong>[[admin/settings/notifications:notification-alert-timeout]]</strong><br /> <input type="text" class="form-control" data-field="notificationAlertTimeout" placeholder="5000"><br /></form></div></div>