Recheck HTML composition box if toggle is canceled
authorMichael M Slusarz <slusarz@curecanti.org>
Mon, 19 Oct 2009 19:23:51 +0000 (13:23 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Tue, 20 Oct 2009 04:37:56 +0000 (22:37 -0600)
imp/js/compose-dimp.js

index e719a18..c5bdacc 100644 (file)
@@ -370,13 +370,6 @@ var DimpCompose = {
         $('rteloading', 'rteloadingtxt').invoke(cmd);
     },
 
-    toggleHtmlCheckbox: function()
-    {
-        if (!this.editor_on || window.confirm(DIMP.text_compose.toggle_html)) {
-            this.toggleHtmlEditor();
-        }
-    },
-
     getMsgAreaHeight: function()
     {
         if (!this.mp_padding) {
@@ -692,7 +685,11 @@ var DimpCompose = {
                 break;
 
             case 'htmlcheckbox':
-                this.toggleHtmlCheckbox();
+                if (!this.editor_on || window.confirm(DIMP.text_compose.toggle_html)) {
+                    this.toggleHtmlEditor();
+                } else {
+                    $('htmlcheckbox').checked = true;
+                }
                 break;
 
             case 'sendcc':