From d2a6bdbe68ae65aee21d9267e9985fe611bf6e7c Mon Sep 17 00:00:00 2001 From: John Christopher Anderson Date: Mon, 17 Nov 2008 22:14:14 +0000 Subject: 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 --- share/www/script/browse.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'share/www/script/browse.js') 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 = $("
  • "); $("").text(name) - .attr("href", db.uri + encodeURIComponent(docId) + "/" + encodeURIComponent(name)) + .attr("href", attachmentHref) .wrapInner("").appendTo(li); $("()").text("" + prettyPrintSize(attachment.length) + ", " + attachment.content_type).addClass("info").appendTo(li); + if (name == "tests.js") { + li.find('span.info').append(', open in test runner'); + } _initAttachmentItem(name, attachment, li); return li; } -- cgit v1.2.3