From 76bd954d391651275d64807b45010f4f123b909f Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Sat, 14 Jan 2012 18:46:52 +0000 Subject: [PATCH] See ChangeLog. Monotone-Parent: 2dbc97722788e379c2eff9b155881604caafcc5a Monotone-Revision: 3e744adf6d88b705bf6f061fa57f78c957b69bfe Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2012-01-14T18:46:52 --- ChangeLog | 7 +++++++ UI/WebServerResources/UIxPreferences.js | 23 ++++++++++++++++------- 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index f2807b41c..a3a042401 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2012-01-17 Francis Lachapelle + + * UI/WebServerResources/UIxPreferences.js (initPreferences): When + the mail composer is set to use HTML, the reply position popup + menu is disabled. When switching to text-based message, + the popup menu is now correctly re-enabled. + 2012-01-13 Francis Lachapelle * SoObjects/Appointments/SOGoAppointmentFolder.m diff --git a/UI/WebServerResources/UIxPreferences.js b/UI/WebServerResources/UIxPreferences.js index f640d0244..b31a28d95 100644 --- a/UI/WebServerResources/UIxPreferences.js +++ b/UI/WebServerResources/UIxPreferences.js @@ -109,10 +109,10 @@ function _setupEvents() { // We check for non-null elements as replyPlacementList and composeMessagesType // might not be present if ModulesConstraints disable those elements if ($("replyPlacementList")) - $("replyPlacementList").observe ("change", onReplyPlacementListChange); + $("replyPlacementList").observe("change", onReplyPlacementListChange); if ($("composeMessagesType")) - $("composeMessagesType").observe ("change", onComposeMessagesTypeChange); + $("composeMessagesType").observe("change", onComposeMessagesTypeChange); // Note: we also monitor changes to the calendar categories. // See functions endEditable and onColorPickerChoice. @@ -188,15 +188,24 @@ function initPreferences() { } // Disable placement (after) if composing in HTML - if ($("composeMessagesType")) { - if ($("composeMessagesType").value == 1) { - $("replyPlacementList").selectedIndex = 0; - $("replyPlacementList").disabled = 1; + var button = $("composeMessagesType"); + if (button) { + if (button.value == 1) { + $("replyPlacementList").value = 0; + $("replyPlacementList").disabled = true; } onReplyPlacementListChange(); + button.on("change", function(event) { + if (this.value == 0) + $("replyPlacementList").disabled = false; + else { + $("replyPlacementList").value = 0; + $("replyPlacementList").disabled = true; + } + }); } - var button = $("addDefaultEmailAddresses"); + button = $("addDefaultEmailAddresses"); if (button) button.observe("click", addDefaultEmailAddresses);