summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsuelockwood <deathbearbrown@gmail.com>2013-12-02 13:12:46 -0500
committersuelockwood <deathbearbrown@gmail.com>2013-12-02 13:12:46 -0500
commit96d737fa207c75179c1ded493c6ab46e36b04eb9 (patch)
treeff9cfd4e5d113ca921449e48a1d726de85b5318e
parent2824db1371d8349e2488fff41a580cf17e7a87a5 (diff)
downloadcouchdb-96d737fa207c75179c1ded493c6ab46e36b04eb9.tar.gz
Fauxton: edit document on double click
Fixes COUCHDB-1921
-rw-r--r--src/fauxton/app/modules/documents/views.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/fauxton/app/modules/documents/views.js b/src/fauxton/app/modules/documents/views.js
index af08974b3..ffbc1d158 100644
--- a/src/fauxton/app/modules/documents/views.js
+++ b/src/fauxton/app/modules/documents/views.js
@@ -328,7 +328,8 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, resizeColumns) {
className: "all-docs-item",
events: {
- "click button.delete": "destroy"
+ "click button.delete": "destroy",
+ "dblclick pre.prettyprint": "edit"
},
attributes: function() {
@@ -347,6 +348,11 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, resizeColumns) {
return [this.model.fetch()];
},
+ edit: function(event) {
+ event.preventDefault();
+ FauxtonAPI.navigate("#" + this.model.url('app'));
+ },
+
destroy: function(event) {
event.preventDefault();
var that = this;