couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kxe...@apache.org
Subject [04/50] [abbrv] fauxton commit: updated refs/heads/import-master to b32c617
Date Tue, 01 Apr 2014 09:14:20 GMT
Cancel event propagation on replication swap.

Previous implementation called e.preventDefault() but did not stop upwards
propagation - the click event would therefore trigger navigation to the main
database panel. jQuery calls preventDefault and stopPropagation
when false is returned from an event handler so just do that here.


Project: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/commit/ffa3f9bd
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/tree/ffa3f9bd
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/diff/ffa3f9bd

Branch: refs/heads/import-master
Commit: ffa3f9bda6bf7800c8d4ee097a729eef19463419
Parents: ff183b3
Author: Will Holley <willholley@gmail.com>
Authored: Fri Feb 28 15:07:13 2014 +0000
Committer: Will Holley <willholley@gmail.com>
Committed: Mon Mar 3 08:06:09 2014 +0000

----------------------------------------------------------------------
 app/addons/replication/views.js | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/ffa3f9bd/app/addons/replication/views.js
----------------------------------------------------------------------
diff --git a/app/addons/replication/views.js b/app/addons/replication/views.js
index 1b31a9d..a19e609 100644
--- a/app/addons/replication/views.js
+++ b/app/addons/replication/views.js
@@ -175,7 +175,6 @@ function(app, FauxtonAPI, Components, replication) {
       this.startReplication(formJSON);
     },	
     swapFields: function(e){
-      e.preventDefault();
       //WALL O' VARIABLES
       var $fromSelect = this.$('#from_name'),
           $toSelect = this.$('#to_name'),
@@ -191,6 +190,9 @@ function(app, FauxtonAPI, Components, replication) {
 
       $fromInput.val(toInputVal);
       $toInput.val(fromInputVal);
+
+      // prevent other click handlers from running
+      return false;
     }
   });
 


Mime
View raw message