couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robertkowal...@apache.org
Subject [3/4] fauxton commit: updated refs/heads/master to 36957d0
Date Mon, 08 Sep 2014 13:29:34 GMT
Allow replications to existing databases


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

Branch: refs/heads/master
Commit: 7d9daf5c73c63f431ff251ee9c55e8edd1dae514
Parents: be42054
Author: Robert Kowalski <rok@kowalski.gd>
Authored: Mon Sep 1 01:36:00 2014 +0200
Committer: Robert Kowalski <rok@kowalski.gd>
Committed: Mon Sep 8 15:30:39 2014 +0200

----------------------------------------------------------------------
 app/addons/replication/views.js | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7d9daf5c/app/addons/replication/views.js
----------------------------------------------------------------------
diff --git a/app/addons/replication/views.js b/app/addons/replication/views.js
index a138beb..1a6936d 100644
--- a/app/addons/replication/views.js
+++ b/app/addons/replication/views.js
@@ -101,18 +101,19 @@ function(app, FauxtonAPI, Components, Replication) {
           type: "error",
           clear: true
         });
+        return;
       }else if (this.$('input#to_name').is(':visible') && !this.$('input[name=create_target]').is(':checked')){
         var alreadyExists = this.collection.where({"name":this.$('input#to_name').val()});
-        if (alreadyExists.length === 0){
-          notification = FauxtonAPI.addNotification({
+        if (alreadyExists.length === 0) {
+          FauxtonAPI.addNotification({
             msg: "This database doesn't exist. Check create target if you want to create
it.",
             type: "error",
             clear: true
           });
+          return;
         }
-      }else{
-        this.submit(e);
       }
+      this.submit(e);
     },
     formValidation: function(e){
       var $remote = this.$el.find('input:visible'),


Mime
View raw message