summaryrefslogtreecommitdiff
path: root/share/www/database.html
diff options
context:
space:
mode:
Diffstat (limited to 'share/www/database.html')
-rw-r--r--share/www/database.html19
1 files changed, 6 insertions, 13 deletions
diff --git a/share/www/database.html b/share/www/database.html
index abe9e28c..ec5134d6 100644
--- a/share/www/database.html
+++ b/share/www/database.html
@@ -25,23 +25,15 @@ specific language governing permissions and limitations under the License.
<script src="script/jquery.dialog.js?0.9.0"></script>
<script src="script/jquery.resizer.js?0.9.0"></script>
<script src="script/jquery.suggest.js?0.9.0"></script>
+ <script src="script/futon.js?0.9.0"></script>
<script src="script/browse.js?0.9.0"></script>
<script src="script/pprint.js?0.9.0"></script>
<script>
var page = new CouchDatabasePage();
- $.get("_sidebar.html", function(resp) {
- $(resp).insertAfter("#wrap");
-
- var recentDbs = $.cookies.get("recent", "").split(",");
- if ($.inArray(page.db.name, recentDbs) == -1) {
- recentDbs.unshift(page.db.name);
- if (recentDbs.length > 10) recentDbs.length = 10;
- $.cookies.set("recent", recentDbs.join(","));
- updateRecentDatabasesList();
- }
-
- updateNavigation(location.pathname, "?" + page.db.name);
+ $.futon.navigation.ready(function() {
+ this.addDatabase(page.db.name);
+ this.updateSelection(location.pathname, "?" + page.db.name);
});
$(function() {
@@ -91,6 +83,7 @@ specific language governing permissions and limitations under the License.
$("#switch select").change(function() {
var viewName = $(this).val();
+ console.log(viewName);
if (!viewName) $.cookies.remove(page.db.name + ".view");
location.href = "?" + encodeURIComponent(page.db.name) +
(viewName ? "/" + encodeURIComponent(viewName) : "");
@@ -118,7 +111,7 @@ specific language governing permissions and limitations under the License.
<div id="content">
<div id="switch">
<label>Select view: <select autocomplete="false">
- <option value="">All documents</option>
+ <option value="_all_docs">All documents</option>
<option value="_design_docs">Design documents</option>
<option value="_slow_view">Custom query…</option>
</select></label>