Changeset 4252 for branches/2.2.0.1/expressoMail1_2/js/main.js
- Timestamp:
- 05/06/11 16:17:48 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.0.1/expressoMail1_2/js/main.js
r4197 r4252 79 79 80 80 cExecute ("$this.functions.get_preferences", save_preferences); 81 cExecute ("phpgwapi.browser.isMobile", function( data ) 82 { 83 mobile_device = ( ( data.constructor == Boolean ) ? data : ( data === 'true' ) ); 84 } ); 81 85 setTimeout('auto_refresh()', time_refresh); 82 86 … … 886 890 } 887 891 var new_border_ID = draw_new_message(parseInt(border_ID)); 888 889 892 if(typeof(openTab.type[new_border_ID]) != "undefined") { 890 893 if(tabTypes[type] == openTab.type[new_border_ID]) { … … 907 910 } 908 911 } 909 910 912 if (new_border_ID == false) 911 913 { … … 1637 1639 } 1638 1640 1639 if ( document.getElementById('viewsource_rt_checkbox ').checked == true )1640 document.getElementById('viewsource_rt_checkbox ').click();1641 if ( document.getElementById('viewsource_rt_checkbox_' + ID).checked == true ) 1642 document.getElementById('viewsource_rt_checkbox_' + ID).click(); 1641 1643 1642 1644 var save_link = Element("save_message_options_"+ID); … … 1649 1651 send_message_return(data, this.ID_tmp); // this is a hack to escape quotation form connector bug 1650 1652 }; 1653 1654 var mail_as_plain = document.getElementById( 'textplain_rt_checkbox_' + ID ); 1655 mail_as_plain = ( mail_as_plain ) ? mail_as_plain.checked : false; 1651 1656 1652 1657 var textArea = document.createElement("TEXTAREA"); … … 1654 1659 textArea.name = "body"; 1655 1660 body = document.getElementById("body_"+ID); 1656 textArea.value += '<body>\r\n'; 1657 textArea.value += body.contentWindow.document.body.innerHTML; 1658 textArea.value += '\r\n</body>'; 1661 textArea.value += ( ( mail_as_plain ) ? body.previousSibling.value : ( '<body>\r\n' + body.contentWindow.document.body.innerHTML + '\r\n</body>' ) ); 1659 1662 var input_folder = document.createElement("INPUT"); 1660 1663 input_folder.style.display='none'; … … 1690 1693 form.appendChild(input_folder); 1691 1694 form.appendChild(msg_id); 1695 1696 var mail_type = form.appendChild( document.createElement( 'input' ) ); 1697 mail_type.name = 'type'; 1698 mail_type.type = 'hidden'; 1699 mail_type.value = ( mail_as_plain ) ? 'plain' : 'html'; 1692 1700 1693 1701 var _subject = trim(Element("subject_"+ID).value); … … 1895 1903 withImage = false; 1896 1904 1897 var rt_checkbox = Element('viewsource_rt_checkbox ');1905 var rt_checkbox = Element('viewsource_rt_checkbox_' + ID); 1898 1906 if (rt_checkbox == null) 1899 1907 return false; … … 2228 2236 } else{ 2229 2237 show_attachs = ""; 2230 } 2231 2238 } 2232 2239 var current_path = window.location.href.substr(0,window.location.href.lastIndexOf("/")); 2233 2240 var window_print_head = window_print.document.getElementsByTagName("head")[0];
Note: See TracChangeset
for help on using the changeset viewer.