httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From max...@apache.org
Subject svn commit: r264126 - in /httpd/mod_mbox/branches/httpd-mbox-if: data/archives.js module-2.0/mod_mbox_out.c
Date Mon, 29 Aug 2005 12:20:08 GMT
Author: maxime
Date: Mon Aug 29 05:20:02 2005
New Revision: 264126

URL: http://svn.apache.org/viewcvs?rev=264126&view=rev
Log:
 * module-2.0/mod_mbox_out.c:
    (mbox_static_msglist): added link to browser.

 * data/archives.js:
    (getMsgListHeader): added link to flat view.
    (getMessage): added prev/next links, and direct link to message.


Modified:
    httpd/mod_mbox/branches/httpd-mbox-if/data/archives.js
    httpd/mod_mbox/branches/httpd-mbox-if/module-2.0/mod_mbox_out.c

Modified: httpd/mod_mbox/branches/httpd-mbox-if/data/archives.js
URL: http://svn.apache.org/viewcvs/httpd/mod_mbox/branches/httpd-mbox-if/data/archives.js?rev=264126&r1=264125&r2=264126&view=diff
==============================================================================
--- httpd/mod_mbox/branches/httpd-mbox-if/data/archives.js (original)
+++ httpd/mod_mbox/branches/httpd-mbox-if/data/archives.js Mon Aug 29 05:20:02 2005
@@ -231,7 +231,8 @@
   var current_page = parseInt(_msglist.getAttribute('page'));
   var pages = parseInt(_msglist.getAttribute('pages'));
 
-  var str = '<thead><tr><th class="title">Message list</th>';
+  var str = '<thead><tr><th class="title"><a href="' + _sort + '?' +
_page +
+    '" title="Switch to flat view">Message list</a></th>';
 
   /* Page selector */
   str += '<th class="pages">';
@@ -388,7 +389,7 @@
     body.removeChild(document.getElementById('msgview'));
   }
 
-  if (!getMessage (id)) {
+  if (!getMessage (id, msg_num)) {
     body.innerHTML += '<table class="js" id="msgview">' +
       '<thead><tr><th>Message view</th></tr></thead>'
+
       '<tbody><tr><td>Unable to load message ' + id + ' !</td></tr></tbody>'
+
@@ -396,7 +397,7 @@
   }
 }
 
-function getMessage (id)
+function getMessage (id, msg_num)
 {
   var message_http = getHTTPObject ();
 
@@ -415,9 +416,22 @@
 	msgview.setAttribute('id', 'msgview');
 	msgview.setAttribute('class', 'js');
 
-	var str = '<thead><tr><th class="title">Message view</th><th
class="nav">' +
-	'<a href="browser" onclick="javascript:closeMessage(); return false;">x</a>'
+
-	'</th></tr></thead>';
+	var str = '<thead><tr><th class="title"><a href="' + id +
+	'" title="Direct link to this message">Message view</a></th><th class="nav">';
+
+	if (msg_num) {
+	  str += '<a href="browser" onclick="javascript:toggleMessage(' + (msg_num-1) +
+	    '); return false;" title="View previous message">Previous</a> &middot;
';
+	}
+
+	if (msg_num+1 < _msglist.getElementsByTagName('message').length) {
+	  str += '<a href="browser" onclick="javascript:toggleMessage(' + (msg_num+1) +
+	  '); return false;" title="View next message">Next</a> &middot; ';
+	}
+
+	str += '<a href="browser" onclick="javascript:closeMessage(); return false;" ' +
+	'title="Close message">x</a></th></tr></thead>';
+
 	str += '<tbody>';
 
 	str += '<tr class="from"><td class="left">From</td><td class="right">'
+

Modified: httpd/mod_mbox/branches/httpd-mbox-if/module-2.0/mod_mbox_out.c
URL: http://svn.apache.org/viewcvs/httpd/mod_mbox/branches/httpd-mbox-if/module-2.0/mod_mbox_out.c?rev=264126&r1=264125&r2=264126&view=diff
==============================================================================
--- httpd/mod_mbox/branches/httpd-mbox-if/module-2.0/mod_mbox_out.c (original)
+++ httpd/mod_mbox/branches/httpd-mbox-if/module-2.0/mod_mbox_out.c Mon Aug 29 05:20:02 2005
@@ -620,7 +620,7 @@
 	       baseURI + (strlen(baseURI) - strlen(".mbox") - 6));
 
     ap_rputs("  <table id=\"msglist\">\n", r);
-    ap_rputs("   <thead><tr><th class=\"title\">Message list</th>",
r);
+    ap_rputs("   <thead><tr><th class=\"title\"><a href=\"browser\">Message
list</a></th>", r);
 
     ap_rputs("<th class=\"pages\">", r);
     mbox_static_msglist_page_selector(r, baseURI, pages, current_page);



Mime
View raw message