mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-24 00:43:20 +01:00
Wrap attempt at lang in try/catch for if egw.lang() isn't available
This commit is contained in:
parent
22034c81e4
commit
a3d417b318
@ -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