set the windowtitle according to the mailsubject

This commit is contained in:
Klaus Leithoff 2009-07-02 10:28:47 +00:00
parent 9e1ea42649
commit 0e7aa7d2e7
5 changed files with 24 additions and 3 deletions

View File

@ -837,7 +837,7 @@
}
if(($_GET['menuaction'] == 'felamimail.uidisplay.printMessage') || (!empty($printing) && $printing == 1)) {
$GLOBALS['egw']->js->set_onload('javascript:window.print()');
$GLOBALS['egw']->js->set_onload('javascript:updateTitle();javascript:window.print()');
}
if($_GET['menuaction'] == 'felamimail.uidisplay.printMessage' || (!empty($printing) && $printing == 1) ||

View File

@ -41,6 +41,8 @@ function initAll()
{
//tab.init();
//alert(document.onkeydown);
var titletext = document.getElementById('fm_compose_subject').value;
if (titletext.length>0) updateTitle(titletext);
}
function addEmail(to,email)

View File

@ -36,6 +36,16 @@ function initAll()
fm_resizeBodyDIV();
window.onresize = fm_resizeBodyDIV;
}
updateTitle();
}
function updateTitle() {
var _text = document.getElementById('subjectDATA').firstChild.nodeValue;
if(_text.length>40) {
_text = _text.substring(0,40) + '...';
}
document.title = _text;
}
function toggleHeaderSize() {

View File

@ -8,7 +8,7 @@ self.focus();
{navbar}
</div>
<div id="subjectDIV" style="border: 0px solid green; margin:0px; padding:0px; left:0px;">
<span style="padding-left:2px; font-size: 110%;">{subject_data}</span>
<span id="subjectDATA" style="padding-left:2px; font-size: 110%;">{subject_data}</span>
</div>
<div id="headerDIV">
{header}

View File

@ -1,4 +1,13 @@
<!-- BEGIN message_main -->
<script language="JavaScript1.2">
function updateTitle() {
var _text = document.getElementById('subjectDATA').title;
if(_text.length>40) {
_text = _text.substring(0,40) + '...';
}
document.title = _text;
}
</script>
<STYLE type="text/css">
.subjectBold {
font-size: 110%;
@ -19,7 +28,7 @@
<tr style="background: white;">
<td colspnan="2" style="font-weight:bold; text-align: center; font-size: 120%;">
<a class="{row_css_class}" name="subject_url" href="{url_read_message}" target="{read_message_windowName}" title="{full_subject_data}">{subject_data}</a>
<a id="subjectDATA" class="{row_css_class}" name="subject_url" href="{url_read_message}" target="{read_message_windowName}" title="{full_subject_data}">{subject_data}</a>
</td>
</tr>
</table>