Changeset 245


Ignore:
Timestamp:
03/25/08 15:14:30 (16 years ago)
Author:
niltonneto
Message:

Melhorado o focus no IE.
Adicionado atalho "tab+entar" para enviar mensagem.

Location:
trunk/expressoMail1_2/js
Files:
2 edited

Legend:

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

    r197 r245  
    215215                                        var discard_msg = confirm(get_lang("Your message has not been sent. Discard your message?"), ""); 
    216216                                        if (!discard_msg) 
     217                                        { 
    217218                                                return; 
     219                                        } 
     220                                        else 
     221                                        { 
     222                                                Element('to_'+ID).focus(); 
     223                                        } 
    218224                                } 
    219225                        } 
  • trunk/expressoMail1_2/js/main.js

    r220 r245  
    440440                        body.contentWindow.document.close(); 
    441441                        body.contentWindow.document.designMode = "on"; 
    442                         body.contentWindow.focus(); 
     442                        //Focus 
     443                        if (is_ie) 
     444                                window.setTimeout('document.getElementById("body_'+new_border_ID+'").contentWindow.focus();', 300); 
     445                        else 
     446                                body.contentWindow.focus(); 
    443447                        if (is_ie) 
    444448                                body.contentWindow.document.onkeypress = function(){if(body.contentWindow.event.keyCode == 13){changeEnterKey(body.contentWindow)}}; 
     
    459463                        body.contentWindow.document.close(); 
    460464                        body.contentWindow.document.designMode = "on"; 
    461                         body.contentWindow.focus(); 
     465                        //Focus 
    462466                        if (is_ie) 
    463                                 body.contentWindow.document.onkeypress = function(){if(body.contentWindow.event.keyCode == 13){changeEnterKey(body.contentWindow)}};                     
     467                                window.setTimeout('document.getElementById("body_'+new_border_ID+'").contentWindow.focus();', 300); 
     468                        else 
     469                                body.contentWindow.focus(); 
     470                        if (is_ie) 
     471                                body.contentWindow.document.onkeypress = function(){if(body.contentWindow.event.keyCode == 13){changeEnterKey(body.contentWindow)}}; 
    464472                        msg_reply_from = document.createElement('input'); 
    465473                        msg_reply_from.id = "msg_reply_from_" + new_border_ID; 
     
    484492                        body.contentWindow.document.close(); 
    485493                        body.contentWindow.document.designMode = "on"; 
    486                         body.contentWindow.focus(); 
     494                        //Focus 
     495                        if (is_ie) 
     496                                window.setTimeout('document.getElementById("body_'+new_border_ID+'").contentWindow.focus();', 300); 
     497                        else 
     498                                body.contentWindow.focus(); 
    487499                        if (is_ie) 
    488500                                body.contentWindow.document.onkeypress = function(){if(body.contentWindow.event.keyCode == 13){changeEnterKey(body.contentWindow)}}; 
     
    510522                        body.contentWindow.document.close(); 
    511523                        body.contentWindow.document.designMode = "on"; 
    512                         body.contentWindow.focus(); 
     524                        //Focus 
     525                        if (is_ie) 
     526                                window.setTimeout('document.getElementById("body_'+new_border_ID+'").contentWindow.focus();', 300); 
     527                        else 
     528                                body.contentWindow.focus(); 
    513529                        if (is_ie) 
    514530                                body.contentWindow.document.onkeypress = function(){if(body.contentWindow.event.keyCode == 13){changeEnterKey(body.contentWindow)}}; 
     
    577593                        if (is_ie) 
    578594                                body.contentWindow.document.onkeypress = function(){if(body.contentWindow.event.keyCode == 13){changeEnterKey(body.contentWindow)}}; 
    579                         Element("to_" + new_border_ID).focus(); 
     595                        Element("to_" + new_border_ID).focus();                  
    580596                        break; 
    581597                case "edit": 
     
    599615                        body.contentWindow.document.close(); 
    600616                        body.contentWindow.document.designMode = "on"; 
    601                         body.contentWindow.focus(); 
     617                        //Focus 
     618                        if (is_ie) 
     619                                window.setTimeout('document.getElementById("body_'+new_border_ID+'").contentWindow.focus();', 300); 
     620                        else 
     621                                body.contentWindow.focus(); 
    602622                        if (is_ie) 
    603623                                body.contentWindow.document.onkeypress = function(){if(body.contentWindow.event.keyCode == 13){changeEnterKey(body.contentWindow)}}; 
     
    611631                if (is_ie) 
    612632                { 
    613                         body.contentWindow.document.attachEvent('onkeydown', function(event) { if(event.keyCode==9) { Element('to_'+new_border_ID).focus(); Element('send_button_'+new_border_ID).focus(); return false;} }, false); 
     633                        body.contentWindow.document.attachEvent('onkeydown', function(event) { if(event.keyCode==27){delete_border(new_border_ID,'false');} if(event.keyCode==9) { Element('to_'+new_border_ID).focus(); Element('send_button_'+new_border_ID).focus(); return false;} }, false); 
    614634                } 
    615635                else 
    616636                { 
    617                         body.contentWindow.document.addEventListener('keypress', function(event) { if(event.keyCode==9) { Element('send_button_'+new_border_ID).focus(); event.preventDefault(); } }, false); 
     637                        body.contentWindow.document.addEventListener('keypress', function(event) { if(event.keyCode==27){delete_border(new_border_ID,'false');} if(event.keyCode==9) { Element('send_button_'+new_border_ID).focus(); event.preventDefault(); } }, false); 
    618638                } 
    619639        } 
Note: See TracChangeset for help on using the changeset viewer.