Changeset 8181 for trunk


Ignore:
Timestamp:
07/04/13 13:14:02 (11 years ago)
Author:
angelo
Message:

Ticket #3464 - Nao salvamento da opcao Deseja instalar o plugin de notificacao desktop

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/prototype/modules/calendar/js/desktop.notification.js

    r7693 r8181  
    55    initDesktopNotificationAddon: function(){ 
    66                if(useDesktopNotification()){ 
    7  
     7                        if ($.cookie('no-notification') == 'true'){ 
     8                                return false; 
     9                        } 
    810                        if (!window.webkitNotifications && $.browser.mozilla) 
    911                        this.installDektopNotificationAddon(); 
    1012 
    1113                        if(window.webkitNotifications && window.webkitNotifications.checkPermission()){ 
    12                              if($.browser.safari){ 
     14                            if($.browser.safari){ 
    1315                     $.Zebra_Dialog('Deseja instalar o plugin de notificação desktop?', { 
    1416                        'custom_class': 'request-notification-permission', 
     
    1921 
    2022                    $('div.ZebraDialog.request-notification-permission a').click(function() { 
    21                         if($(this).html() == 'Sim') 
     23                        if($(this).html() == 'Sim'){ 
    2224                            window.webkitNotifications.requestPermission();        
     25                        }else if ($(this).html() == 'Não'){ 
     26                                $.cookie('no-notification','true'); 
     27                        } 
    2328                    }); 
    2429                }else 
    2530                    window.webkitNotifications.requestPermission(); 
    2631            } 
     32                }else{ 
     33                        $.cookie('no-notification',null); 
    2734                } 
    2835    }, 
     
    4047            } 
    4148        }; 
    42  
     49           ; 
    4350           InstallTrigger.install(params); 
    44  
    4551           return false; 
    4652    }, 
Note: See TracChangeset for help on using the changeset viewer.