Ignore:
Timestamp:
05/06/10 09:12:42 (14 years ago)
Author:
amuller
Message:

Ticket #1064 - Implementando parcialmente o ticket

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/expressoMail1_2/js/jscode/main.js

    r2656 r2714  
    290290        if (typeof(msg_info) != 'object') 
    291291                alert(get_lang("Error in show_msg param is not object")); 
    292          
     292 
    293293        if (msg_info.status_get_msg_info == 'false') 
    294294        { 
     
    296296                return; 
    297297        } 
    298          
    299298        var handler_sendNotification = function(data){ 
    300299                if (data) 
     
    303302                        write_msg(get_lang("Error in SMTP sending read confirmation.")); 
    304303        }; 
    305      
     304 
    306305        if(msg_info.source) 
    307306        { 
    308         // Abrindo um e-mail criptografado 
    309         // Verifica se existe o objeto applet 
    310         if (!Element('cert_applet')){ 
    311             // se não existir, mostra mensagem de erro. 
    312             write_msg(get_lang('The preference "%1" isn\'t enabled.', get_lang('Enable digitally sign/cipher the message?'))); 
    313         } else { 
    314             // se existir prepara os dados para serem enviados e chama a 
    315             // operação na applet 
    316  
    317             expresso.connector.showProgressBar(); 
    318  
    319            // if ((msg_info.DispositionNotificationTo) && ((msg_info.Unseen == 'U') || (msg_info.Recent == 'N'))){ 
    320             /*  var confNotification = confirm(get_lang("The sender waits your notification of reading. Do you want to confirm this?"), ""); 
    321                 if (confNotification)*/ 
    322             //        cExecute ("expressoMail1_2.imap_functions.send_notification&notificationto="+msg_info.DispositionNotificationTo+"&subject="+url_encode(msg_info.subject), handler_sendNotification); 
    323            // } 
    324  
    325             Element('cert_applet').doButtonClickAction('decript', 
    326                                                         msg_info.msg_number, 
    327                                                         msg_info.source, 
    328                                                         msg_info.msg_folder); // Passa os dados para a applet 
    329         } 
     307                // Abrindo um e-mail criptografado 
     308                // Verifica se existe o objeto applet 
     309                if (!Element('cert_applet')){ 
     310                        // se não existir, mostra mensagem de erro. 
     311                        write_msg(get_lang('The preference "%1" isn\'t enabled.', get_lang('Enable digitally sign/cipher the message?'))); 
     312                } else { 
     313                        // se existir prepara os dados para serem enviados e chama a 
     314                        // operação na applet 
     315 
     316                        expresso.connector.showProgressBar(); 
     317 
     318                        // if ((msg_info.DispositionNotificationTo) && ((msg_info.Unseen == 'U') || (msg_info.Recent == 'N'))){ 
     319                        /*      var confNotification = confirm(get_lang("The sender waits your notification of reading. Do you want to confirm this?"), ""); 
     320                                if (confNotification)*/ 
     321                        //        cExecute ("expressoMail1_2.imap_functions.send_notification&notificationto="+msg_info.DispositionNotificationTo+"&subject="+url_encode(msg_info.subject), handler_sendNotification); 
     322                        // } 
     323 
     324                        Element('cert_applet').doButtonClickAction('decript', 
     325                                        msg_info.msg_number, 
     326                                        msg_info.source, 
     327                                        msg_info.msg_folder); // Passa os dados para a applet 
     328                } 
    330329                return; 
    331330 
    332331        } 
    333332 
    334  
    335         if (msg_info.status_get_msg_info == 'false') 
    336         { 
    337                 write_msg(get_lang("Problems reading your message")+ "."); 
    338                 return; 
    339         } 
    340  
    341333        if (msg_info.status == 'false'){ 
    342                 eval(msg_info.command_to_exec); 
     334                delete_border(msg_info.reuse_border); 
    343335        } 
    344336        else{ 
    345         var ID = msg_info.original_ID ? msg_info.original_ID : msg_info.msg_number; 
    346         var id_msg_read = ID+"_r"; 
     337                var ID = msg_info.original_ID ? msg_info.original_ID : msg_info.msg_number; 
     338                var id_msg_read = ID+"_r"; 
    347339 
    348340                if (preferences.use_shortcuts == '1') 
     
    350342                // Call function to draw message 
    351343                // If needed, delete old border 
    352                 if (openTab.type[currentTab] == 2 || openTab.type[currentTab] == 3) 
    353                         delete_border(currentTab,'false'); 
    354  
    355                  
    356                 if(Element("border_id_" + id_msg_read))  
    357                         alternate_border(id_msg_read);           
    358                 else { 
    359                         var border_id = create_border(msg_info.subject, id_msg_read); 
    360                         if(border_id) 
     344                if(currentTab) 
     345                { 
     346                        draw_message(msg_info,currentTab); 
     347                        var unseen_sort = document.getElementById('span_flag_UNSEEN').getAttribute('onclick'); 
     348                        unseen_sort = unseen_sort.toString(); 
     349                        if ( !(unseen_sort.indexOf("'UNSEEN' == 'UNSEEN'") < 0) ) 
    361350                        { 
    362                                 openTab.type[border_id] = 2; 
    363                                 draw_message(msg_info,border_id); 
    364                                 var unseen_sort = document.getElementById('span_flag_UNSEEN').getAttribute('onclick'); 
    365                                 unseen_sort = unseen_sort.toString(); 
    366                                 if ( !(unseen_sort.indexOf("'UNSEEN' == 'UNSEEN'") < 0) ) 
    367                                 { 
    368                                         var sort_type = sort_box_type; 
    369                                         sort_box_type = null; 
    370                                         sort_box('UNSEEN', sort_type); 
    371                                 } 
    372                         } 
    373                         else 
    374                                 return; 
    375                 } 
     351                                var sort_type = sort_box_type; 
     352                                sort_box_type = null; 
     353                                sort_box('UNSEEN', sort_type); 
     354                        } 
     355                } 
     356                else 
     357                        return; 
    376358 
    377359                var domains = ""; 
    378360                if ((msg_info.DispositionNotificationTo) && (!msg_is_read(ID) || (msg_info.Recent == 'N'))) 
    379                 {                        
     361                { 
    380362                        if (preferences.notification_domains != undefined && preferences.notification_domains != "") 
    381             { 
     363                        { 
    382364                                domains = preferences.notification_domains.split(','); 
    383             } 
     365                        } 
    384366                        else 
    385                         {                                
     367                        { 
    386368                                var confNotification = true; 
    387                          } 
     369                        } 
    388370                        for (var i = 0; i < domains.length; i++) 
    389371                                if (msg_info.DispositionNotificationTo.match(domains[i]+">")) 
     
    392374                                        break; 
    393375                                } 
    394                                 if (confNotification == undefined) 
    395                                         var confNotification = confirm(get_lang("The sender:\n%1\nwaits your notification of reading. Do you want to confirm this?",msg_info.DispositionNotificationTo), ""); 
    396  
     376                        if (confNotification == undefined) 
     377                                var confNotification = confirm(get_lang("The sender:\n%1\nwaits your notification of reading. Do you want to confirm this?",msg_info.DispositionNotificationTo), ""); 
    397378                        if (confNotification) 
    398379                                cExecute ("expressoMail1_2.imap_functions.send_notification&notificationto="+msg_info.DispositionNotificationTo+"&subject="+url_encode(msg_info.subject), handler_sendNotification); 
     
    401382                if (!msg_is_read(ID)) 
    402383                { 
    403             set_msg_as_read(ID, true); 
     384                        set_msg_as_read(ID, true); 
    404385                        if (msg_info.cacheHit || (!proxy_mensagens.is_local_folder(get_current_folder()) && msg_info.original_ID)) 
    405             { 
     386                        { 
    406387                                set_message_flag(ID, "seen"); // avoid caducous (lazy) data 
    407             } 
    408         } 
     388                        } 
     389                } 
    409390        } 
    410391} 
Note: See TracChangeset for help on using the changeset viewer.