From f5aeae8b66c1f362054494c8613f4dd554889463 Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Wed, 14 Mar 2012 20:06:16 +0000 Subject: [PATCH] See ChangeLog. Monotone-Parent: 3c7042f2811eba747bdbbd95d698d3f31d66d4a3 Monotone-Revision: ae57634798c522301af45e400fa849c606655634 Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2012-03-14T20:06:16 --- ChangeLog | 4 +++ NEWS | 3 +++ UI/WebServerResources/UIxPreferences.js | 34 +++++++++++++++++++++---- 3 files changed, 36 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 03d11afef..96431f497 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2012-03-14 Francis Lachapelle + * UI/WebServerResources/UIxPreferences.js (focusCKEditor) + (hideSignature): new functions to wait until the CKEditor is ready + before performing certain actions. Fixes a problem with IE. + * UI/WebServerResources/SOGoTimePicker.js (position): new method to be able to recompute the position of the widget. diff --git a/NEWS b/NEWS index 109b0360f..6c689aa8b 100644 --- a/NEWS +++ b/NEWS @@ -13,12 +13,15 @@ Enhancements - bundled a shell script to perform and manage backups using sogo-tool - increased the delay before starting drag and drop in Mail and Contacts module to improve the user experience with cheap mouses + - updated German translation + - updated Spanish (Spain) translation Bug Fixes - fixed escaping issue with PostgreSQL 8.1 - fixed resizing issue when editing an HTML message - fixed Spanish (Argentina) templates for mail reply and forward - we don't show public address books (from SOGoUserSources) on iOS 5.0.1 + - improved support for IE 1.3.12c (2012-02-15) ------------------- diff --git a/UI/WebServerResources/UIxPreferences.js b/UI/WebServerResources/UIxPreferences.js index 39a6caacb..c39d8ffa5 100644 --- a/UI/WebServerResources/UIxPreferences.js +++ b/UI/WebServerResources/UIxPreferences.js @@ -548,8 +548,11 @@ function onMailIdentitySignatureClick(event) { label, fields, "none"); + if (Prototype.Browser.IE) + // Overwrite some fixes from iefixes.css + dialog.setStyle({ width: 'auto', marginLeft: 'auto' }); + document.body.appendChild(dialog); - dialog.show(); dialogs[dialogId] = dialog; if ($("composeMessagesType").value != 0) { @@ -573,14 +576,36 @@ function onMailIdentitySignatureClick(event) { area.value = identity["signature"]; else area.value = ""; + + dialog.show(); $("bgDialogDiv").show(); - if (!CKEDITOR.instances["signature"]) + if (CKEDITOR.instances["signature"]) + focusCKEditor(); + else area.focus(); - event.stop(); + Event.stop(event); } } +function focusCKEditor() { + if (CKEDITOR.status != 'basic_ready') + setTimeout("focusCKEditor()", 100); + else + // CKEditor reports being ready but it's still not focusable; + // we wait for a few more milliseconds + setTimeout("CKEDITOR.instances.signature.focus()", 500); +} + +function hideSignature() { + if (CKEDITOR.status != 'basic_ready') + setTimeout("hideSignature()", 100); + else + // CKEditor reports being ready but it's not; + // we wait for a few more milliseconds + setTimeout('disposeDialog("signatureDialog")', 200); +} + function onMailIdentitySignatureOK(event) { var dialog = $("signatureDialog"); var mailAccount = dialog.mailAccount; @@ -594,8 +619,7 @@ function onMailIdentitySignatureOK(event) { : $("signature").value); identity["signature"] = content; displayAccountSignature(mailAccount); - dialog.hide(); - $("bgDialogDiv").hide(); + hideSignature(); dialog.mailAccount = null; var hasChanged = $("hasChanged"); hasChanged.value = "1";