Fixed bug #1104 : subject is used as title always

When the windows were opened, subject was not used as title.
This commit is contained in:
Luc Charland
2012-09-26 11:28:18 -04:00
parent bc4e281e0f
commit 96a035a4ca
3 changed files with 11 additions and 1 deletions
+1 -1
View File
@@ -16,7 +16,7 @@
<table class="mailer_fieldtable">
<tr class="mailer_fieldrow">
<td class="mailer_fieldname" ><var:string label:value="Subject"/>:</td>
<td class="mailer_subjectfieldvalue"><var:string value="messageSubject"/></td>
<td class="mailer_subjectfieldvalue" id="subject"><var:string value="messageSubject"/></td>
</tr>
<tr class="mailer_fieldrow">
<td class="mailer_fieldname" ><var:string label:value="From"/>:</td>
+6
View File
@@ -423,6 +423,12 @@ function initMailEditor() {
configureDragHandle();
// Set current subject as window title if not set, use '(Untitled)'
if (document.pageform.subject.value == "")
document.title = '(' + _("Untitled") + ')';
else
document.title = _(document.pageform.subject.value);
// Change the window title when typing the subject
$$("div#subjectRow input").first().on("keyup", updateWindowTitleFromSubject);
@@ -16,6 +16,10 @@ function initPopupMailer(event) {
window.messageUID = mailboxName + "/" + messageName;
handleReturnReceipt();
var td = $("subject");
if (td)
document.title = td.allTextContent();
}
function onICalendarButtonClick(event) {