Ignore:
Timestamp:
03/28/13 16:24:07 (11 years ago)
Author:
marcosw
Message:

Ticket #3331 - Correção para inconsistência ao salvar mensagem e remover anexos

File:
1 edited

Legend:

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

    r8062 r8063  
    47664766    fileUploadMSG.find(' .attachments-list').show();  
    47674767    var att = new Object();  
    4768     att.folder = folder_name;  
    4769     att.uid = message_number;  
    4770     att.type = 'imapMSG';  
    4771     att.name = Base64.encode(onceOpenedHeadersMessages[folder_name][message_number].subject + '.eml');  
    4772     var idATT = JSON.stringify(att);  
    4773     addAttachment(ID, idATT);  
     4768 
     4769    
     4770 
    47744771    var attach = {};  
    47754772    attach.fileName = onceOpenedHeadersMessages[folder_name][message_number].subject + '.eml';  
     
    48064803    });  
    48074804  
    4808     fileUploadMSG.find('.attachments-list').append(upload);  
    4809   
    4810     upload.find('.att-box-loading').remove();  
    4811   
    4812     fileUploadMSG.find('.attachments-list .att-box:last').qtip(  
    4813     {  
    4814         content: DataLayer.render("../prototype/modules/mail/templates/attachment_add_itemlist_tooltip.ejs", {  
    4815             attach: attach  
    4816         }),  
    4817         position: {  
    4818             corner: {  
    4819                 tooltip: 'bottomMiddle',  
    4820                 target: 'topMiddle'  
     4805    var addtip = function(attach){ 
     4806        fileUploadMSG.find('.attachments-list .att-box:last').qtip(  
     4807        {  
     4808            content: DataLayer.render("../prototype/modules/mail/templates/attachment_add_itemlist_tooltip.ejs", {  
     4809                attach: attach  
     4810            }),  
     4811            position: {  
     4812                corner: {  
     4813                    tooltip: 'bottomMiddle',  
     4814                    target: 'topMiddle'  
     4815                },  
     4816                adjust: {  
     4817                    resize: true,  
     4818                    scroll: true  
     4819                }  
    48214820            },  
    4822             adjust: {  
    4823                 resize: true,  
    4824                 scroll: true  
     4821            show: {  
     4822                when: 'mouseover',  
     4823                // Don't specify a show event  
     4824                ready: false // Show the tooltip when ready  
     4825            },  
     4826            hide: 'mouseout',  
     4827            // Don't specify a hide event  
     4828            style: {  
     4829                border: {  
     4830                    width: 1,  
     4831                    radius: 5  
     4832                },  
     4833                width: {  
     4834                    min: 75,  
     4835                    max: 1000  
     4836                },  
     4837                padding: 5,  
     4838                textAlign: 'center',  
     4839                tip: true,  
     4840                // Give it a speech bubble tip with automatic corner detection  
     4841                name: 'blue' // Style it according to the preset 'cream' style  
    48254842            }  
    4826         },  
    4827         show: {  
    4828             when: 'mouseover',  
    4829             // Don't specify a show event  
    4830             ready: false // Show the tooltip when ready  
    4831         },  
    4832         hide: 'mouseout',  
    4833         // Don't specify a hide event  
    4834         style: {  
    4835             border: {  
    4836                 width: 1,  
    4837                 radius: 5  
    4838             },  
    4839             width: {  
    4840                 min: 75,  
    4841                 max: 1000  
    4842             },  
    4843             padding: 5,  
    4844             textAlign: 'center',  
    4845             tip: true,  
    4846             // Give it a speech bubble tip with automatic corner detection  
    4847             name: 'blue' // Style it according to the preset 'cream' style  
    4848         }  
    4849     });  
     4843        });  
     4844    }  
     4845 
     4846    if(folder_name.indexOf("local_messages_") != 0) 
     4847    { 
     4848        att.folder = folder_name;  
     4849        att.uid = message_number;  
     4850        att.type = 'imapMSG';  
     4851        att.name = Base64.encode(onceOpenedHeadersMessages[folder_name][message_number].subject + '.eml');  
     4852        var idATT = JSON.stringify(att);  
     4853        addAttachment(ID, idATT);  
     4854 
     4855        fileUploadMSG.find('.attachments-list').append(upload); 
     4856        addtip(attach); 
     4857    } 
     4858    else 
     4859    { 
     4860        var folder_trash = "INBOX"+cyrus_delimiter+special_folders["Trash"]; 
     4861        expresso_mail_archive.unarchieveToAttach(folder_name, folder_trash, message_number, function(data){ 
     4862            $.ajax({ 
     4863                url: "controller.php?action=$this.imap_functions.get_info_msg_archiver", 
     4864                data:  {"idMsgs":data.idsMsg}, 
     4865                type: 'POST', 
     4866                async: false, 
     4867                success: function(data){ 
     4868                    data = JSON.parse(connector.unserialize(data)); 
     4869                    data = data[0]; 
     4870                    att.folder = folder_trash; 
     4871                    att.uid = data.uid;  
     4872                    att.type = 'imapMSG';  
     4873                    att.name = Base64.encode(onceOpenedHeadersMessages[folder_name][message_number].subject + '.eml');  
     4874                    var idATT = JSON.stringify(att);  
     4875                    addAttachment(ID, idATT); 
     4876                    fileUploadMSG.find('.attachments-list').append(upload); 
     4877                    addtip(attach); 
     4878                }, 
     4879            }); 
     4880        });  
     4881    } 
     4882    upload.find('.att-box-loading').remove();      
    48504883} 
    48514884                 
     
    52455278                                        if (message) { 
    52465279                                                /* Anexa a mensagem especificada (por folder e id_msg)  
    5247                                                    na mensagem sendo criada.*/  
     5280                                                   na mensagem sendo criada.*/ 
    52485281                                                attach_message(folder_name, message_number); 
    52495282                                        } 
Note: See TracChangeset for help on using the changeset viewer.