Changeset 5162


Ignore:
Timestamp:
11/10/11 08:19:35 (12 years ago)
Author:
brunocosta
Message:

Ticket #2289 - Evita o evento onbeforeunload quando um link para um anexo é clicado.

Location:
branches/2.3/expressoMail1_2/js
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2.3/expressoMail1_2/js/common_functions.js

    r5103 r5162  
    222222        } 
    223223        div_attachment.innerHTML="<iframe style='display:none;width:0;height:0' name='attachment' src='"+url+"'></iframe>"; 
     224        window.onbeforeunload = function(){return unloadMess();} 
    224225} 
    225226 
     
    239240 
    240241        div_attachment.innerHTML="<iframe style='display:none;width:0;height:0' name='attachment' src='inc/gotodownload.php?msg_folder="+msg_folder+"&msg_number="+msg_number+"&idx_file="+idx_file+"&msg_part="+msg_part+params+"'></iframe>"; 
     242        window.onbeforeunload = function(){return unloadMess();} 
    241243} 
    242244 
     
    315317        var link_attachment = document.createElement("A"); 
    316318        link_attachment.setAttribute("href", link); 
    317  
     319        link_attachment.onclick = function (){window.onbeforeunload = "";}; 
    318320        link_attachment.innerHTML = file_name; 
    319321        divFile.appendChild(link_attachment); 
  • branches/2.3/expressoMail1_2/js/main.js

    r5116 r5162  
    13131313                                        var link_attachment = document.createElement("A"); 
    13141314                                        link_attachment.setAttribute("href", attachments[i].href); 
     1315                                        link_attachment.onclick = function (){window.onbeforeunload = "";}; 
    13151316                                        link_attachment.innerHTML = attachments[i].firstChild.nodeValue + '<br/>'; 
    13161317 
     
    14581459                                        var link_attachment = document.createElement("A"); 
    14591460                                        link_attachment.setAttribute("href", attachments[i].href); 
     1461                                        link_attachment.onclick = function (){window.onbeforeunload = "";}; 
    14601462                                        if(attachments[i].innerHTML == "") 
    14611463                                            continue; 
     
    20242026 
    20252027                        link_attachment.setAttribute("href", "javascript:download_attachments("+href+")"); 
    2026  
     2028                        link_attachment.onclick = function (){window.onbeforeunload = "";}; 
    20272029                        var a_tmp = href.split(','); 
    20282030                        a_tmp[2] = fileName; 
Note: See TracChangeset for help on using the changeset viewer.