From 610064aea6eb707fe3b6a68f7c93005ceac0a2ec Mon Sep 17 00:00:00 2001 From: John Christopher Anderson Date: Mon, 9 Mar 2009 19:52:54 +0000 Subject: merge design doc resource branch. breaking changes to _view query paths. closes COUCHDB-280 git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@751813 13f79535-47bb-0310-9956-ffa450edef68 --- share/www/script/jquery.couch.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'share/www/script/jquery.couch.js') diff --git a/share/www/script/jquery.couch.js b/share/www/script/jquery.couch.js index 0c55aa49..ace9a8a6 100644 --- a/share/www/script/jquery.couch.js +++ b/share/www/script/jquery.couch.js @@ -191,9 +191,9 @@ appName = appName.join('/'); index = ddoc.couchapp && ddoc.couchapp.index; if (index) { - appPath = ['', name, index[0], appName, index[1]].join('/'); + appPath = ['', name, ddoc._id, index].join('/'); } else if (ddoc._attachments && ddoc._attachments["index.html"]) { - appPath = ['', name, '_design', appName, "index.html"].join('/'); + appPath = ['', name, ddoc._id, "index.html"].join('/'); } if (appPath) options.eachApp(appName, appPath, ddoc); } @@ -298,8 +298,9 @@ }, view: function(name, options) { options = options || {}; + name = name.split('/'); $.ajax({ - type: "GET", url: this.uri + "_view/" + name + encodeOptions(options), + type: "GET", url: this.uri + "_design/" + name[0] + "/_view/" + name[1] + encodeOptions(options), dataType: "json", complete: function(req) { var resp = $.httpData(req, "json"); -- cgit v1.2.3