Repository: couchdb Updated Branches: refs/heads/master 89eb4a6d6 -> a7a6d2eec
Fauxton: fix intendation Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/e7763dfb Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/e7763dfb Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/e7763dfb Branch: refs/heads/master Commit: e7763dfb2d2ad8119ee883002e60ec7edde791c7 Parents: f2153c0 Author: Robert Kowalski <[email protected]> Authored: Fri Mar 21 17:25:17 2014 +0100 Committer: Robert Kowalski <[email protected]> Committed: Fri Mar 21 17:27:50 2014 +0100 ---------------------------------------------------------------------- src/fauxton/app/addons/config/views.js | 37 +++++++++++++++-------------- 1 file changed, 19 insertions(+), 18 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb/blob/e7763dfb/src/fauxton/app/addons/config/views.js ---------------------------------------------------------------------- diff --git a/src/fauxton/app/addons/config/views.js b/src/fauxton/app/addons/config/views.js index 8453d90..9f427ac 100644 --- a/src/fauxton/app/addons/config/views.js +++ b/src/fauxton/app/addons/config/views.js @@ -81,27 +81,28 @@ function(app, FauxtonAPI, Config, Components) { }, saveAndRender: function (event) { var options = {}; - $input = this.$(event.currentTarget).parents('td').find(".js-value-input"); - options[$input.attr('name')] = $input.val(); - - if ($input.attr('name')==='name'){ - if (this.uniqueName($input.val())){ - this.error = FauxtonAPI.addNotification({ - msg: "This config already exists, enter a unique name", - type: "error", - clear: true - }); - } else { - var newModel = this.model.clone(); - newModel.save(options); - this.model.destroy(); - this.model = newModel; - this.render(); - } + $input = this.$(event.currentTarget).parents('td').find(".js-value-input"); + + options[$input.attr('name')] = $input.val(); + + if ($input.attr('name')==='name'){ + if (this.uniqueName($input.val())){ + this.error = FauxtonAPI.addNotification({ + msg: "This config already exists, enter a unique name", + type: "error", + clear: true + }); } else { + var newModel = this.model.clone(); + newModel.save(options); + this.model.destroy(); + this.model = newModel; + this.render(); + } + } else { this.model.save(options); this.render(); - } + } } });
