From ed5d29f4b3c57235594931d33dde7cccaf7cd58b Mon Sep 17 00:00:00 2001 From: thomascube Date: Thu, 25 May 2006 18:25:04 +0000 Subject: Finalized GoogieSpell integration --- program/js/app.js | 11 ++++++++++- program/js/googiespell.js | 12 +++++++++++- 2 files changed, 21 insertions(+), 2 deletions(-) (limited to 'program/js') diff --git a/program/js/app.js b/program/js/app.js index ae6b00f6a..98a30d330 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -142,7 +142,11 @@ function rcube_webmail() } if (this.env.action=='compose') + { this.enable_command('add-attachment', 'send-attachment', 'send', true); + if (this.env.spellcheck) + this.enable_command('spellcheck', true); + } if (this.env.messagecount) this.enable_command('select-all', 'select-none', 'sort', 'expunge', true); @@ -875,7 +879,12 @@ function rcube_webmail() parent.location.href = url; else location.href = url; - break; + break; + + case 'spellcheck': + if (this.env.spellcheck && this.env.spellcheck.spellCheck) + this.env.spellcheck.spellCheck(this.env.spellcheck.check_link); + break; case 'send': if (!this.gui_objects.messageform) diff --git a/program/js/googiespell.js b/program/js/googiespell.js index 25f9526cd..f318e192c 100755 --- a/program/js/googiespell.js +++ b/program/js/googiespell.js @@ -1035,16 +1035,24 @@ GoogieSpell.getEventElm = function(e) { } GoogieSpell.prototype.removeIndicator = function(elm) { - AJS.removeElement(this.indicator); + // modified by roundcube + if (window.rcube_webmail_client) + rcube_webmail_client.set_busy(false); + //AJS.removeElement(this.indicator); } GoogieSpell.prototype.appendIndicator = function(elm) { + // modified by roundcube + if (window.rcube_webmail_client) + rcube_webmail_client.set_busy(true, 'checking'); +/* var img = AJS.IMG({'src': this.img_dir + 'indicator.gif', 'style': 'margin-right: 5px;'}); img.style.width = "16px"; img.style.height = "16px"; this.indicator = img; img.style.textDecoration = "none"; AJS.insertBefore(img, elm); + */ } /**** @@ -1239,6 +1247,8 @@ GoogieSpell.prototype.checkSpellingState = function() { me.spellCheck(span_chck); } AJS.appendChildNodes(this.spell_container, span_chck, " ", this.switch_lan_pic); + // modified by roundcube + this.check_link = span_chck; } GoogieSpell.prototype.setLanguages = function(lang_dict) { -- cgit v1.2.3