summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorChristopher Lenz <cmlenz@apache.org>2009-01-13 10:18:15 +0000
committerChristopher Lenz <cmlenz@apache.org>2009-01-13 10:18:15 +0000
commita4b645ec236b260e7dca50a5172c64afe2f07d56 (patch)
tree0f223b132c52290d5dc7221b62988b75be2e66c6 /share
parente682127ca50b7a1e9a0643412a9e89cfabd5b7a6 (diff)
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
Diffstat (limited to 'share')
-rw-r--r--share/Makefile.am1
-rw-r--r--share/www/database.html7
-rw-r--r--share/www/document.html6
-rw-r--r--share/www/image/rarrow.pngbin0 -> 27721 bytes
-rw-r--r--share/www/style/layout.css6
5 files changed, 17 insertions, 3 deletions
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.
<h1>
<a href="index.html">Overview</a>
<strong>?</strong>
+ <a class="raw" title="Raw view"></a>
</h1>
<div id="content">
<div id="switch">
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('<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 @@ specific language governing permissions and limitations under the License.
<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">
diff --git a/share/www/image/rarrow.png b/share/www/image/rarrow.png
new file mode 100644
index 00000000..507e87e7
--- /dev/null
+++ b/share/www/image/rarrow.png
Binary files 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;
}