diff options
author | John Christopher Anderson <jchris@apache.org> | 2008-11-17 22:14:14 +0000 |
---|---|---|
committer | John Christopher Anderson <jchris@apache.org> | 2008-11-17 22:14:14 +0000 |
commit | d2a6bdbe68ae65aee21d9267e9985fe611bf6e7c (patch) | |
tree | b6b28dd190c0975b6f1de1f732675db65ed3101e /share/www/script/browse.js | |
parent | aee6f18edf8cdf3f7c09c93fcf1af48c2c15fcd8 (diff) |
factored couch_test_runner.js out from couch_tests.js, made it usuable for unit testing views from design docs
git-svn-id: https://svn.apache.org/repos/asf/incubator/couchdb/trunk@718409 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'share/www/script/browse.js')
-rw-r--r-- | share/www/script/browse.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/share/www/script/browse.js b/share/www/script/browse.js index 6abcb073..dde31c05 100644 --- a/share/www/script/browse.js +++ b/share/www/script/browse.js @@ -873,12 +873,18 @@ function CouchDocumentPage() { } function _renderAttachmentItem(name, attachment) { + var attachmentHref = db.uri + encodeURIComponent(docId) + + "/" + encodeURIComponent(name); var li = $("<li></li>"); $("<a href='' title='Download file' target='_top'></a>").text(name) - .attr("href", db.uri + encodeURIComponent(docId) + "/" + encodeURIComponent(name)) + .attr("href", attachmentHref) .wrapInner("<tt></tt>").appendTo(li); $("<span>()</span>").text("" + prettyPrintSize(attachment.length) + ", " + attachment.content_type).addClass("info").appendTo(li); + if (name == "tests.js") { + li.find('span.info').append(', <a href="/_utils/couch_tests.html?' + + attachmentHref + '">open in test runner</a>'); + } _initAttachmentItem(name, attachment, li); return li; } |