mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 14:41:29 +01:00
Wrap attempt at lang in try/catch for if egw.lang() isn't available
This commit is contained in:
parent
2c636586c6
commit
2d906d7a3e
@ -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('<button id="desktop_perms">' + (egw?egw.lang('Desktop notifications') : 'Desktop notifications') + '</button>')
|
||||
var label = 'Desktop notifications';
|
||||
try {
|
||||
if(egw) label = egw.lang(label);
|
||||
} catch(err) {}
|
||||
var desktop_button = jQuery('<button id="desktop_perms">' + label + '</button>')
|
||||
.click(function() {
|
||||
window.webkitNotifications.requestPermission();
|
||||
jQuery(this).hide();
|
||||
|
Loading…
Reference in New Issue
Block a user