Fix errors happening in mobile framework

This commit is contained in:
Hadi Nategh 2020-08-03 15:21:11 +02:00
parent 9a7dc47f7f
commit 7b6b72ea6b
2 changed files with 4 additions and 1 deletions

View File

@ -108,6 +108,9 @@ egw.extend('notification', egw.MODULE_WND_LOCAL, function(_app, _wnd)
* @returns {Boolean} true if notification is supported and permitted otherwise false * @returns {Boolean} true if notification is supported and permitted otherwise false
*/ */
checkNotification: function () { checkNotification: function () {
// Check if the notification is supported by browser
if (typeof Notification == 'undefined') return false;
// Ask for permission if there's nothing decided yet // Ask for permission if there's nothing decided yet
if (Notification && Notification.requestPermission && permission == 'default') { if (Notification && Notification.requestPermission && permission == 'default') {
Notification.requestPermission (function(_permission){ Notification.requestPermission (function(_permission){

View File

@ -855,7 +855,7 @@
{ {
for (var app in apps) for (var app in apps)
{ {
framework.notifyAppTab(app, apps[app]); if (framework.notifyAppTab) framework.notifyAppTab(app, apps[app]);
} }
$topmenu_info_notifications.addClass('egwpopup_notify'); $topmenu_info_notifications.addClass('egwpopup_notify');