Changeset 6788


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
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • sandbox/2.4.2-expresso1/expressoMail1_2/js/main.js

    r6777 r6788  
    77var results_search_messages = "";  
    88var cabecalho = '<h4>ExpressoLivre - ExpressoMail</h4>';  
    9 // Variavel para controle de atualização das mensagens listadas na modal de alerta de filtro por remetente 
    10 var checkAlarmsFilter = false; 
    119 
    1210var auxNotificationCriteriaVetor = []; 
     
    8280                 
    8381                        if(preferences.show_name_print_messages == "1") {  
    84                                                         var getUserName = document.getElementById("user_info");  
     82                                var getUserName = document.getElementById("user_info");  
    8583                                var userName = getUserName.innerHTML;  
    8684                                var position = userName.indexOf("-");  
     
    575573                        for(var i=data.length - differenceOfNewCriteria; i < data.length; i++){ 
    576574         
    577                                 desktopNotification.sentNotification("",get_lang("Filter criteria"),data[i].from+" - "+data[i].subject); 
    578                                  
     575                                desktopNotification.sentNotification("",get_lang("Filter criteria"),  truncate(new Date(data[i].udate).toString('dd/MM HH:mm') + ' - ' + data[i].from+' - '+data[i].subject, 75)); 
    579576                                desktopNotification.showNotification(false, function(){ 
    580577                                        window.focus(); 
     
    590587        getFromAlertRules(); 
    591588        var handler_refresh = function(data){ 
    592                 handlerMessageFilter = function (data) {                         
    593                         notificationFilter(data, notifyPermission); 
    594                         if(checkAlarmsFilter){ 
    595                                 alarmFollowupflagged('filtersAlarms', data); 
    596                         } 
    597                         checkAlarmsFilter = true; 
    598                          
     589                handlerMessageFilter = function (data) {                                 
     590                    notificationFilter(data, notifyPermission); 
     591                    alarmFollowupflagged('filtersAlarms', data);         
    599592                } 
    600593                /* Busca  nas pastas indexadas para ver se há novas mensagens com a flag $FilteredMessage */ 
  • sandbox/2.4.2-expresso1/expressoMail1_2/setup/phpgw_pt-br.lang

    r6777 r6788  
    132132Do you really want to empty your trash folder?  expressoMail1_2 pt-br   Você tem certeza que deseja limpar sua lixeira? 
    133133Do you wanna receive an alert for new messages? expressoMail1_2 pt-br   Você quer receber um alerta para mensagens novas? 
    134  
    135134Wish you receive notifications for: "New messages", "Filter criteria", "Event alerts"?  expressoMail1_2 pt-br   Exibir notificações de: "Nova mensagem", "Criterio atendido", "Alerta de evento"? 
    136  
    137  
    138  
    139135Do you want to automatically display the message header?        expressoMail1_2 pt-br   Você deseja exibir automaticamente o cabecalho da mensagem? 
    140136Do you want to block this e-mail?       expressoMail1_2 pt-br   Você gostaria de bloquear este e-mail? 
  • sandbox/2.4.2-expresso1/prototype/modules/calendar/interceptors/DBMapping.php

    r6533 r6788  
    6666        if (isset($params['type'])) 
    6767            $params['type'] = self::codeAlarmType($params['type']); 
     68        else{ 
     69            $alarm = Controller::read( array('concept' => 'alarm' , 'id' => $params['id'] )); 
     70 
     71            $params['unit'] = $alarm['unit']; 
     72        } 
     73        $params['offset'] = $params['time'] * 1000; 
     74 
     75 
     76        switch( strtolower($params['unit']) ) 
     77        { 
     78            case 'd': $params['offset'] *= 24; 
     79            case 'h': $params['offset'] *= 60; 
     80            case 'm': $params['offset'] *= 60; 
     81        } 
     82         
    6883    } 
    6984 
  • 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.