From 2d906d7a3e24d07d2eb839cf801da5492c666122 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Wed, 30 Nov 2011 19:48:54 +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();