Changeset 6882 for trunk/expressoMail1_2/js
- Timestamp:
- 07/26/12 11:49:17 (12 years ago)
- Location:
- trunk/expressoMail1_2/js
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expressoMail1_2/js/draw_api.js
r6861 r6882 2813 2813 reply_to_values.type = "HIDDEN"; 2814 2814 reply_to_values.value = info_msg.reply_to; //Veio do IMAP, sem images nem links. 2815 reply_to.innerHTML = draw_plugin_cc(ID, info_msg.reply_to); 2815 $.each(break_comma(info_msg.reply_to), function(index, value){ 2816 reply_to.innerHTML += draw_plugin_cc(ID, value); 2817 }) 2816 2818 reply_to.className = "header_message_field"; 2817 2819 tr11.appendChild(td11); … … 2887 2889 cc_values.value = info_msg.cc; 2888 2890 2889 ccaddress_array[ID] = info_msg.cc.split(",");2891 ccaddress_array[ID] = break_comma(info_msg.cc); 2890 2892 if (ccaddress_array[ID].length > 1){ 2891 2893 var div_ccaddress = document.createElement("SPAN"); … … 3367 3369 //window.setTimeout(function() { $("#div_message_scroll_"+ID).focus() },250); 3368 3370 3369 /*3370 * @AUTHOR Marcos Luiz Wilhelm3371 * @DATE 2012/07/173372 * @BRIEF Break out emails only with comma out of quote marks3373 */3374 function break_comma (originalText){3375 var quotesMarks = false;3376 var completeString = "";3377 var brokenEmails = new Array();3378 originalText+=",";3379 for(i=0; i<originalText.length; i++){3380 var character = originalText.substr(i,1);3381 if(character == "\""){3382 quotesMarks = !quotesMarks;3383 }3384 if(!quotesMarks){3385 if(character == ","){3386 brokenEmails.push(completeString);3387 completeString = "";3388 }3389 else3390 completeString+=character;3391 }3392 else3393 completeString+=character;3394 }3395 return brokenEmails;3396 }3397 3398 3371 function mailto( link ) 3399 3372 { … … 4345 4318 change_text($(this).find(".ui-button-text"), get_lang("Add CC"), get_lang('Remove CC')); 4346 4319 }) 4320 //Botão Responder a 4321 .end().filter(".reply-to-button").click(function(){ 4322 show_hide(content.find(".reply-to-tr"), $(this)); 4323 }); 4347 4324 4348 4325 //BOTAO ENVIAR -
trunk/expressoMail1_2/js/main.js
r6863 r6882 1819 1819 if (document.getElementById("body_" + border_ID)) 1820 1820 data.body = document.getElementById("body_" + border_ID).innerHTML; 1821 if (document.getElementById("from_values_" + border_ID)) 1822 data.from = document.getElementById("from_values_"+border_ID).value; 1821 1823 if (Element('date_' + border_ID)){ 1822 1824 data.date = Element('date_' + border_ID).innerHTML; … … 1842 1844 var content = $("#content_id_"+new_border_ID); 1843 1845 1844 1845 1846 switch(type){ 1846 1847 case "reply_without_history": … … 1861 1862 break; 1862 1863 case "reply_with_history": 1863 1864 1864 RichTextEditor.replyController = true; //Seta o editor como modo reply 1865 1865 title = "Re: " + html_entities(data.subject); … … 1868 1868 1869 1869 draw_reply_boxes_by_field("to", data.to, content); 1870 1871 1870 content.find('[name="msg_reply_from"]').val($("#msg_number_" + border_ID).val()); 1872 1873 block_quoted_body = make_body_reply(data.body, data.to, data.date_day, data.date_hour); 1871 block_quoted_body = make_body_reply(data.body, data.from, data.date_day, data.date_hour); 1874 1872 1875 1873 useOriginalAttachments(new_border_ID,border_ID); … … 1971 1969 content.find(".subject").val("Re: " + data.subject); 1972 1970 1973 block_quoted_body = make_body_reply(data.body, data. to, data.date_day, data.date_hour);1971 block_quoted_body = make_body_reply(data.body, data.from, data.date_day, data.date_hour); 1974 1972 1975 1973 useOriginalAttachments(new_border_ID,border_ID); … … 2111 2109 //DESENHA OS RETANGULOS PARA OS E-MAIL NA OPÇÃO REPLY 2112 2110 function draw_reply_boxes_by_field(field, value, context){ 2113 array = value.split(",");2111 array = break_comma(value); 2114 2112 $.each(array, function(index, value){ 2115 2113 draw_email_box(value, context.find("."+field).filter("input")); … … 2708 2706 //stringEmail = content.find('[name="input_to"]').val(); 2709 2707 2708 var stringReply = ""; 2709 var array = content.find(".reply-to-tr").find(".box"); 2710 $.each(array, function(index, value){ 2711 stringReply += $(value).find("input").val() + ","; 2712 }); 2713 content.find('[name="input_reply_to"]').val(stringReply); 2714 2710 2715 var stringEmail = ""; 2711 2716 var stringToEmail = ""; … … 2845 2850 /////////////////////////////////////////// 2846 2851 var content = $("#content_id_"+border_id); 2852 2853 2854 var array = content.find(".reply-to-tr").find(".box"); 2855 var stringReplyToEmail = ""; 2856 $.each(array, function(index, value){ 2857 stringReplyToEmail += $(value).find("input").val() + ","; 2858 }); 2859 content.find('[name="input_reply_to"]').val(stringReplyToEmail); 2847 2860 2848 2861 var stringEmail = ""; … … 4296 4309 } 4297 4310 4311 /* 4312 * @author Marcos Luiz Wilhelm (marcoswilhelm@gmail.com) 4313 * @date 2012/07/17 4314 * @brief Break out emails only with comma out of quote marks 4315 */ 4316 function break_comma (originalText){ 4317 var quotesMarks = false; 4318 var completeString = ""; 4319 var brokenEmails = new Array(); 4320 originalText+=","; 4321 for(i=0; i<originalText.length; i++){ 4322 var character = originalText.substr(i,1); 4323 if(character == "\""){ 4324 quotesMarks = !quotesMarks; 4325 } 4326 if(!quotesMarks){ 4327 if(character == ","){ 4328 brokenEmails.push(completeString); 4329 completeString = ""; 4330 } 4331 else 4332 completeString+=character; 4333 } 4334 else 4335 completeString+=character; 4336 } 4337 return brokenEmails; 4338 } 4339 4298 4340 DataLayer.links('message'); 4299 4341 DataLayer.poll('message',30);
Note: See TracChangeset
for help on using the changeset viewer.