From 8205d358f94c80659f8fd887c2395d265688a718 Mon Sep 17 00:00:00 2001 From: Christopher Lenz Date: Fri, 5 Dec 2008 17:16:09 +0000 Subject: Don't automatically execute temp view in Futon when the page is loaded, but rather defer until the Run button is clicked. git-svn-id: https://svn.apache.org/repos/asf/incubator/couchdb/trunk@723793 13f79535-47bb-0310-9956-ffa450edef68 --- share/www/browse/database.html | 7 ++++++- share/www/script/browse.js | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/share/www/browse/database.html b/share/www/browse/database.html index fe17a47b..f1f25e9e 100644 --- a/share/www/browse/database.html +++ b/share/www/browse/database.html @@ -79,7 +79,12 @@ specific language governing permissions and limitations under the License. page.populateViewsMenu(); page.populateViewEditor(); - page.updateDocumentListing(); + if (!page.isTempView) { + page.updateDocumentListing(); + } else { + $("#viewcode").show().removeClass("collapsed").find("textarea")[0].focus(); + $("#documents").hide(); + } $("#switch select").change(function() { var viewName = $(this).val(); diff --git a/share/www/script/browse.js b/share/www/script/browse.js index dde31c05..1417a96b 100644 --- a/share/www/script/browse.js +++ b/share/www/script/browse.js @@ -115,6 +115,7 @@ function CouchDatabasePage() { this.viewName = viewName; this.db = db; this.isDirty = false; + this.isTempView = viewName == "_temp_view"; page = this; this.addDocument = function() { @@ -393,7 +394,7 @@ function CouchDatabasePage() { $.cookies.remove(dbName + ".desc"); } $("#paging a").unbind(); - $("#documents tbody.content").empty(); + $("#documents").find("tbody.content").empty().end().show(); this.updateDesignDocLink(); options.success = function(resp) { -- cgit v1.2.3