mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-05 21:49:28 +01:00
backport of functionality to mark messages as read when navigating with next/previous buttons in message-view
This commit is contained in:
parent
b27b1e7b37
commit
9611d73062
@ -509,13 +509,17 @@
|
||||
'mailbox' => base64_encode($this->mailbox)
|
||||
);
|
||||
$previousURL = $GLOBALS['egw']->link('/index.php',$linkData);
|
||||
$previousURL = "window.location.href = '$previousURL'";
|
||||
$previousURL = "goToMessage('$previousURL')";
|
||||
$navbarImages['up.button'] = array(
|
||||
'action' => $previousURL,
|
||||
'tooltip' => lang('previous message'),
|
||||
);
|
||||
} else {
|
||||
$previousURL = '';
|
||||
$previousURL = '#';
|
||||
$navbarImages['up.grey'] = array(
|
||||
'action' => $previousURL,
|
||||
'tooltip' => lang('previous message'),
|
||||
);
|
||||
}
|
||||
|
||||
if($nextMessage['next']) {
|
||||
@ -526,13 +530,17 @@
|
||||
'mailbox' => base64_encode($this->mailbox)
|
||||
);
|
||||
$nextURL = $GLOBALS['egw']->link('/index.php',$linkData);
|
||||
$nextURL = "window.location.href = '$nextURL'";
|
||||
$nextURL = "goToMessage('$nextURL')";
|
||||
$navbarImages['down.button'] = array(
|
||||
'action' => $nextURL,
|
||||
'tooltip' => lang('next message'),
|
||||
);
|
||||
} else {
|
||||
$nextURL = '';
|
||||
$nextURL = '#';
|
||||
$navbarImages['down.grey'] = array(
|
||||
#'action' => $nextURL,
|
||||
'tooltip' => lang('next message'),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,3 +1,20 @@
|
||||
function parentRefreshListRowStyle(oldID, newID)
|
||||
{
|
||||
var trElement;
|
||||
var aElements;
|
||||
trElement = document.getElementById('row_'+oldID);
|
||||
trElement.style.fontWeight='normal';
|
||||
aElements = trElement.getElementsByTagName("a");
|
||||
aElements[0].style.fontWeight='normal';
|
||||
aElements[1].style.fontWeight='normal';
|
||||
trElement = document.getElementById('row_'+newID);
|
||||
trElement.style.fontWeight='normal';
|
||||
aElements = trElement.getElementsByTagName("a");
|
||||
aElements[0].style.fontWeight='normal';
|
||||
aElements[1].style.fontWeight='normal';
|
||||
|
||||
}
|
||||
|
||||
function setStatusMessage(_message) {
|
||||
document.getElementById('messageCounter').innerHTML = '<table cellpadding="0" cellspacing="0"><tr><td><img src="'+ activityImagePath +'"></td><td> ' + _message + '</td></tr></table>';
|
||||
}
|
||||
|
@ -8,11 +8,32 @@ var headerDIVHeight;
|
||||
|
||||
var bodyDIVTop;
|
||||
|
||||
function getUrlPart(url, name )
|
||||
{
|
||||
name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
|
||||
var regexS = "[\\?&]"+name+"=([^&#]*)";
|
||||
var regex = new RegExp( regexS );
|
||||
var results = regex.exec( url );
|
||||
if( results == null )
|
||||
return "";
|
||||
else
|
||||
return results[1];
|
||||
}
|
||||
|
||||
function sendNotify (uid) {
|
||||
ret = confirm(lang_sendnotify)
|
||||
xajax_doXMLHTTP("felamimail.ajaxfelamimail.sendNotify",uid,ret);
|
||||
}
|
||||
|
||||
function goToMessage(url) {
|
||||
//alert(getUrlPart(window.location.href,'uid'));
|
||||
var oldUid = getUrlPart(window.location.href,'uid');
|
||||
var newUid = getUrlPart(url,'uid');
|
||||
window.opener.parentRefreshListRowStyle(oldUid, newUid);
|
||||
window.location.href = url;
|
||||
//opener.refresh();
|
||||
}
|
||||
|
||||
function initAll()
|
||||
{
|
||||
//tab.init();
|
||||
|
BIN
phpgwapi/templates/default/images/down.grey.png
Normal file
BIN
phpgwapi/templates/default/images/down.grey.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 499 B |
BIN
phpgwapi/templates/default/images/up.grey.png
Normal file
BIN
phpgwapi/templates/default/images/up.grey.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 500 B |
Loading…
Reference in New Issue
Block a user