fix not marking messages as seen, when using up/down arrows on mail display popups

This commit is contained in:
Klaus Leithoff 2012-04-25 11:05:50 +00:00
parent b48b67f2d8
commit 0868474343
2 changed files with 4 additions and 2 deletions

View File

@ -80,9 +80,10 @@ function mail_disabledByClass(_action, _senders, _target)
return !$j(_target.iface.getDOMNode()).hasClass(_action.data.disableClass);
}
function mail_parentRefreshListRowStyle(oldID, newID)
function mail_parentRefreshListRowStyle(oldID, newID, setNewAsSeen)
{
// the old implementation is not working anymore, so we use the gridObject for this
if (typeof setNewAsSeen == 'undefined') setNewAsSeen = false;
var allElements = mailGrid.dataRoot.actionObject.flatList();
for (var i=0; i<allElements.length; i++)
{
@ -97,6 +98,7 @@ function mail_parentRefreshListRowStyle(oldID, newID)
{
allElements[i].setSelected(false);
allElements[i].setFocused(true);
if (setNewAsSeen) fm_msg_removeClass(newID, 'unseen');
}
}
}

View File

@ -33,7 +33,7 @@ function goToMessage(url) {
//alert(getUrlPart(window.location.href,'uid'));
var oldUid = getUrlPart(window.location.href,'uid');
var newUid = getUrlPart(url,'uid');
window.opener.mail_parentRefreshListRowStyle(oldUid, newUid);
window.opener.mail_parentRefreshListRowStyle(oldUid, newUid, true);
window.location.href = url;
//opener.refresh();
}