From a3d417b318a909fcbd84476c04e90aa3e9b8b7dc Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Wed, 30 Nov 2011 19:50:25 +0000 Subject: [PATCH] Wrap attempt at lang in try/catch for if egw.lang() isn't available --- notifications/js/notificationajaxpopup.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/notifications/js/notificationajaxpopup.js b/notifications/js/notificationajaxpopup.js index 0300f9ac6d..d78b0a3ce4 100644 --- a/notifications/js/notificationajaxpopup.js +++ b/notifications/js/notificationajaxpopup.js @@ -60,7 +60,11 @@ function egwpopup_display() { if(window.webkitNotifications && window.webkitNotifications.checkPermission() != EGW_BROWSER_NOTIFY_ALLOWED && jQuery('#desktop_perms').length == 0) { - var desktop_button = jQuery('') + var label = 'Desktop notifications'; + try { + if(egw) label = egw.lang(label); + } catch(err) {} + var desktop_button = jQuery('') .click(function() { window.webkitNotifications.requestPermission(); jQuery(this).hide();