From a4b645ec236b260e7dca50a5172c64afe2f07d56 Mon Sep 17 00:00:00 2001 From: Christopher Lenz Date: Tue, 13 Jan 2009 10:18:15 +0000 Subject: 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. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@734091 13f79535-47bb-0310-9956-ffa450edef68 --- share/Makefile.am | 1 + share/www/database.html | 7 +++++++ share/www/document.html | 6 ++++-- share/www/image/rarrow.png | Bin 0 -> 27721 bytes share/www/style/layout.css | 6 +++++- 5 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 share/www/image/rarrow.png (limited to 'share') diff --git a/share/Makefile.am b/share/Makefile.am index 5ed70007..be6e81d9 100644 --- a/share/Makefile.am +++ b/share/Makefile.am @@ -36,6 +36,7 @@ nobase_dist_localdata_DATA = \ 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 \ diff --git a/share/www/database.html b/share/www/database.html index c540972f..8f0b6d5d 100644 --- a/share/www/database.html +++ b/share/www/database.html @@ -38,6 +38,12 @@ specific language governing permissions and limitations under the License. $(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 @@ specific language governing permissions and limitations under the License.

Overview ? +

diff --git a/share/www/document.html b/share/www/document.html index 5e8831ce..922a651a 100644 --- a/share/www/document.html +++ b/share/www/document.html @@ -42,8 +42,9 @@ specific language governing permissions and limitations under the License. $(function() { $("h1 a.dbname").text(page.dbName) .attr("href", "database.html?" + encodeURIComponent(page.db.name)); - $("h1 strong").html('Overview ? ? +
    diff --git a/share/www/image/rarrow.png b/share/www/image/rarrow.png new file mode 100644 index 00000000..507e87e7 Binary files /dev/null and b/share/www/image/rarrow.png differ diff --git a/share/www/style/layout.css b/share/www/style/layout.css index 20aaaf82..67f9e430 100644 --- a/share/www/style/layout.css +++ b/share/www/style/layout.css @@ -27,7 +27,7 @@ body { background: #fff url(../image/bg.png) 100% 0 repeat-y; 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 :link, h1 :visited { } 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; } -- cgit v1.2.3