Changeset 4450 for branches/2.2.0.1


Ignore:
Timestamp:
05/19/11 09:50:56 (13 years ago)
Author:
rafaelraymundo
Message:

Ticket #1726 - Corrigido o envio de mensagem com imagem no corpo do e-mail. r4379

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

Legend:

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

    r4349 r4450  
    17651765        if (data.append != true || !data) 
    17661766        { 
    1767                 RichTextEditor.saveFlag = -1; 
     1767                RichTextEditor.saveFlag = 0; 
    17681768                if (! data.append) 
    17691769                        if(data == 'Post-Content-Length') 
     
    17881788        else 
    17891789        { 
    1790                 RichTextEditor.saveFlag = 1; 
    17911790                openTab.imapUid[border_id] = data.msg_no; 
    17921791                openTab.imapBox[border_id] = data.folder_id; 
     
    19101909                watch_changes_in_msg(border_id); 
    19111910                write_msg(get_lang('Your message was save as draft in folder %1.', lang_folder(folder_name))); 
     1911                setTimeout( function(){ RichTextEditor.saveFlag = 1; }, 1000 ); 
    19121912        } 
    19131913} 
     
    19681968 
    19691969 
    1970         if (is_ie){ 
     1970        if (is_ie) 
     1971        { 
    19711972                var i = 0; 
    19721973                while (document.forms(i).name != "form_message_"+border_id){i++} 
     
    19741975        } 
    19751976        else 
     1977        { 
    19761978                form = document.forms["form_message_"+border_id]; 
     1979        } 
     1980         
    19771981        form.appendChild(textArea); 
    19781982        form.appendChild(input_folder); 
  • branches/2.2.0.1/expressoMail1_2/js/rich_text_editor.js

    r4296 r4450  
    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')); 
     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)); 
    478481                        openTab.toPreserve[id] = true; 
    479482                        save_msg(id,true); 
    480                 } 
     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>' + 
     579                                                                '<input name="image_at" maxlength="255" size="50" id="inputFile_img" type="file"><br/><br/>' + 
    576580                                                                '<input title="' + get_lang('Include') + '"  value="' + get_lang('Include') + '"' + 'type="button" onclick="RichTextEditor.addInputFile();">&nbsp;' + 
    577581                                                                '<input title="' + get_lang('Close') + '"  value="' + get_lang('Close') + '"' + 
    578582                                                                ' type="button" onclick="win.close()">'; 
     583                                                             
    579584                form.appendChild(form_upload); 
    580585                 
Note: See TracChangeset for help on using the changeset viewer.