You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by kx...@apache.org on 2013/12/16 21:03:26 UTC

[06/50] git commit: updated refs/heads/1744-single-config-file to 1c344a9

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/1744-single-config-file
Commit: 96d737fa207c75179c1ded493c6ab46e36b04eb9
Parents: 2824db1
Author: suelockwood <de...@gmail.com>
Authored: Mon Dec 2 13:12:46 2013 -0500
Committer: suelockwood <de...@gmail.com>
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;