Ignore:
Timestamp:
09/21/12 12:14:32 (12 years ago)
Author:
fernando
Message:

Ticket #3088 - Melhoria no arquivamento local do Expresso - desativar serviço no ExpressoMail?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sandbox/2.5.0-expresso1/expressoMail1_2/js/mail_archiver.js

    r7261 r7270  
    257257        //Redraw "Offline" linkage, intended to recoonect MailArchiver link     
    258258        connector.purgeCache(); 
    259         ttreeBox.name_folder = "root"; 
    260         ttreeBox.update_folder(); 
    261         draw_tree_local_folders(); 
    262         ttreeBox.update_folder(); 
    263         change_folder('INBOX', 'INBOX', ttreeBox);   
     259        draw_new_tree_folder(); 
     260        change_folder('INBOX', 'INBOX');  
    264261    } 
    265262} 
     
    283280        else{ 
    284281            window.clearInterval(expresso_mail_archive.timer); 
    285             write_msg(get_lang('MailArchiver does not seems to be running or installed at this workstation, local messages are disabled. Check it out!'),true); 
     282            write_msg(get_lang('MailArchiver does not seems to be running or installed at this workstation, local messages are disabled. Check it out!'),false); 
     283            expresso_mail_archive.enabled = false; 
     284            expresso_mail_archive.turnOffLocalTreeStructure(); 
    286285        } 
    287286    } 
    288287    else{ 
    289288        window.clearInterval(expresso_mail_archive.timer); 
    290         write_msg(get_lang('MailArchiver does not seems to be running or installed at this workstation, local messages are disabled. Check it out!'),true); 
    291         expresso_mail_archive.enabled = false;         
     289        write_msg(get_lang('MailArchiver does not seems to be running or installed at this workstation, local messages are disabled. Check it out!'),false); 
     290        expresso_mail_archive.enabled = false; 
     291        expresso_mail_archive.turnOffLocalTreeStructure();  
    292292    } 
    293293    //window.alert('fooArc set to null'); 
     
    301301    write_msg(get_lang('Mail Archiver is not responding. There is some communicating issue hang it up. Some services may not work properly. Check it out!')); 
    302302    obj.DeactivateStatusListener(obj); 
     303    //draw_new_tree_folder(); 
    303304    return; 
    304305} 
     
    322323            expresso_mail_archive.DeactivateResources(expresso_mail_archive);             
    323324        } 
    324         else 
     325        //else 
    325326            //window.alert('ok'); 
    326327         
     
    351352    obj.SystemCheck(); 
    352353    obj.ActivateStatusListener(obj); 
    353     connector.resetProgressBarText(); 
    354     //auto_refresh(); 
     354    //connector.resetProgressBarText(); 
     355    auto_refresh(); 
    355356} 
    356357 
     
    12111212    }     
    12121213    catch(e){ 
    1213         if(!expresso_mail_archive.enabled) 
     1214        if (!expresso_mail_archive.enabled) 
    12141215            write_msg(get_lang('MailArchiver does not seems to be running or installed at this workstation, local messages are disabled. Check it out!'),false); 
    12151216        else{ 
    12161217            window.clearInterval(expresso_mail_archive.timer); 
    1217             write_msg(get_lang('There is something wrong with MailArchiver environment. Contact you support'),true); 
     1218            write_msg(get_lang('There is something wrong with MailArchiver environment. Contact you support'), false); 
    12181219            expresso_mail_archive.enabled = false; 
    12191220            expresso_mail_archive.turnOffLocalTreeStructure(); 
     
    12261227MailArchiver.prototype.getFaultInfoOperationOK = function(faultinfo){ 
    12271228    try{ 
    1228         write_msg(get_lang('MailArchiver remote service reports the following error:', true) + faultinfo.getReturn().getSoapFaultString()); 
     1229        write_msg(get_lang('MailArchiver remote service reports the following error:', false) + faultinfo.getReturn().getSoapFaultString()); 
    12291230    } catch(e){ 
    1230         write_msg(get_lang('The archive service reports a unknown error. Try to refresh your browser screen', true)); 
     1231        write_msg(get_lang('The archive service reports a unknown error. Try to refresh your browser screen', false)); 
    12311232    } 
    12321233    expresso_mail_archive.resetObject(); 
     
    12341235    window.setTimeout("eval('document.getElementById(\"main_title\").innerHTML =\"Expresso Mail\"')",3000);         
    12351236    connector.purgeCache(); 
     1237    expresso_mail_archive.turnOffLocalTreeStructure(); 
    12361238} 
    12371239 
     
    12391241MailArchiver.prototype.getFaultInfoOperationFailure = function(errorCode, errorDesc){ 
    12401242    try{ 
    1241         write_msg(get_lang('SoapFault capture fails at:' + errorCode + ' | ' + errorDesc, true)); 
     1243        write_msg(get_lang('SoapFault capture fails at:' + errorCode + ' | ' + errorDesc, false)); 
    12421244    } catch(e){ 
    1243         write_msg(get_lang('Service error mapping', true)); 
     1245        write_msg(get_lang('Service error mapping', false)); 
    12441246    }     
    12451247} 
     
    12621264    //window.alert('callback de createfolderoperationok'); 
    12631265    draw_tree_local_folders(); 
    1264     expresso_mail_archive.drawdata.treeObject._drawn = true; 
     1266    //expresso_mail_archive.drawdata.treeObject._drawn = true; 
    12651267    //ttreeBox.update_folder();     
    12661268} 
     
    20722074 
    20732075MailArchiver.prototype.turnOffLocalTreeStructure = function (){ 
    2074     var disabled_local_span = document.getElementById('llocal_disabledtree_folders'); 
    2075  
    2076     if((!disabled_local_span) && (!document.getElementById('services_retry'))){ 
    2077         var n_LocalDisabled = new dNode({id: "local_disabled", caption: get_lang('Offline'), onClick: "services_retry()", plusSign:false}); 
    2078         tree_folders.add(n_LocalDisabled, 'local_root'); 
    2079                              
    2080         var disabled_local_span = document.getElementById('llocal_disabledtree_folders'); 
    2081         disabled_local_span.style.backgroundImage="url(../phpgwapi/templates/"+template+"/images/foldertree_services.png)"; 
    2082         var service_retry = document.createElement("SPAN"); 
    2083         service_retry.id = 'services_retry'; 
    2084         service_retry.className = 'clean_trash'; 
    2085         service_retry.style.cursor = 'pointer'; 
    2086         service_retry.onclick = function () {services_retry();}; 
    2087         service_retry.innerHTML = "["+get_lang("Retry")+"]"; 
    2088         service_retry.title= get_lang("Reconect to MailArchiver services"); 
    2089         service_retry.onmouseover = function() {service_retry.style.color="red";}; 
    2090         service_retry.onmouseout= function() {service_retry.style.color="#666666";}; //#114FA4 
    2091         disabled_local_span.parentNode.appendChild(service_retry); 
    2092                              
    2093         var div_ma_host = document.createElement('div'); 
    2094         div_ma_host.id = 'div_login_ma_host'; 
    2095         div_ma_host.style.position = 'absolute'; 
    2096         div_ma_host.style.padding = '0px'; 
    2097         div_ma_host.style.margin = '0px'; 
    2098         div_ma_host.style.top = '25px'; 
    2099         div_ma_host.style.left = '0px'; 
    2100         div_ma_host.style.width = '145px'; 
    2101         div_ma_host.style.height = '80px'; 
    2102         div_ma_host.style.border = '1px solid #CCCCCC'; 
    2103         div_ma_host.style.backgroundColor = '#F0F0F0'; 
    2104         div_ma_host.style.fontWeight = 'normal'; 
    2105         disabled_local_span.appendChild(div_ma_host); 
    2106         div_ma_host.innerHTML = '<p><b>'+get_lang('In trouble?')+'</b></p><p>&rarr; ' + get_lang('Try to access') + '<br/><a href="' + mail_archive_protocol + "://" + mail_archive_host + ":" + mail_archive_port + '/admin" target="_blank" title="MailArchiver Admin">'+get_lang('MailArchiver admin console')+'.</p>';                             
    2107     } 
    2108     //Only creates the MA login linkage 
    2109     else{ 
    2110         var div_ma_host = document.createElement('div'); 
    2111         div_ma_host.id = 'div_login_ma_host'; 
    2112         div_ma_host.style.position = 'absolute'; 
    2113         div_ma_host.style.padding = '0px'; 
    2114         div_ma_host.style.margin = '0px'; 
    2115         div_ma_host.style.top = '25px'; 
    2116         div_ma_host.style.width = '145px'; 
    2117         div_ma_host.style.height = '80px'; 
    2118         div_ma_host.style.border = '1px solid #CCCCCC'; 
    2119         div_ma_host.style.backgroundColor = '#F0F0F0'; 
    2120         div_ma_host.style.fontWeight = 'normal'; 
    2121         disabled_local_span.appendChild(div_ma_host); 
    2122         div_ma_host.innerHTML = '<p><b>'+get_lang('In trouble?')+'</b></p><p>&rarr; ' + get_lang('Try to access') + '<br/><a href="' + mail_archive_protocol + "://" + mail_archive_host + ":" + mail_archive_port + '/admin" target="_blank" title="MailArchiver Admin">'+get_lang('MailArchiver admin console')+'.</p>';                                                         
    2123     }     
     2076     draw_new_tree_folder();   
    21242077} 
    21252078 
Note: See TracChangeset for help on using the changeset viewer.