diff options
author | Christopher Lenz <cmlenz@apache.org> | 2009-07-21 21:06:00 +0000 |
---|---|---|
committer | Christopher Lenz <cmlenz@apache.org> | 2009-07-21 21:06:00 +0000 |
commit | f2a91f36366d270b59d208712e59cf32533006be (patch) | |
tree | 703b3c29bf79b646bf89b316fa2525cac68336c3 /share/www/database.html | |
parent | faa5479e472356770a8cda116defd002d88b20d6 (diff) |
Make the view-selection and jump-to-document widgets at the top of the Futon database page a bit more compact.
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@796535 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'share/www/database.html')
-rw-r--r-- | share/www/database.html | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/share/www/database.html b/share/www/database.html index 1abed3db..b94b1e93 100644 --- a/share/www/database.html +++ b/share/www/database.html @@ -30,7 +30,6 @@ specific language governing permissions and limitations under the License. <script src="script/futon.format.js?0.9.0"></script> <script> var page = new $.futon.CouchDatabasePage(); - $.futon.navigation.ready(function() { this.addDatabase(page.db.name); this.updateSelection(location.pathname, "?" + page.db.name); @@ -104,7 +103,7 @@ specific language governing permissions and limitations under the License. $("#toolbar button.compact").click(page.compactDatabase); $("#toolbar button.delete").click(page.deleteDatabase); - $('#jumpto input').suggest(function(text, callback) { + $('#jumpto input').addPlaceholder("Document ID").suggest(function(text, callback) { page.db.allDocs({ limit: 10, startkey: text, endkey: text + 'zzz', success: function(docs) { @@ -117,12 +116,12 @@ specific language governing permissions and limitations under the License. callback(matches); } }); + }).keypress(function(e) { + if (e.keyCode == 13) { + page.jumpToDocument($(this).val()); + } }); - - $("#jumpto input").keypress(page.jumpToDocument); - }); - </script> </head> @@ -134,15 +133,15 @@ specific language governing permissions and limitations under the License. </h1> <div id="content"> <div id="switch"> - <label>Select view: <select autocomplete="false"> + <label>View: <select autocomplete="false"> <option value="_all_docs">All documents</option> <option value="_design_docs">Design documents</option> <option value="_temp_view">Temporary view…</option> </select></label> </div> <div id="jumpto"> - <label>Jump to document: - <input type="text" name="docid" /> + <label>Jump to: + <input type="text" name="docid" autocomplete="off" /> </label> </div> <ul id="toolbar"> |