couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cml...@apache.org
Subject svn commit: r734091 - in /couchdb/trunk/share: Makefile.am www/database.html www/document.html www/image/rarrow.png www/style/layout.css
Date Tue, 13 Jan 2009 10:18:25 GMT
Author: cmlenz
Date: Tue Jan 13 02:18:15 2009
New Revision: 734091

URL: http://svn.apache.org/viewvc?rev=734091&view=rev
Log:
As a follow-up to r733462, instead of making the last part of the breadcrumb a link to the
raw JSON doc, add a little arrow thingy at the right side of the navigation bar for the same
purpose, and also make it work for views from the database page.

Added:
    couchdb/trunk/share/www/image/rarrow.png   (with props)
Modified:
    couchdb/trunk/share/Makefile.am
    couchdb/trunk/share/www/database.html
    couchdb/trunk/share/www/document.html
    couchdb/trunk/share/www/style/layout.css

Modified: couchdb/trunk/share/Makefile.am
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/Makefile.am?rev=734091&r1=734090&r2=734091&view=diff
==============================================================================
--- couchdb/trunk/share/Makefile.am (original)
+++ couchdb/trunk/share/Makefile.am Tue Jan 13 02:18:15 2009
@@ -36,6 +36,7 @@
     www/image/order-desc.gif \
     www/image/path.gif \
     www/image/progress.gif \
+    www/image/rarrow.png \
     www/image/run-mini.png \
     www/image/run.png \
     www/image/running.png \

Modified: couchdb/trunk/share/www/database.html
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/www/database.html?rev=734091&r1=734090&r2=734091&view=diff
==============================================================================
--- couchdb/trunk/share/www/database.html [utf-8] (original)
+++ couchdb/trunk/share/www/database.html [utf-8] Tue Jan 13 02:18:15 2009
@@ -38,6 +38,12 @@
 
       $(function() {
         $("h1 strong").text(page.db.name);
+        var viewPath = (page.viewName || "_all_docs").replace(/^_design\//, "_view/");
+        if (viewPath != "_slow_view" && viewPath != "_design_docs") {
+          $("h1 a.raw").attr("href", "/" + encodeURIComponent(page.db.name) +
+            "/" + viewPath);
+        }
+
         $("#viewcode span").click(function() {
           $("#viewcode").toggleClass("collapsed");
         });
@@ -106,6 +112,7 @@
     <h1>
       <a href="index.html">Overview</a>
       <strong>?</strong>
+      <a class="raw" title="Raw view"></a>
     </h1>
     <div id="content">
       <div id="switch">

Modified: couchdb/trunk/share/www/document.html
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/www/document.html?rev=734091&r1=734090&r2=734091&view=diff
==============================================================================
--- couchdb/trunk/share/www/document.html [utf-8] (original)
+++ couchdb/trunk/share/www/document.html [utf-8] Tue Jan 13 02:18:15 2009
@@ -42,8 +42,9 @@
       $(function() {
         $("h1 a.dbname").text(page.dbName)
           .attr("href", "database.html?" + encodeURIComponent(page.db.name));
-        $("h1 strong").html('<a href="/'+encodeURIComponent(page.db.name)
-          +'/'+encodeURIComponent(page.docId)+'>'+page.docId+'</a>');
+        $("h1 strong").text(page.docId);
+        $("h1 a.raw").attr("href", "/" + encodeURIComponent(page.db.name) +
+          "/" + encodeURIComponent(page.docId));
         page.updateFieldListing();
 
         $("#tabs li.tabular a").click(page.activateTabularView);
@@ -62,6 +63,7 @@
       <a href="index.html">Overview</a>
       <a class="dbname" href="#">?</a>
       <strong>?</strong>
+      <a class="raw" title="Raw document"></a>
     </h1>
     <div id="content">
       <ul id="toolbar">

Added: couchdb/trunk/share/www/image/rarrow.png
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/www/image/rarrow.png?rev=734091&view=auto
==============================================================================
Binary file - no diff available.

Propchange: couchdb/trunk/share/www/image/rarrow.png
------------------------------------------------------------------------------
    svn:mime-type = image/png

Modified: couchdb/trunk/share/www/style/layout.css
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/www/style/layout.css?rev=734091&r1=734090&r2=734091&view=diff
==============================================================================
--- couchdb/trunk/share/www/style/layout.css (original)
+++ couchdb/trunk/share/www/style/layout.css Tue Jan 13 02:18:15 2009
@@ -27,7 +27,7 @@
 h1 { background: #333; border-right: 2px solid #111;
   border-bottom: 1px solid #333; color: #999;
   font: 125% normal Arial,Helvetica,sans-serif;
-  line-height: 1.8em; margin: 0 0 1em; padding: 0 0 0 1em;
+  line-height: 1.8em; margin: 0 0 1em; padding: 0 0 0 1em; position: relative;
 }
 h1 :link, h1 :visited, h1 strong { padding: .4em .5em; }
 h1 :link, h1 :visited { 
@@ -37,6 +37,10 @@
 }
 h1 strong { color: #fff; font-weight: normal; padding-right: 25px; }
 h1 strong a {color:#fff !important;background:none !important;}
+h1 :link.raw, h1 :visited.raw {
+  background: url(../image/rarrow.png) 100% 50% no-repeat; position: absolute;
+  right: 20px; width: 35px; height: 100%; padding: 0;
+}
 body.loading h1 strong {
   background: url(../image/spinner.gif) right center no-repeat;
 }



Mime
View raw message