Changeset 4379


Ignore:
Timestamp:
05/12/11 16:19:38 (13 years ago)
Author:
alexandrecorreia
Message:

Ticket #1578 - Corrigido o envio de mensagem com imagem no corpo do e-mail

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

Legend:

Unmodified
Added
Removed
  • branches/2.2/expressoMail1_2/js/main.js

    r4331 r4379  
    17721772        if (data.append != true || !data) 
    17731773        { 
    1774                 RichTextEditor.saveFlag = -1; 
     1774                RichTextEditor.saveFlag = 0; 
    17751775                if (! data.append) 
    17761776                        if(data == 'Post-Content-Length') 
     
    17951795        else 
    17961796        { 
    1797                 RichTextEditor.saveFlag = 1; 
    17981797                openTab.imapUid[border_id] = data.msg_no; 
    17991798                openTab.imapBox[border_id] = data.folder_id; 
     
    19171916                watch_changes_in_msg(border_id); 
    19181917                write_msg(get_lang('Your message was save as draft in folder %1.', lang_folder(folder_name))); 
     1918                setTimeout( function(){ RichTextEditor.saveFlag = 1; }, 1000 ); 
    19191919        } 
    19201920} 
     
    19751975 
    19761976 
    1977         if (is_ie){ 
     1977        if (is_ie) 
     1978        { 
    19781979                var i = 0; 
    19791980                while (document.forms(i).name != "form_message_"+border_id){i++} 
     
    19811982        } 
    19821983        else 
    1983                 form = document.forms["form_message_"+border_id]; 
     1984        {     
     1985            form = document.forms["form_message_"+border_id]; 
     1986        } 
     1987         
    19841988        form.appendChild(textArea); 
    19851989        form.appendChild(input_folder); 
  • branches/2.2/expressoMail1_2/js/rich_text_editor.js

    r4285 r4379  
    463463        RichTextEditor.saveFlag = 0; // See if save function finished 
    464464        var save_link = document.getElementById("save_message_options_"+id); 
    465         //save_link.onclick = function () {}; 
    466465        save_msg(id,true); 
    467         setTimeout("RichTextEditor.insertImgHtml("+id+")",1000); 
    468 } 
    469  
    470 cRichTextEditor.prototype.insertImgHtml = function (id){ 
    471         if (RichTextEditor.saveFlag == 0) 
    472                 setTimeout("RichTextEditor.insertImgHtml("+id+")",500); 
     466        RichTextEditor.insertImgHtml(id); 
     467} 
     468 
     469cRichTextEditor.prototype.insertImgHtml = function (id) 
     470{ 
     471        if ( RichTextEditor.saveFlag == 0 ) 
     472        { 
     473            setTimeout( function(){ RichTextEditor.insertImgHtml(id); },1000 ); 
     474        } 
    473475        else 
    474                 if (RichTextEditor.saveFlag == 1) 
    475                 { 
    476                         this.editorCommand('Image', './inc/show_embedded_attach.php?msg_folder=INBOX/'+draftsfolder+'&msg_num='+openTab.imapUid[id]+'&msg_part='+(openTab.countFile[id]+1)); 
    477                         // this.editorCommand('Image', '.inc/gotodownload.php?msg_folder="+msg_folder+"&msg_number="+msg_number+"&idx_file="+idx_file+"&msg_part="+msg_part+params')); 
    478                         openTab.toPreserve[id] = true; 
    479                         save_msg(id,true); 
    480                 } 
     476        { 
     477            if ( RichTextEditor.saveFlag == 1 ) 
     478            { 
     479                var folderNameDraft = "INBOX" + cyrus_delimiter + draftsfolder; 
     480                this.editorCommand('Image', './inc/show_embedded_attach.php?msg_folder=' + folderNameDraft + '&msg_num='+openTab.imapUid[id]+'&msg_part='+(openTab.countFile[id]+1)); 
     481                openTab.toPreserve[id] = true; 
     482                save_msg(id,true); 
     483            } 
     484        } 
    481485} 
    482486 
     
    570574                form_upload.style.left = "5px"; 
    571575                form_upload.name = get_lang("Upload File"); 
    572                 form_upload.style.width = "450px"; 
    573                 form_upload.style.height = "75px"; 
     576                form_upload.style.width = "550px"; 
     577                form_upload.style.height = "100px"; 
    574578                form_upload.innerHTML = get_lang('Select the desired image file')+':<br>'+ 
    575                                                                 '<input name="image_at" maxlength="255" size="50" id="inputFile_img" type="file"><br>' + 
    576                                                                 '<input title="' + get_lang('Include') + '"  value="' + get_lang('Include') + '"' + 'type="button" onclick="RichTextEditor.addInputFile();">&nbsp;' + 
    577                                                                 '<input title="' + get_lang('Close') + '"  value="' + get_lang('Close') + '"' + 
    578                                                                 ' type="button" onclick="win.close()">'; 
     579                                        '<input name="image_at" maxlength="255" size="50" id="inputFile_img" type="file"><br/><br/>' + 
     580                                        '<input title="' + get_lang('Include') + '"  value="' + get_lang('Include') + '"' + 'type="button" onclick="RichTextEditor.addInputFile();">&nbsp;' + 
     581                                        '<input title="' + get_lang('Close') + '"  value="' + get_lang('Close') + '"' + 
     582                                        ' type="button" onclick="win.close()">'; 
     583                                     
    579584                form.appendChild(form_upload); 
    580585                 
Note: See TracChangeset for help on using the changeset viewer.