diff options
author | John Christopher Anderson <jchris@apache.org> | 2009-03-09 19:52:54 +0000 |
---|---|---|
committer | John Christopher Anderson <jchris@apache.org> | 2009-03-09 19:52:54 +0000 |
commit | 610064aea6eb707fe3b6a68f7c93005ceac0a2ec (patch) | |
tree | 432a31e5c0561e10f9b1e4973c2741c5c777c1f1 /share/www/script/jquery.couch.js | |
parent | dd79e85bc9e4849df904498ca25ec56304440b5f (diff) |
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
Diffstat (limited to 'share/www/script/jquery.couch.js')
-rw-r--r-- | share/www/script/jquery.couch.js | 7 |
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"); |