Ignore:
Timestamp:
12/11/07 16:47:03 (16 years ago)
Author:
niltonneto
Message:

Nova funcionalidade: Teclas de Atalho
Correção de frases lang

File:
1 edited

Legend:

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

    r118 r128  
    7070                //Change the tr color to read. 
    7171                set_msg_class_to_read(msg_info['msg_number'], true); 
     72                 
     73                if (preferences.use_shortcuts == '1') 
     74                        select_msg(msg_info.msg_number, 'null'); 
    7275                 
    7376                if ((msg_info.DispositionNotificationTo) && ((msg_info.Unseen == 'U') || (msg_info.Recent == 'N'))){ 
     
    141144                        msg_to_delete = Element(data.msgs_number[i]); 
    142145                        if (msg_to_delete){ 
     146                                if ( (msg_to_delete.style.backgroundColor != '') && (preferences.use_shortcuts == '1') ) 
     147                                        select_msg('null', 'down'); 
    143148                                mail_msg.removeChild(msg_to_delete); 
    144149                        } 
     
    188193                        msg_to_delete = Element(data.msgs_number[i]); 
    189194                        if (msg_to_delete){ 
     195                                if ( (msg_to_delete.style.backgroundColor != '') && (preferences.use_shortcuts == '1') ) 
     196                                        select_msg('null', 'down'); 
    190197                                mail_msg.removeChild(msg_to_delete); 
    191198                        } 
     
    315322                        body.contentWindow.document.write("<html><body bgcolor='#FFFFFF'></body></html>"); 
    316323                        body.contentWindow.document.close(); 
    317                         body.contentWindow.focus(); 
    318324                        body.contentWindow.document.designMode = "on"; 
    319325                        body.contentWindow.focus(); 
     326                        if (is_ie) 
     327                                body.contentWindow.document.onkeypress = function(){if(body.contentWindow.event.keyCode == 13){changeEnterKey(body.contentWindow)}}; 
    320328                        msg_reply_from = document.createElement('input'); 
    321329                        msg_reply_from.id = "msg_reply_from_" + new_border_ID; 
     
    335343                        body.contentWindow.document.designMode = "on"; 
    336344                        body.contentWindow.focus(); 
     345                        if (is_ie) 
     346                                body.contentWindow.document.onkeypress = function(){if(body.contentWindow.event.keyCode == 13){changeEnterKey(body.contentWindow)}};                     
    337347                        msg_reply_from = document.createElement('input'); 
    338348                        msg_reply_from.id = "msg_reply_from_" + new_border_ID; 
     
    358368                        body.contentWindow.document.designMode = "on"; 
    359369                        body.contentWindow.focus(); 
     370                        if (is_ie) 
     371                                body.contentWindow.document.onkeypress = function(){if(body.contentWindow.event.keyCode == 13){changeEnterKey(body.contentWindow)}}; 
    360372                        msg_reply_from = document.createElement('input'); 
    361373                        msg_reply_from.id = "msg_reply_from_" + new_border_ID; 
     
    382394                        body.contentWindow.document.designMode = "on"; 
    383395                        body.contentWindow.focus(); 
     396                        if (is_ie) 
     397                                body.contentWindow.document.onkeypress = function(){if(body.contentWindow.event.keyCode == 13){changeEnterKey(body.contentWindow)}}; 
    384398                        msg_reply_from = document.createElement('input'); 
    385399                        msg_reply_from.id = "msg_reply_from_" + new_border_ID; 
     
    417431                        body.contentWindow.document.close(); 
    418432                        body.contentWindow.document.designMode = "on"; 
     433                        if (is_ie) 
     434                                body.contentWindow.document.onkeypress = function(){if(body.contentWindow.event.keyCode == 13){changeEnterKey(body.contentWindow)}}; 
    419435                        Element("to_" + new_border_ID).focus(); 
    420436                        break; 
     
    442458                        body.contentWindow.document.close(); 
    443459                        body.contentWindow.document.designMode = "on"; 
     460                        if (is_ie) 
     461                                body.contentWindow.document.onkeypress = function(){if(body.contentWindow.event.keyCode == 13){changeEnterKey(body.contentWindow)}}; 
    444462                        Element("to_" + new_border_ID).focus(); 
    445463                        break; 
     
    465483                        body.contentWindow.document.designMode = "on"; 
    466484                        body.contentWindow.focus(); 
     485                        if (is_ie) 
     486                                body.contentWindow.document.onkeypress = function(){if(body.contentWindow.event.keyCode == 13){changeEnterKey(body.contentWindow)}}; 
    467487                        break; 
    468488                default: 
     
    483503 
    484504        Element("border_id_" + new_border_ID).innerHTML = "<table width=100% border=0 cellspacing=0 cellpadding=0><tr><td id=font_border_id_" + new_border_ID +" class='font-menu' width=*>" +title + "</td><td width=1px><img onmousedown='javascript:return false' style='cursor:pointer' onclick=delete_border('" + new_border_ID + "','false') src='templates/default/images/close_button.gif'></td></tr></table>"; 
     505} 
     506 
     507// Change the tag <P> for the tag <BR> on IE 
     508function changeEnterKey(win) { 
     509        var oSel = win.document.selection.createRange(); 
     510        oSel.pasteHTML("<br />"); 
     511        win.event.cancelBubble = true; 
     512        win.event.returnValue=false; 
     513        oSel.select(); 
     514        oSel.moveEnd("character",1); 
     515        oSel.moveStart("character",1); 
     516        oSel.collapse(false); 
     517        return false; 
    485518} 
    486519 
Note: See TracChangeset for help on using the changeset viewer.