summaryrefslogtreecommitdiff
path: root/share/www/script/jquery.couch.js
diff options
context:
space:
mode:
Diffstat (limited to 'share/www/script/jquery.couch.js')
-rw-r--r--share/www/script/jquery.couch.js7
1 files changed, 4 insertions, 3 deletions
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");