You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ma...@apache.org on 2005/08/19 00:49:26 UTC

svn commit: r233393 - in /httpd/mod_mbox/branches/httpd-mbox-if: data/archives.js data/style.css module-2.0/mbox_date.c module-2.0/mbox_date.h module-2.0/mod_mbox_out.c

Author: maxime
Date: Thu Aug 18 15:49:18 2005
New Revision: 233393

URL: http://svn.apache.org/viewcvs?rev=233393&view=rev
Log:
Starting work on the AJAX browser.

 * module-2.0/mbox_date.c, mbox_date.h: Added missing license headers.

 * module-2.0/mod_mbox_out.c:
    (mbox_static_index_boxlist): Small output change in order to ease
Javascript post-processing.

 * data/style.css: Fixed box alignements.

 * data/archives.js:
    (indexLinks): new function.


Modified:
    httpd/mod_mbox/branches/httpd-mbox-if/data/archives.js
    httpd/mod_mbox/branches/httpd-mbox-if/data/style.css
    httpd/mod_mbox/branches/httpd-mbox-if/module-2.0/mbox_date.c
    httpd/mod_mbox/branches/httpd-mbox-if/module-2.0/mbox_date.h
    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=233393&r1=233392&r2=233393&view=diff
==============================================================================
--- httpd/mod_mbox/branches/httpd-mbox-if/data/archives.js (original)
+++ httpd/mod_mbox/branches/httpd-mbox-if/data/archives.js Thu Aug 18 15:49:18 2005
@@ -1,12 +1,44 @@
 /** mod_mbox
  */
 
+/* onLoad function for boxes list.
+ *
+ * Change 'Threads - Date - Author' links into a single 'Browser'
+ * link.
+ */
+function indexLinks ()
+{
+  var i, entries;
+
+  i = 0;
+
+  /* Fetch all spans in the document */
+  entries = document.getElementsByTagName('span');
+
+  /* Update span.links contents */
+  while (entries[i]) {
+    if (entries[i].hasAttribute('class')) {
+      if (entries[i].getAttribute('class') == 'links') {
+	entries[i].innerHTML = '<a href="' +
+	  entries[i].getAttribute('id') +
+	  '.mbox/browser">Browse</a>';
+      }
+    }
+    i++;
+  }
+
+  return true;
+}
+
 /* onLoad function for browser.
  *
  */
 function loadBrowser ()
 {
-  document.write('Loading ...');
+  var body;
+
+  body = document.getElementsByTagName('body');
+  body[0].innerHTML = body[0].innerHTML + '<p id="loading">Loading ...</p>';
 
   return true;
 }

Modified: httpd/mod_mbox/branches/httpd-mbox-if/data/style.css
URL: http://svn.apache.org/viewcvs/httpd/mod_mbox/branches/httpd-mbox-if/data/style.css?rev=233393&r1=233392&r2=233393&view=diff
==============================================================================
--- httpd/mod_mbox/branches/httpd-mbox-if/data/style.css (original)
+++ httpd/mod_mbox/branches/httpd-mbox-if/data/style.css Thu Aug 18 15:49:18 2005
@@ -28,6 +28,12 @@
   font-style: italic;
 }
 
+p#loading
+{
+  text-align: center;
+  font-style: italic;
+}
+
 table
 {
   margin: 0;
@@ -100,8 +106,7 @@
   left: 2%;
   right: 88%;
   width: 10%;
-  margin-top: 2px;
-  margin-bottom: 1em;
+  margin-bottom: 2em;
 }
 
 table#boxlist tr       { background: #eee;  }
@@ -125,7 +130,9 @@
    */
 table#msglist
 {
-  margin: 1em 2% 2em auto;
+  position: absolute;
+  top: 7em;
+  margin: 0 2% 2em auto;
   width: 80%;
 }
 
@@ -158,7 +165,9 @@
    */
 table#msgview
 {
-  margin: 1em 2%;
+  position: absolute;
+  top: 7em;
+  margin: 0 2% 2em 2%;
   width: 96%;
 }
 

Modified: httpd/mod_mbox/branches/httpd-mbox-if/module-2.0/mbox_date.c
URL: http://svn.apache.org/viewcvs/httpd/mod_mbox/branches/httpd-mbox-if/module-2.0/mbox_date.c?rev=233393&r1=233392&r2=233393&view=diff
==============================================================================
--- httpd/mod_mbox/branches/httpd-mbox-if/module-2.0/mbox_date.c (original)
+++ httpd/mod_mbox/branches/httpd-mbox-if/module-2.0/mbox_date.c Thu Aug 18 15:49:18 2005
@@ -1,3 +1,19 @@
+/* Copyright 2001-2005 The Apache Software Foundation or its licensors, as
+* applicable.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
 /** THIS FILE MUST BE REMOVED WHEN THE APR-UTIL LIBRARY WILL BE FIXED
  * AND PACKAGED. */
 

Modified: httpd/mod_mbox/branches/httpd-mbox-if/module-2.0/mbox_date.h
URL: http://svn.apache.org/viewcvs/httpd/mod_mbox/branches/httpd-mbox-if/module-2.0/mbox_date.h?rev=233393&r1=233392&r2=233393&view=diff
==============================================================================
--- httpd/mod_mbox/branches/httpd-mbox-if/module-2.0/mbox_date.h (original)
+++ httpd/mod_mbox/branches/httpd-mbox-if/module-2.0/mbox_date.h Thu Aug 18 15:49:18 2005
@@ -1,3 +1,19 @@
+/* Copyright 2001-2005 The Apache Software Foundation or its licensors, as
+* applicable.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
 /** THIS FILE MUST BE REMOVED WHEN THE APR-UTIL LIBRARY WILL BE FIXED
  * AND PACKAGED. */
 

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=233393&r1=233392&r2=233393&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 Thu Aug 18 15:49:18 2005
@@ -197,16 +197,16 @@
 		year_hdr = 1;
 	    }
 
-	    ap_rprintf(r, "    <tr id=\"mbox-%.4s%.2s\">\n",
-		       files[i].filename, files[i].filename+4);
+	    ap_rputs("    <tr>\n", r);
 	    ap_rprintf(r, "     <td class=\"date\">%s %.4s</td>\n",
 		       mbox_months[atoi(apr_pstrndup(r->pool,
 						     files[i].filename+4, 2)) - 1][0],
 		       files[i].filename);
-	    ap_rprintf(r, "     <td class=\"links\">"
+	    ap_rprintf(r, "     <td class=\"links\"><span class=\"links\" id=\"%.4s%.2s\">"
 		       "<a href=\"%.4s%.2s.mbox/thread\">Thread</a>"
 		       " &middot; <a href=\"%.4s%.2s.mbox/date\">Date</a>"
-		       " &middot; <a href=\"%.4s%.2s.mbox/author\">Author</a></td>\n",
+		       " &middot; <a href=\"%.4s%.2s.mbox/author\">Author</a></span></td>\n",
+		       files[i].filename, files[i].filename+4,
 		       files[i].filename, files[i].filename+4,
 		       files[i].filename, files[i].filename+4,
 		       files[i].filename, files[i].filename+4);