Changeset 8181
- Timestamp:
- 07/04/13 13:14:02 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/prototype/modules/calendar/js/desktop.notification.js
r7693 r8181 5 5 initDesktopNotificationAddon: function(){ 6 6 if(useDesktopNotification()){ 7 7 if ($.cookie('no-notification') == 'true'){ 8 return false; 9 } 8 10 if (!window.webkitNotifications && $.browser.mozilla) 9 11 this.installDektopNotificationAddon(); 10 12 11 13 if(window.webkitNotifications && window.webkitNotifications.checkPermission()){ 12 14 if($.browser.safari){ 13 15 $.Zebra_Dialog('Deseja instalar o plugin de notificação desktop?', { 14 16 'custom_class': 'request-notification-permission', … … 19 21 20 22 $('div.ZebraDialog.request-notification-permission a').click(function() { 21 if($(this).html() == 'Sim') 23 if($(this).html() == 'Sim'){ 22 24 window.webkitNotifications.requestPermission(); 25 }else if ($(this).html() == 'Não'){ 26 $.cookie('no-notification','true'); 27 } 23 28 }); 24 29 }else 25 30 window.webkitNotifications.requestPermission(); 26 31 } 32 }else{ 33 $.cookie('no-notification',null); 27 34 } 28 35 }, … … 40 47 } 41 48 }; 42 49 ; 43 50 InstallTrigger.install(params); 44 45 51 return false; 46 52 },
Note: See TracChangeset
for help on using the changeset viewer.