diff options
author | suelockwood <deathbearbrown@gmail.com> | 2013-12-02 13:12:46 -0500 |
---|---|---|
committer | suelockwood <deathbearbrown@gmail.com> | 2013-12-02 13:12:46 -0500 |
commit | 96d737fa207c75179c1ded493c6ab46e36b04eb9 (patch) | |
tree | ff9cfd4e5d113ca921449e48a1d726de85b5318e | |
parent | 2824db1371d8349e2488fff41a580cf17e7a87a5 (diff) | |
download | couchdb-96d737fa207c75179c1ded493c6ab46e36b04eb9.tar.gz |
Fauxton: edit document on double click
Fixes COUCHDB-1921
-rw-r--r-- | src/fauxton/app/modules/documents/views.js | 8 |
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; |