couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From deathb...@apache.org
Subject git commit: updated refs/heads/master to 96d737f
Date Mon, 02 Dec 2013 18:12:57 GMT
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 <deathbearbrown@gmail.com>
Authored: Mon Dec 2 13:12:46 2013 -0500
Committer: suelockwood <deathbearbrown@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;


Mime
View raw message