summaryrefslogtreecommitdiff
path: root/share/www/browse
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
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')
-rw-r--r--share/www/browse/database.html22
-rw-r--r--share/www/browse/document.html9
-rw-r--r--share/www/browse/index.html2
3 files changed, 18 insertions, 15 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>
diff --git a/share/www/browse/document.html b/share/www/browse/document.html
index f7876539..db3de935 100644
--- a/share/www/browse/document.html
+++ b/share/www/browse/document.html
@@ -21,9 +21,9 @@ 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/couch.js"></script>
<script src="../script/browse.js"></script>
<script src="../script/pprint.js"></script>
<script>
@@ -32,13 +32,14 @@ specific language governing permissions and limitations under the License.
var dbLink = $("h1 a.dbname").get(0);
parent.updateNavigation(
location.pathname.replace(/document\.html/, "database.html"),
- location.search.split("/")[0]
+ encodeURIComponent(location.search.split("/")[0])
);
}
$(function() {
- $("h1 a.dbname").text(page.dbName).attr("href", "database.html?" + page.dbName);
- $("h1 strong").text(page.doc._id);
+ $("h1 a.dbname").text(page.dbName)
+ .attr("href", "database.html?" + encodeURIComponent(page.db.name));
+ $("h1 strong").text(page.docId);
page.updateFieldListing();
$("#toolbar button.save").click(page.saveDocument);
$("#toolbar button.add").click(page.addField);
diff --git a/share/www/browse/index.html b/share/www/browse/index.html
index 63ef62e6..1d583825 100644
--- a/share/www/browse/index.html
+++ b/share/www/browse/index.html
@@ -21,8 +21,8 @@ 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/couch.js"></script>
<script src="../script/browse.js"></script>
<script src="../script/pprint.js"></script>
<script>