* Mail: update title of compose window with subject

This commit is contained in:
Ralf Becker 2014-12-12 15:28:53 +00:00
parent a87e9840fe
commit 87c442434e
2 changed files with 24 additions and 6 deletions

View File

@ -181,6 +181,8 @@ app.classes.mail = AppJS.extend(
this.compose_fieldExpander_init();
this.check_sharing_filemode();
this.subject2title();
// Set autosaving interval to 2 minutes for compose message
window.setInterval(function (){
that.saveAsDraft(null,that.et2.getWidgetById('button[saveAsDraft]'),'autosaving');
@ -4149,5 +4151,21 @@ app.classes.mail = AppJS.extend(
this.egw.message(this.egw.lang('Writable sharing required EPL version!'), 'info');
_widget.setValue('share_ro');
}
},
/**
* Write / update compose window title with subject
*
* @param {DOMNode} _node
* @param {et2_widget} _widget
*/
subject2title: function(_node, _widget)
{
if (!_widget) _widget = this.et2.getWidgetById('subject');
if (_widget && _widget.get_value())
{
document.title = _widget.get_value();
}
}
});

View File

@ -92,7 +92,7 @@
</row>
<row class="mailComposeHeaders">
<description value="Subject"/>
<textbox align="left" width="100%" id="subject" height="25"/>
<textbox align="left" width="100%" id="subject" height="25" onchange="app.mail.subject2title"/>
<checkbox statustext="Change editor type" label="HTML" id="mimeType" onchange="app.mail.submitOnChange" options=",, ,disable" tabindex="7"/>
</row>
<row>