Changeset 4909


Ignore:
Timestamp:
08/08/11 11:22:27 (10 years ago)
Author:
fernando-alberto
Message:

Ticket #1269 - Desenvolvimento da nova solucao de arquivamento local MailArchiver?, ajustes para exibicao na tela

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/js/mail_archiver.js

    r4899 r4909  
    343343                expresso_mail_archive.folder_destination = destination_folder; 
    344344             
     345            var fcaption = expresso_mail_archive.folder_destination; 
     346     
     347            for (var w=0; w < expresso_mail_archive.folders.length; w++){ 
     348                if(expresso_mail_archive.folders[w]["id"] == expresso_mail_archive.folder_destination){ 
     349                    fcaption = expresso_mail_archive.folders[w]["name"]; 
     350                    break; 
     351                } 
     352            } 
     353             
    345354            //window.alert('destination_folder = ' + expresso_mail_archive.folder_destination); 
    346355 
     
    350359                try{ 
    351360                    //Archive services needs session id, message source and destination folder 
    352                     document.getElementById('main_title').innerHTML = get_lang("Archiving message on folder") + " " + expresso_mail_archive.folder_destination +"..."; 
     361                    document.getElementById('main_title').innerHTML = get_lang("Archiving message on folder") + " " + fcaption +"..."; 
    353362                    ArchiveServices.archive(expresso_mail_archive.getArchiveOperationOK, expresso_mail_archive.getArchiveOperationFailure, sessid, data ,expresso_mail_archive.folder_destination); 
    354363                } 
     
    585594            } 
    586595            var n_demo = new dNode({id: localBaseName + expresso_mail_archive.folders[i]["id"], caption: folder_caption, onClick: "change_folder('"+ localBaseName + expresso_mail_archive.folders[i]["id"] +"','"+ localBaseName + expresso_mail_archive.folders[i]["id"]+"', '" + expresso_mail_archive.drawdata.treeName + "')", plusSign:expresso_mail_archive.folders[i]["haschild"]}); 
     596            //var n_demo = new dNode({id: localBaseName + expresso_mail_archive.folders[i]["name"], caption: folder_caption, onClick: "change_folder('"+ localBaseName + expresso_mail_archive.folders[i]["name"] +"','"+ localBaseName + expresso_mail_archive.folders[i]["name"]+"', '" + expresso_mail_archive.drawdata.treeName + "')", plusSign:expresso_mail_archive.folders[i]["haschild"]}); 
    587597             
    588598            //Adjust the id node names 
     
    633643//createFolder operation 
    634644MailArchiver.prototype.createFolder = function(parentFolder, folderName){ 
     645     
    635646    try{ 
    636647        ArchiveServices.createFolder(expresso_mail_archive.createFolderOperationOK, expresso_mail_archive.createFolderOperationFailure, sessid, parentFolder, folderName); 
     
    776787    var data_to_draw = expresso_mail_archive.drawdata.messagesList;   
    777788    //window.alert('data to draw =  ' + data_to_draw.length + '\ndata_to_draw[0].from.full = ' + print_r(data_to_draw)); 
     789    //window.alert('Current folder = ' + expresso_mail_archive.currentfolder + ' com ' + expresso_mail_archive.folders.length + ' folders.'); 
     790    var fcaption = expresso_mail_archive.currentfolder; 
    778791     
     792    for (var w=0; w < expresso_mail_archive.folders.length; w++){ 
     793        if(expresso_mail_archive.folders[w]["id"] == expresso_mail_archive.currentfolder){ 
     794            fcaption = expresso_mail_archive.folders[w]["name"]; 
     795            break; 
     796        } 
     797    } 
     798 
    779799    alternate_border(0); 
    780     Element("border_id_0").innerHTML = "&nbsp;" + lang_folder(expresso_mail_archive.currentfolder) + '&nbsp;<font face="Verdana" size="1" color="#505050">[<span id="new_m">&nbsp;</span> / <span id="tot_m"></span>]</font>'; 
     800    Element("border_id_0").innerHTML = "&nbsp;" + lang_folder(fcaption) + '&nbsp;<font face="Verdana" size="1" color="#505050">[<span id="new_m">&nbsp;</span> / <span id="tot_m"></span>]</font>'; 
    781801    draw_box(data_to_draw, expresso_mail_archive.currentfolder, true); 
    782802    draw_paging(expresso_mail_archive.drawdata.messagesList.length); 
     
    800820        //one address 
    801821        if(typeof(Fromdata.mailbox.length) == 'undefined'){ 
    802             var dataName = Fromdata.mailbox["@name"]; 
     822            var dataName = Fromdata.mailbox["@name"];                
    803823            var dataEmail = Fromdata.mailbox["@localPart"] + '@' + Fromdata.mailbox["@domain"]; 
     824            if(dataName == 'null') 
     825                dataName = dataEmail; 
    804826        } 
    805827        //address list: to header(msgs list), only first metters 
     
    807829            var dataName = Fromdata.mailbox[0]["@name"]; 
    808830            var dataEmail = Fromdata.mailbox[0]["@localPart"] + '@' + Fromdata.mailbox[0]["@domain"]; 
     831            if(dataName == 'null') 
     832                dataName = dataEmail; 
    809833        } 
    810834 
Note: See TracChangeset for help on using the changeset viewer.