Updated Branches: refs/heads/master 2824db137 -> 96d737fa2
Fauxton: edit document on double click Fixes COUCHDB-1921 Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/96d737fa Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/96d737fa Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/96d737fa Branch: refs/heads/master Commit: 96d737fa207c75179c1ded493c6ab46e36b04eb9 Parents: 2824db1 Author: suelockwood <[email protected]> Authored: Mon Dec 2 13:12:46 2013 -0500 Committer: suelockwood <[email protected]> Committed: Mon Dec 2 13:12:46 2013 -0500 ---------------------------------------------------------------------- src/fauxton/app/modules/documents/views.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb/blob/96d737fa/src/fauxton/app/modules/documents/views.js ---------------------------------------------------------------------- diff --git a/src/fauxton/app/modules/documents/views.js b/src/fauxton/app/modules/documents/views.js index af08974..ffbc1d1 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;
