Changeset 7657 for trunk/expressoMail1_2
- Timestamp:
- 12/14/12 17:37:05 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expressoMail1_2/js/main.js
r7641 r7657 2112 2112 function new_message(type, border_ID, flagged) 2113 2113 { 2114 // if there's a reply already open, just switch to it 2115 reply_tab_id = border_ID.replace('_r', ''); 2116 if (openTab.type[reply_tab_id] == tabTypes[type]) 2114 action_tab_id = border_ID.replace('_r', ''); 2115 if (openTab.type[action_tab_id]) 2117 2116 { 2118 alternate_border(reply_tab_id); 2119 resizeWindow(); 2120 return; 2121 } 2122 2123 if (RichTextEditor.editorReady === false) return false; 2124 2125 RichTextEditor.editorReady = false; 2126 2127 2128 if (Element('show_img_link_' + border_ID)) 2129 { 2130 show_msg_img(border_ID.match(/^\d*/)[0], Element('input_folder_' + border_ID).value); 2131 } 2132 var new_border_ID = draw_new_message((type == 'new') ? parseInt(border_ID.replace('_r','')) : border_ID.replace('_r','')); 2133 2134 if (typeof (openTab.type[new_border_ID]) != "undefined") 2135 { 2136 if (tabTypes[type] == openTab.type[new_border_ID]) 2117 // if there's a reply already open, just switch to it 2118 if (openTab.type[action_tab_id] == tabTypes[type]) 2137 2119 { 2138 if (type != 'edit') 2139 { 2140 delete_border(currentTab); 2141 new_border_ID = draw_new_message(border_ID); 2142 } 2120 alternate_border(action_tab_id); 2121 resizeWindow(); 2122 return action_tab_id; 2143 2123 } 2144 2124 else 2145 2125 { 2126 // if not, ask the user: 2146 2127 var a_types = { 2147 2128 6: get_lang("Forward"), … … 2151 2132 10: get_lang("Reply to all without history") 2152 2133 }; 2153 if (new_border_ID != 0) if (!confirm(get_lang("Your message to %1 has not been saved or sent. " + 2154 "To %2 will be necessary open it again. Discard your message?", 2155 a_types[openTab.type[new_border_ID]].toUpperCase(), 2156 a_types[tabTypes[type]].toUpperCase()))) 2157 { 2158 return new_border_ID; 2159 } 2160 else 2134 var response = confirm( 2135 get_lang( 2136 "Your message to %1 has not been saved or sent. " + 2137 "To %2 will be necessary open it again. Discard your message?", 2138 a_types[openTab.type[action_tab_id]].toUpperCase(), 2139 a_types[tabTypes[type]].toUpperCase() 2140 ) 2141 ); 2142 if (response) 2143 { 2144 alternate_border(action_tab_id); 2145 resizeWindow(); 2146 delete_border(currentTab); 2147 } 2148 else 2149 { 2150 return action_tab_id; 2151 } 2152 } 2153 } 2154 2155 if (RichTextEditor.editorReady === false) return false; 2156 2157 RichTextEditor.editorReady = false; 2158 2159 2160 if (Element('show_img_link_' + border_ID)) 2161 { 2162 show_msg_img(border_ID.match(/^\d*/)[0], Element('input_folder_' + border_ID).value); 2163 } 2164 var new_border_ID = draw_new_message((type == 'new') ? parseInt(border_ID.replace('_r','')) : border_ID.replace('_r','')); 2165 2166 // Does this block has any purpose at all? 2167 if (typeof (openTab.type[new_border_ID]) != "undefined") 2168 { 2169 if (tabTypes[type] == openTab.type[new_border_ID]) 2170 { 2171 if (type != 'edit') 2161 2172 { 2162 2173 delete_border(currentTab);
Note: See TracChangeset
for help on using the changeset viewer.