From 14586d251e5922b168a6157ad9f972b7faf4a764 Mon Sep 17 00:00:00 2001 From: Luc Charland Date: Thu, 20 Sep 2012 13:46:23 -0400 Subject: [PATCH] fixed bug #1104 Titles of new messages' windows should reflect the subject --- UI/WebServerResources/UIxMailEditor.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/UI/WebServerResources/UIxMailEditor.js b/UI/WebServerResources/UIxMailEditor.js index 829b9c9de..d7fb2402e 100644 --- a/UI/WebServerResources/UIxMailEditor.js +++ b/UI/WebServerResources/UIxMailEditor.js @@ -104,6 +104,13 @@ function insertContact(inputNode, contactName, contactEmail) { inputNode.value = value; } +function updateWindowTitleFromSubject(event) { + if (this.value) { + document.title = this.value; + }else{ + document.title = _("Untitled"); + } +} /* mail editor */ @@ -416,6 +423,9 @@ function initMailEditor() { configureDragHandle(); + // Change the window title when typing the subject + $$("div#subjectRow input").first().on("keyup", updateWindowTitleFromSubject); + var composeMode = UserDefaults["SOGoMailComposeMessageType"]; if (composeMode == "html") { CKEDITOR.replace('text',