diff --git a/felamimail/inc/class.uidisplay.inc.php b/felamimail/inc/class.uidisplay.inc.php index c2b02211a7..6c428f552d 100644 --- a/felamimail/inc/class.uidisplay.inc.php +++ b/felamimail/inc/class.uidisplay.inc.php @@ -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'), + ); } diff --git a/felamimail/js/jscode/viewMainScreen.js b/felamimail/js/jscode/viewMainScreen.js index 1afeb382e7..a5d3d5cb7f 100644 --- a/felamimail/js/jscode/viewMainScreen.js +++ b/felamimail/js/jscode/viewMainScreen.js @@ -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 = '
 ' + _message + '
'; } diff --git a/felamimail/js/jscode/view_message.js b/felamimail/js/jscode/view_message.js index abbcf908ec..da70c7b100 100644 --- a/felamimail/js/jscode/view_message.js +++ b/felamimail/js/jscode/view_message.js @@ -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(); diff --git a/phpgwapi/templates/default/images/down.grey.png b/phpgwapi/templates/default/images/down.grey.png new file mode 100644 index 0000000000..4bdec81373 Binary files /dev/null and b/phpgwapi/templates/default/images/down.grey.png differ diff --git a/phpgwapi/templates/default/images/up.grey.png b/phpgwapi/templates/default/images/up.grey.png new file mode 100644 index 0000000000..d0fb749716 Binary files /dev/null and b/phpgwapi/templates/default/images/up.grey.png differ