summaryrefslogtreecommitdiff
path: root/share/www/browse/database.html
diff options
context:
space:
mode:
authorChristopher Lenz <cmlenz@apache.org>2008-04-15 00:07:08 +0000
committerChristopher Lenz <cmlenz@apache.org>2008-04-15 00:07:08 +0000
commit01060528e2f94e0ae4374eb3746093a868b6a2f2 (patch)
treece7c28082894a84e6ad7a494e5fb034b274d1d6d /share/www/browse/database.html
parent4c6263150674c231239b4e1aeee804a3c5974c9a (diff)
Merged futon-async branch back into trunk.
git-svn-id: https://svn.apache.org/repos/asf/incubator/couchdb/trunk@648074 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'share/www/browse/database.html')
-rw-r--r--share/www/browse/database.html22
1 files changed, 12 insertions, 10 deletions
diff --git a/share/www/browse/database.html b/share/www/browse/database.html
index e52c3b8a..c685baad 100644
--- a/share/www/browse/database.html
+++ b/share/www/browse/database.html
@@ -21,20 +21,21 @@ specific language governing permissions and limitations under the License.
<script src="../script/json2.js"></script>
<script src="../script/jquery.js"></script>
<script src="../script/jquery.cookies.js"></script>
+ <script src="../script/jquery.couch.js"></script>
<script src="../script/jquery.dialog.js"></script>
<script src="../script/jquery.resizer.js"></script>
<script src="../script/jquery.suggest.js"></script>
- <script src="../script/couch.js"></script>
<script src="../script/browse.js"></script>
<script src="../script/pprint.js"></script>
<script>
var page = new CouchDatabasePage();
if (window != parent) {
- parent.updateNavigation(location.pathname, location.search.split("/", 2)[0]);
+ parent.updateNavigation(location.pathname,
+ encodeURIComponent(location.search.split("/", 2)[0]));
}
$(document).ready(function() {
- $("h1 strong").text(page.dbName);
+ $("h1 strong").text(page.db.name);
$("#viewcode label").click(function() {
$("#viewcode").toggleClass("expanded");
});
@@ -53,11 +54,11 @@ specific language governing permissions and limitations under the License.
$("#viewcode textarea").resizable({grippie: $("#viewcode .bottom")});
// Restore preferences/state from cookies
- var query = $.cookies.get(page.dbName + ".query");
+ var query = $.cookies.get(page.db.name + ".query");
if (query) $("#viewcode textarea").val(query);
- var desc = $.cookies.get(page.dbName + ".desc");
+ var desc = $.cookies.get(page.db.name + ".desc");
if (desc) $("#documents thead th.key").addClass("desc");
- var rowsPerPage = $.cookies.get(page.dbName + ".perpage");
+ var rowsPerPage = $.cookies.get(page.db.name + ".perpage");
if (rowsPerPage) $("#perpage").val(rowsPerPage);
page.populateViewsMenu();
@@ -66,8 +67,9 @@ specific language governing permissions and limitations under the License.
$("#switch select").change(function() {
var viewName = $(this).val();
- if (!viewName) $.cookies.remove(page.dbName + ".view");
- location.href = "?" + page.dbName + (viewName ? "/" + viewName : "");
+ if (!viewName) $.cookies.remove(page.db.name + ".view");
+ location.href = "?" + encodeURIComponent(page.db.name) +
+ (viewName ? "/" + encodeURIComponent(viewName) : "");
});
$("#documents thead th.key").click(function() {
$(this).toggleClass("desc");
@@ -75,7 +77,7 @@ specific language governing permissions and limitations under the License.
});
$("#perpage").change(function() {
page.updateDocumentListing();
- $.cookies.set(page.dbName + ".perpage", this.value);
+ $.cookies.set(page.db.name + ".perpage", this.value);
});
$("#toolbar button.add").click(page.addDocument);
$("#toolbar button.compact").click(page.compactDatabase);
@@ -91,7 +93,7 @@ specific language governing permissions and limitations under the License.
</h1>
<div id="wrap">
<div id="switch">
- <label>Select view: <select>
+ <label>Select view: <select autocomplete="false">
<option value="">All documents</option>
<option value="_design_docs">Design documents</option>
<option value="_temp_view">Custom query…</option>