Ignore:
Timestamp:
04/14/10 11:53:45 (14 years ago)
Author:
rodsouza
Message:

Ticket #1009 - Permitindo que o ExpressoMail? não realize reload de página.

File:
1 edited

Legend:

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

    r2517 r2519  
    241241 
    242242                if (trash_span) 
    243                         trash_span.style.backgroundImage="url(../phpgwapi/templates/"+template+"/images/foldertree_trash.png)"; 
     243                        trash_span.style.backgroundImage="url(" + URL_SERVER + "/phpgwapi/templates/"+template+"/images/foldertree_trash.png)"; 
    244244 
    245245                if (draft_span) 
    246                         draft_span.style.backgroundImage="url(../phpgwapi/templates/"+template+"/images/foldertree_draft.png)" 
     246                        draft_span.style.backgroundImage="url(" + URL_SERVER + "/phpgwapi/templates/"+template+"/images/foldertree_draft.png)" 
    247247 
    248248                if (sent_span) 
    249                         sent_span.style.backgroundImage="url(../phpgwapi/templates/"+template+"/images/foldertree_sent.png)"; 
     249                        sent_span.style.backgroundImage="url(" + URL_SERVER + "/phpgwapi/templates/"+template+"/images/foldertree_sent.png)"; 
    250250 
    251251                if (spam_span) 
    252                         spam_span.style.backgroundImage="url(../phpgwapi/templates/"+template+"/images/foldertree_spam.png)"; 
     252                        spam_span.style.backgroundImage="url(" + URL_SERVER + "/phpgwapi/templates/"+template+"/images/foldertree_spam.png)"; 
    253253 
    254254 
     
    417417                                } 
    418418                        } 
    419                         expresso.connector.newRequest('error.html', 'templates/'+template+'/error.html', 'GET', 
     419                        expresso.connector.newRequest('error.html', URL_SERVER + '/expressoMail1_2/templates/'+template+'/error.html', 'GET', 
    420420                                function(data) 
    421421                                { 
     
    879879                td_element2.setAttribute("width", "2%"); 
    880880                if (headers_msgs.attachment && headers_msgs.attachment.number_attachments > 0) 
    881                         td_element2.innerHTML = "<img src ='templates/"+template+"/images/clip.gif' title='" + url_decode(headers_msgs.attachment.names) + "'>";                         
     881                        td_element2.innerHTML = '<img src ="' + URL_SERVER + '/expressoMail1_2/templates/'+template+'/images/clip.gif" title="' + url_decode(headers_msgs.attachment.names) + '">';                      
    882882                         
    883883                td_element21 = document.createElement("TD"); 
     
    891891                        { 
    892892                                if (url_decode(attach_name[item]) != 'smime.p7s' && url_decode(attach_name[item]) != 'smime.p7m'){ 
    893                                         td_element21.innerHTML = "<img src ='templates/"+template+"/images/clip.gif' title='" + url_decode(attach_name[item]) + "'>"; 
     893                                        td_element21.innerHTML = '<img src ="' + URL_SERVER + '/expressoMail1_2/templates/'+template+'/images/clip.gif" title="' + url_decode(attach_name[item]) + '">'; 
    894894                                        break; 
    895895                                } 
     
    898898 
    899899                if ((headers_msgs.Forwarded == 'F')  || (headers_msgs.Draft == 'X' && headers_msgs.Answered == 'A')){ 
    900                         td_element21.innerHTML = "<img src ='templates/"+template+"/images/forwarded.gif' title='"+get_lang('Forwarded')+"'>"; 
     900                        td_element21.innerHTML = '<img src ="' + URL_SERVER + '/expressoMail1_2/templates/'+template+'/images/forwarded.gif" title="'+get_lang('Forwarded')+'">'; 
    901901                        headers_msgs.Draft = ''  
    902902                        headers_msgs.Answered = ''; 
     
    904904                } 
    905905                else if (headers_msgs.Draft == 'X') 
    906                         td_element21.innerHTML = "<img src ='templates/"+template+"/images/draft.gif' title='"+get_lang('Draft')+"'>"; 
     906                        td_element21.innerHTML = '<img src ="' + URL_SERVER + '/expressoMail1_2/templates/'+template+'/images/draft.gif" title="'+get_lang('Draft')+'">'; 
    907907                else if (headers_msgs.Answered == 'A') 
    908                         td_element21.innerHTML = "<img src ='templates/"+template+"/images/answered.gif' title='"+get_lang('Answered')+"'>"; 
     908                        td_element21.innerHTML = '<img src ="' + URL_SERVER + '/expressoMail1_2/templates/'+template+'/images/answered.gif" title="'+get_lang('Answered')+'">'; 
    909909                else 
    910910                        td_element21.innerHTML = "&nbsp;&nbsp;&nbsp;"; 
     
    922922            case "signature": 
    923923                        { 
    924                                 td_element22.innerHTML = "<img src ='templates/"+template+"/images/signed_msg.gif' title='" + get_lang('Signed message') + "'>"; 
     924                                td_element22.innerHTML = '<img src ="' + URL_SERVER + '/expressoMail1_2/templates/'+template+'/images/signed_msg.gif" title="' + get_lang('Signed message') + '">'; 
    925925                                break; 
    926926                        } 
    927927            case "cipher": 
    928928                        { 
    929                                 td_element22.innerHTML = "<img src ='templates/"+template+"/images/lock.gif' title='" + get_lang('Crypted message') + "'>"; 
     929                                td_element22.innerHTML = '<img src ="' + URL_SERVER + '/expressoMail1_2/templates/'+template+'/images/lock.gif" title="' + get_lang('Crypted message') + '">'; 
    930930                                break; 
    931931                        } 
     
    943943                if (headers_msgs.Flagged == 'F' || (headers_msgs.Importance.toLowerCase().indexOf("high") != -1 && parseInt(preferences.use_important_flag))) 
    944944                { 
    945                         td_element23.innerHTML = "<img src ='templates/"+template+"/images/important.gif' title='"+get_lang('Important')+"'>"; 
     945                        td_element23.innerHTML = '<img src ="' + URL_SERVER + '/expressoMail1_2/templates/'+template+'/images/important.gif" title="'+get_lang('Important')+'">'; 
    946946                } 
    947947                else 
     
    955955                // preload image 
    956956                var _img_sent = new Image(); 
    957                 _img_sent.src    = "templates/"+template+"/images/sent.gif"; 
     957                _img_sent.src    = URL_SERVER + '/expressoMail1_2/templates/'+template+'/images/sent.gif'; 
    958958 
    959959                td_element3 = document.createElement("TD"); 
     
    974974                        else{                            
    975975                                if(headers_msgs.to.email != null && headers_msgs.to.email.toLowerCase() != Element("user_email").value) 
    976                                         td_element24.innerHTML = "<img valign='center' src ='templates/"+template+"/images/sent.gif' title='"+get_lang('Sent')+"'>"; 
     976                                        td_element24.innerHTML = '<img valign="center" src ="' + URL_SERVER + '/expressoMail1_2/templates/'+template+'/images/sent.gif" title="'+get_lang('Sent')+'">'; 
    977977                         
    978978                                if ((headers_msgs.to)&&(headers_msgs.to.name != null)) 
     
    11081108        document.getElementById("message_header_SORTARRIVAL_"+numBox).innerHTML = get_lang("Date"); 
    11091109        document.getElementById("message_header_SORTSIZE_"+numBox).innerHTML    = get_lang("Size");      
    1110         document.getElementById("message_header_"+(sort_box_type.lastIndexOf("SORT") != "-1" ? sort_box_type : "SORTARRIVAL")+"_"+numBox ).innerHTML = "<B>"+type_name+"</B><img src ='templates/"+template+"/images/arrow_"+(sort_box_reverse == 1 ? 'desc' : 'asc')+"endant.gif'>"; 
     1110        document.getElementById("message_header_"+(sort_box_type.lastIndexOf("SORT") != "-1" ? sort_box_type : "SORTARRIVAL")+"_"+numBox ).innerHTML = "<B>"+type_name+'</B><img src ="' + URL_SERVER + '/expressoMail1_2/templates/'+template+'/images/arrow_'+(sort_box_reverse == 1 ? 'desc' : 'asc')+'endant.gif">'; 
    11111111} 
    11121112function draw_message(info_msg, ID){ 
     
    11261126        var img_next_msg = document.createElement("IMG"); 
    11271127        img_next_msg.id = 'msg_opt_next_' + ID; 
    1128         img_next_msg.src = './templates/'+template+'/images/down.button.png'; 
     1128        img_next_msg.src = URL_SERVER + '/expressoMail1_2/templates/'+template+'/images/down.button.png'; 
    11291129        img_next_msg.title = get_lang('Next'); 
    11301130        img_next_msg.style.cursor = 'pointer'; 
     
    11561156        else 
    11571157        { 
    1158             img_next_msg.src = "./templates/"+template+"/images/down.gray.button.png"; 
     1158            img_next_msg.src = URL_SERVER + '/expressoMail1_2/templates/'+template+'/images/down.gray.button.png'; 
    11591159            img_next_msg.style.cursor = 'default'; 
    11601160 
     
    11631163    else 
    11641164    { 
    1165         img_next_msg.src = "./templates/"+template+"/images/down.gray.button.png"; 
     1165        img_next_msg.src = URL_SERVER + '/expressoMail1_2/templates/'+template+'/images/down.gray.button.png'; 
    11661166                img_next_msg.style.cursor = 'default'; 
    11671167                if (!proxy_mensagens.is_local_folder(get_current_folder()) && !(info_msg.msg_folder == "INBOX/decifradas")) // testa se a mensagem e local 
     
    11821182        var img_previous_msg = document.createElement("IMG"); 
    11831183        img_previous_msg.id = 'msg_opt_previous_' + ID; 
    1184         img_previous_msg.src = './templates/'+template+'/images/up.button.png'; 
     1184        img_previous_msg.src = URL_SERVER + '/expressoMail1_2/templates/'+template+'/images/up.button.png'; 
    11851185        img_previous_msg.title = get_lang('Previous'); 
    11861186        img_previous_msg.style.cursor = 'pointer'; 
     
    12111211        else 
    12121212        { 
    1213             img_previous_msg.src = "./templates/"+template+"/images/up.gray.button.png"; 
     1213            img_previous_msg.src = URL_SERVER + '/expressoMail1_2/templates/'+template+'/images/up.gray.button.png'; 
    12141214            img_previous_msg.style.cursor = 'default'; 
    12151215        } 
     
    12171217        else 
    12181218        { 
    1219                 img_previous_msg.src = "./templates/"+template+"/images/up.gray.button.png"; 
     1219                img_previous_msg.src = URL_SERVER + '/expressoMail1_2/templates/'+template+'/images/up.gray.button.png'; 
    12201220                img_previous_msg.style.cursor = 'default'; 
    12211221                if (!proxy_mensagens.is_local_folder(get_current_folder()) && !(info_msg.msg_folder == "INBOX/decifradas")) // testa se a mensagem e local 
     
    12661266        td.innerHTML = _name.bold() + ', ' + info_msg.smalldate; 
    12671267        if (info_msg.attachments.length > 0) 
    1268                 td.innerHTML += "&nbsp<img style='cursor:pointer' onclick='javascript:Element(\"option_hide_more_"+ID+"\").onclick()' src ='templates/"+template+"/images/clip.gif' title='"+info_msg.attachments.names+"'>"; 
     1268                td.innerHTML += "&nbsp<img style='cursor:pointer' onclick='javascript:Element(\"option_hide_more_"+ID+"\").onclick()' src ='" + URL_SERVER + "/expressoMail1_2/templates/"+template+"/images/clip.gif' title='"+info_msg.attachments.names+"'>"; 
    12691269         
    12701270        if (typeof(info_msg.signature) == 'string') 
    12711271        {        
    12721272                if (info_msg.signature != "void") 
    1273                         td.innerHTML += '&nbsp;<img style="cursor:pointer" onclick="alert(\''+ get_lang("This message is signed, and you can trust.") + info_msg.signature +'\');" src="templates/'+template+'/images/signed.gif">'; 
     1273                        td.innerHTML += '&nbsp;<img style="cursor:pointer" onclick="alert(\''+ get_lang("This message is signed, and you can trust.") + info_msg.signature +'\');" src="' + URL_SERVER + '/expressoMail1_2/templates/'+template+'/images/signed.gif">'; 
    12741274                else 
    1275                         td.innerHTML += "&nbsp;<img style='cursor:pointer' onclick='alert(\""+get_lang("This message is signed, but it is invalid. You should not trust on it.")+"\");' title='"+get_lang("Voided message")+"' src='templates/"+template+"/images/invalid.gif'>"; 
     1275                        td.innerHTML += "&nbsp;<img style='cursor:pointer' onclick='alert(\""+get_lang("This message is signed, but it is invalid. You should not trust on it.")+"\");' title='"+get_lang("Voided message")+"' src='" + URL_SERVER + "/expressoMail1_2/templates/"+template+"/images/invalid.gif'>"; 
    12761276        } 
    12771277         
    12781278        if (info_msg.DispositionNotificationTo) 
    12791279        { 
    1280                 td.innerHTML += '&nbsp;<img style="cursor:pointer" alt="'+ get_lang('Message with read notification') + '" title="'+ get_lang('Message with read notification') + '" src="templates/'+template+'/images/notification.gif">'; 
     1280                td.innerHTML += '&nbsp;<img style="cursor:pointer" alt="'+ get_lang('Message with read notification') + '" title="'+ get_lang('Message with read notification') + '" src="' + URL_SERVER + '/expressoMail1_2/templates/'+template+'/images/notification.gif">'; 
    12811281        } 
    12821282         
     
    14301430                if(signature_status_pos < 0 ) 
    14311431                { 
    1432                 td.innerHTML += '&nbsp;<img style="cursor:pointer" src="templates/'+template+'/images/signed_error.gif" title="'+get_lang("Details")+'">'; 
     1432                td.innerHTML += '&nbsp;<img style="cursor:pointer" src="' + URL_SERVER + '/expressoMail1_2/templates/'+template+'/images/signed_error.gif" title="'+get_lang("Details")+'">'; 
    14331433                tr_signature.style.display = ''; 
    14341434                } 
    14351435                else 
    14361436                { 
    1437                 td.innerHTML += '&nbsp;<img style="cursor:pointer" src="templates/'+template+'/images/signed_table.gif" title="'+get_lang("Details")+'">'; 
     1437                td.innerHTML += '&nbsp;<img style="cursor:pointer" src="' + URL_SERVER + '/expressoMail1_2/templates/'+template+'/images/signed_table.gif" title="'+get_lang("Details")+'">'; 
    14381438                } 
    14391439                td.onclick = function(){ 
     
    18791879                                if (forbidden) 
    18801880                                { 
    1881                                         newBody = newBody.replace(imgTag[j],"<img src='templates/"+template+"/images/forbidden.jpg'>"); 
     1881                                        newBody = newBody.replace(imgTag[j],"<img src='" + URL_SERVER + "/expressoMail1_2/templates/"+template+"/images/forbidden.jpg'>"); 
    18821882                                        blocked=true; 
    18831883                                } 
     
    19571957                } 
    19581958                 
    1959                 td.innerHTML += "<BR><img src='templates/"+template+"/images/menu/ktip.png'>"+get_lang("<b>Tip:</b> For faster save, click over the image with <u>right button</u>."); 
     1959                td.innerHTML += "<BR><img src='" + URL_SERVER + "/expressoMail1_2/templates/"+template+"/images/menu/ktip.png'>"+get_lang("<b>Tip:</b> For faster save, click over the image with <u>right button</u>."); 
    19601960                td.innerHTML += "<BR>"; 
    19611961 
     
    21942194        if (!expresso_offline) { 
    21952195                var img_search = document.createElement("IMG"); 
    2196                 img_search.src = "./templates/"+template+"/images/search.gif"; 
     2196                img_search.src = URL_SERVER + '/expressoMail1_2/templates/'+template+'/images/search.gif'; 
    21972197                img_search.title = get_lang('Search') + " | " + get_lang('Use F9 Key as shortcut.'); 
    21982198                img_search.onclick = function () {emQuickSearch(document.getElementById('to_'+ID).value, 'to', ID);}; 
     
    22822282        td_cc.appendChild(input_cc); 
    22832283        var img_search = document.createElement("IMG"); 
    2284         img_search.src = "./templates/"+template+"/images/search.gif"; 
     2284        img_search.src = URL_SERVER + '/expressoMail1_2/templates/'+template+'/images/search.gif'; 
    22852285        img_search.onclick = function () {emQuickSearch(document.getElementById('cc_'+ID).value, 'cc', ID)} 
    22862286        img_search.title = get_lang('Search') + " | " + get_lang('Use F9 Key as shortcut.'); 
     
    23652365        td_cco.appendChild(input_cco); 
    23662366        var img_search = document.createElement("IMG"); 
    2367         img_search.src = "./templates/"+template+"/images/search.gif"; 
     2367        img_search.src = URL_SERVER + '/expressoMail1_2/templates/'+template+'/images/search.gif'; 
    23682368        img_search.title = get_lang('Search') + " | " + get_lang('Use F9 Key as shortcut.');     
    23692369        img_search.onclick = function () {emQuickSearch(document.getElementById('cco_'+ID).value, 'cco', ID);}; 
     
    27512751        td21.height="15"; 
    27522752        td22 = document.createElement("TD");     
    2753         td21.setAttribute("background","../phpgwapi/templates/"+template+"/images/dsunused.gif"); 
     2753        td21.setAttribute("background", URL_SERVER + '/phpgwapi/templates/' + template + '/images/dsunused.gif'); 
    27542754        table221 = document.createElement("TABLE"); 
    27552755        tbody221 = document.createElement("TBODY"); 
     
    27712771        } 
    27722772        else if(value > 80) 
    2773                 td221.setAttribute("background","templates/"+template+"/images/dswarn.gif"); 
     2773                td221.setAttribute("background", URL_SERVER + '/expressoMail1_2/templates/' + template + '/images/dswarn.gif'); 
    27742774        else 
    27752775                td221.className = 'dsused'; 
     
    28642864        td_element5.align = "center"; 
    28652865        td_element5.innerHTML = "<B>"+get_lang("Date")+"</B>";   
    2866         td_element5.innerHTML += "<img src ='templates/"+template+"/images/arrow_descendant.gif'>"; 
     2866        td_element5.innerHTML += '<img src ="' + URL_SERVER + '/expressoMail1_2/templates/'+template+'/images/arrow_descendant.gif">'; 
    28672867        td_element6 = document.createElement("TD"); 
    28682868        td_element6.setAttribute("width", "10%"); 
     
    29902990         
    29912991        var sm_envelope_img1 = '<img style="cursor:'+ (is_ie ? 'hand' : 'pointer') +'" title="' + get_lang("Add Contact") + 
    2992         '" onclick="ccQuickAddOne.showList(\''+cc_data+'\')" src="./templates/'+template+'/images/user_card.png">'; 
     2992        '" onclick="ccQuickAddOne.showList(\''+cc_data+'\')" src="' + URL_SERVER + '/expressoMail1_2/templates/'+template+'/images/user_card.png">'; 
    29932993        var to_addybook_add = "<SPAN id='insert_plugin_"+idx_cc+"_"+ID+"'>"; 
    29942994        to_addybook_add += addrs; 
     
    30063006                dn_em.setAttribute("title",get_lang("Block Sender")); 
    30073007                dn_em.style.cursor = "pointer";          
    3008                 dn_em.innerHTML = "<img align='top' onclick=filter.new_rule('"+email+"') src='./templates/"+template+"/images/deny.gif'>"; 
     3008                dn_em.innerHTML = "<img align='top' onclick=filter.new_rule('"+email+"') src='" + URL_SERVER + "/expressoMail1_2/templates/"+template+"/images/deny.gif'>"; 
    30093009        return dn_em; 
    30103010         
Note: See TracChangeset for help on using the changeset viewer.