Ignore:
Timestamp:
07/16/12 14:34:56 (12 years ago)
Author:
acoutinho
Message:

Ticket #2951 - Correcoes de bugs e melhorias e finalizacao de codificacao

Location:
sandbox/2.4.2-expresso1/prototype/modules/calendar/js
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sandbox/2.4.2-expresso1/prototype/modules/calendar/js/calendar.alarms.js

    r6782 r6788  
    2727                */ 
    2828                    desktopNotification.showNotification(false, function(){ 
     29                            console.log('nice'); 
    2930                                window.focus(); 
    3031                                this.cancel(); 
  • sandbox/2.4.2-expresso1/prototype/modules/calendar/js/desktop.notification.js

    r6774 r6788  
    99                        this.installDektopNotificationAddon(); 
    1010 
    11                         if(window.webkitNotifications && window.webkitNotifications.checkPermission()) 
    12                         window.webkitNotifications.requestPermission(); 
     11                        if(window.webkitNotifications && window.webkitNotifications.checkPermission()){ 
     12                             if($.browser.safari){ 
     13                     $.Zebra_Dialog('Deseja instalar o plugin de notificação desktop?', { 
     14                        'custom_class': 'request-notification-permission', 
     15                        'type':     'question', 
     16                        'overlay_opacity': '0.5', 
     17                        'buttons':  ['Não', 'Sim'] 
     18                    }); 
    1319 
     20                    $('div.ZebraDialog.request-notification-permission a').click(function() { 
     21                        if($(this).html() == 'Sim') 
     22                            window.webkitNotifications.requestPermission();        
     23                    }); 
     24                }else 
     25                    window.webkitNotifications.requestPermission(); 
     26            } 
    1427                } 
    1528    }, 
     
    1730    installDektopNotificationAddon: function(){ 
    1831 
    19         var params = { 
    20             "Foo": {  
    21                         URL: '../prototype/plugins/desktop.notification/html_desktop_notifications-1.0.7-fx.xpi' , 
    22                         IconURL:'../prototype/plugins/desktop.notification/desktop-notification.png', 
    23                         //Hash:'sha1:28857e60d043447c5f4550853f2d40770b326a13', 
    24                         toString: function () { 
    25                                 return this.URL; 
    26                         } 
    27             } 
    28         }; 
     32        var params = { 
     33            "Foo": {  
     34                        URL: '../prototype/plugins/desktop.notification/html_desktop_notifications-1.0.7-fx.xpi' , 
     35                        IconURL:'../prototype/plugins/desktop.notification/desktop-notification.png', 
     36                        //Hash:'sha1:28857e60d043447c5f4550853f2d40770b326a13', 
     37                        toString: function () { 
     38                                return this.URL; 
     39                        } 
     40            } 
     41        }; 
    2942 
    30         InstallTrigger.install(params); 
     43           InstallTrigger.install(params); 
    3144 
    32         return false; 
     45           return false; 
    3346    }, 
    3447 
     
    7386        .focus(function() {  
    7487            activePage = true;   
    75             if(!desktopNotification.verifyComplement()){ 
     88            if(desktopNotification.verifyComplement()){ 
    7689                        setTimeout(function(){               
    7790                                 
Note: See TracChangeset for help on using the changeset viewer.