Changeset 5911 for trunk/expressoMail1_2/js/rich_text_editor.js
- Timestamp:
- 04/11/12 11:35:15 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expressoMail1_2/js/rich_text_editor.js
r5745 r5911 55 55 cRichTextEditor.prototype.fromJSON = function( value ) 56 56 { 57 return (new Function( "return " + this.decode64( value )))(); 57 if(!value) 58 return ''; 59 return (new Function( "return " + this.decode64( value )))(); 58 60 } 59 61 … … 111 113 RichTextEditor.active(pObj); 112 114 } 115 116 cRichTextEditor.prototype.loadEditor2 = function(ID) { 117 var pObj = "body_" + ID; 118 RichTextEditor.plain[ID] = false; 119 120 if(preferences.plain_text_editor == 1) 121 { 122 RichTextEditor.plain[ID] = true; 123 RichTextEditor.editorReady = true; 124 } 125 else 126 RichTextEditor.active(pObj); 127 } 128 113 129 114 130 cRichTextEditor.prototype.getSignaturesOptions = function() { … … 152 168 var editor = CKEDITOR.instances[inst]; 153 169 var id = inst.replace('body_',''); 170 var content = $("#content_id_"+id) 154 171 editor.document.on('keydown', function(event) 155 172 { 156 173 away = false; 157 var save_link = Element("save_message_options_"+id); 158 save_link.onclick = function onclick() {openTab.toPreserve[id] = true;save_msg(id);} ; 159 $("#save_message_options_"+id).button({ disabled: false }); 174 var save_link = content.find(".save"); 175 save_link.click(function(){ 176 openTab.toPreserve[id] = true;save_msg(id); 177 }); 178 save_link.button({ disabled: false }); 160 179 }); 161 180 … … 186 205 cRichTextEditor.prototype.setPlain = function (active,id){ 187 206 RichTextEditor.plain[id] = active; 207 var content = $("#content_id_"+id); 188 208 if(active === true) 189 209 { … … 194 214 $('#body_'+id).keydown(function(event) { 195 215 away = false; 196 var save_link = Element("save_message_options_"+id);216 save_link = content.find(".save")[0]; 197 217 save_link.onclick = function onclick() {openTab.toPreserve[id] = true;save_msg(id);} ; 198 218 $("#save_message_options_"+id).button({ disabled: false }); … … 305 325 height -= 375; 306 326 $('#'+id).ckeditor( 307 function() {RichTextEditor.execPosInstance(id)}, 308 { 309 toolbar:'mail', 310 height: height 311 }); 312 $("[name=textplain_rt_checkbox_"+just_id+"]").button({ disabled: false }); 327 function() { 328 RichTextEditor.execPosInstance(id) 329 }, 330 { 331 toolbar:'mail', 332 height: height 333 } 334 ); 335 //$("[name=textplain_rt_checkbox_"+just_id+"]").button({ disabled: false }); 313 336 } 314 337 cRichTextEditor.prototype.focus = function(id)
Note: See TracChangeset
for help on using the changeset viewer.