From: Michael M Slusarz Date: Fri, 18 Dec 2009 21:56:36 +0000 (-0700) Subject: RTELoading tweaks; disable RTE when sending/saving message X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=0532addc71c7fcfb0fe2cee67ff3ebf14755bdc4;p=horde.git RTELoading tweaks; disable RTE when sending/saving message --- diff --git a/imp/js/compose-dimp.js b/imp/js/compose-dimp.js index d679f7012..9eed0c756 100644 --- a/imp/js/compose-dimp.js +++ b/imp/js/compose-dimp.js @@ -338,6 +338,9 @@ var DimpCompose = { if (DIMP.SpellCheckerObject) { DIMP.SpellCheckerObject.disable(disable); } + if (this.editor_on) { + this.RTELoading(disable ? 'show' : 'hide', true); + } }, onNoSpellError: function(action) @@ -399,16 +402,23 @@ var DimpCompose = { $('html').setValue(this.editor_on ? 1 : 0); }, - RTELoading: function(cmd) - { - var o, r; - if (!$('rteloading')) { - r = new Element('DIV', { id: 'rteloading' }).clonePosition($('composeMessageParent')); - $(document.body).insert(r); - o = r.viewportOffset(); - $(document.body).insert(new Element('SPAN', { id: 'rteloadingtxt' }).setStyle({ top: (o.top + 15) + 'px', left: (o.left + 15) + 'px' }).insert(DIMP.text.loading)); - } - $('rteloading', 'rteloadingtxt').invoke(cmd); + RTELoading: function(cmd, notxt) + { + var o; + + if (!$('rteloading')) { + $(document.body).insert(new Element('DIV', { id: 'rteloading' }).hide()).insert(new Element('SPAN', { id: 'rteloadingtxt' }).hide().insert(DIMP.text.loading)); + } + + if (cmd == 'hide') { + $('rteloading', 'rteloadingtxt').invoke('hide'); + } else { + $('rteloading').clonePosition('composeMessageParent').show(); + if (!notxt) { + o = $('rteloading').viewportOffset(); + $('rteloadingtxt').setStyle({ top: (o.top + 15) + 'px', left: (o.left + 15) + 'px' }).show(); + } + } }, getMsgAreaHeight: function() @@ -605,7 +615,6 @@ var DimpCompose = { if (this.editor_on) { this.rte.resize('100%', this.getMsgAreaHeight(), false); - return; } if (!this.row_height) { diff --git a/imp/themes/screen-dimp.css b/imp/themes/screen-dimp.css index 40d60ab08..df8ec678b 100644 --- a/imp/themes/screen-dimp.css +++ b/imp/themes/screen-dimp.css @@ -652,9 +652,9 @@ div.dimpActionsCompose, div.dimpActionsMsg { position: absolute; z-index: 100; background-color: #000; - filter: alpha(opacity=50); - -moz-opacity: .5; - opacity: .5; + filter: alpha(opacity=35); + -moz-opacity: .35; + opacity: .35; } #rteloadingtxt { position: absolute;