You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ro...@apache.org on 2015/03/25 11:14:04 UTC

[07/11] fauxton commit: updated refs/heads/master to 9343084

styleguide: requireSpaceBeforeBlockStatements

PR: #326
PR-URL: https://github.com/apache/couchdb-fauxton/pull/326
Reviewed-By: garren smith <ga...@gmail.com>


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

Branch: refs/heads/master
Commit: e3425b03f59e0b3382731953057b5bf5a959972b
Parents: ba123f4
Author: Robert Kowalski <ro...@kowalski.gd>
Authored: Sun Mar 22 21:57:55 2015 +0100
Committer: Robert Kowalski <ro...@apache.org>
Committed: Wed Mar 25 11:11:54 2015 +0100

----------------------------------------------------------------------
 Gruntfile.js                                    | 18 ++++++------
 app/addons/activetasks/views.js                 |  4 +--
 app/addons/config/views.js                      |  4 +--
 app/addons/databases/base.js                    |  2 +-
 app/addons/databases/resources.js               |  8 +++---
 app/addons/documents/index-editor/stores.js     |  2 +-
 .../pagination/tests/paginationStoreSpec.js     |  4 +--
 app/addons/documents/resources.js               | 14 ++++-----
 app/addons/documents/shared-resources.js        | 10 +++----
 app/addons/documents/shared-views.js            | 14 ++++-----
 .../tests/nightwatch/editDocumentsFromView.js   |  2 +-
 app/addons/documents/tests/storesSpec.js        |  2 +-
 app/addons/documents/views-doceditor.js         |  4 +--
 app/addons/documents/views-queryoptions.js      |  4 +--
 app/addons/documents/views.js                   |  2 +-
 app/addons/fauxton/components.js                | 30 ++++++++++----------
 app/addons/fauxton/stores.js                    |  4 +--
 app/addons/fauxton/templates/menu_dropdown.html |  2 +-
 .../permissions/assets/less/permissions.less    |  2 +-
 app/addons/replication/resources.js             |  6 ++--
 app/addons/replication/route.js                 |  2 +-
 app/addons/replication/templates/form.html      |  4 +--
 app/addons/replication/views.js                 |  4 +--
 app/addons/styletests/routes.js                 |  4 +--
 app/core/layout.js                              |  4 +--
 app/core/routeObject.js                         |  8 +++---
 app/core/router.js                              |  2 +-
 app/core/utils.js                               | 10 +++----
 tasks/addon/template.js                         |  2 +-
 tasks/fauxton.js                                | 10 +++----
 30 files changed, 94 insertions(+), 94 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/e3425b03/Gruntfile.js
----------------------------------------------------------------------
diff --git a/Gruntfile.js b/Gruntfile.js
index 98a46a6..22997d1 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -41,9 +41,9 @@ module.exports = function(grunt) {
 
   var cleanableAddons =  function () {
     var theListToClean = [];
-    helper.processAddons(function(addon){
+    helper.processAddons(function(addon) {
       // Only clean addons that are included from a local dir
-      if (addon.path){
+      if (addon.path) {
         theListToClean.push("app/addons/" + addon.name);
       }
     });
@@ -51,14 +51,14 @@ module.exports = function(grunt) {
     return theListToClean;
   }();
 
-  var cleanable = function(){
+  var cleanable = function() {
     // Whitelist files and directories to be cleaned
     // You'll always want to clean these two directories
     // Now find the external addons you have and add them for cleaning up
     return _.union(["dist/", "app/load_addons.js"], cleanableAddons);
   }();
 
-  var assets = function(){
+  var assets = function() {
     // Base assets
     var theAssets = {
       less:{
@@ -73,11 +73,11 @@ module.exports = function(grunt) {
       // fauxton.css should load first
       css: ["assets/css/*.css", "dist/debug/css/fauxton.css"]
     };
-    helper.processAddons(function(addon){
+    helper.processAddons(function(addon) {
       // Less files from addons
       var root = addon.path || "app/addons/" + addon.name;
       var lessPath = root + "/assets/less";
-      if(fs.existsSync(lessPath)){
+      if(fs.existsSync(lessPath)) {
         // .less files exist for this addon
         theAssets.less.paths.push(lessPath);
         theAssets.less.files["dist/debug/css/" + addon.name + ".css"] =
@@ -87,18 +87,18 @@ module.exports = function(grunt) {
       // Images
       root = addon.path || "app/addons/" + addon.name;
       var imgPath = root + "/assets/img";
-      if(fs.existsSync(imgPath)){
+      if(fs.existsSync(imgPath)) {
         theAssets.img.push(imgPath + "/**");
       }
       var fontsPath = root + "/assets/fonts";
-      if(fs.existsSync(fontsPath)){
+      if(fs.existsSync(fontsPath)) {
         theAssets.fonts.push(fontsPath + "/**");
       }
     });
     return theAssets;
   }();
 
-  var templateSettings = function(){
+  var templateSettings = function() {
     var defaultSettings = {
      "development": {
         "src": "assets/index.underscore",

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/e3425b03/app/addons/activetasks/views.js
----------------------------------------------------------------------
diff --git a/app/addons/activetasks/views.js b/app/addons/activetasks/views.js
index bd3e30a..053e252 100644
--- a/app/addons/activetasks/views.js
+++ b/app/addons/activetasks/views.js
@@ -137,7 +137,7 @@ function (app, FauxtonAPI, ActiveTasks) {
       this.$('.task-tabs').find('li').eq(0).addClass('active');
     },
 
-    changePollInterval: function(e){
+    changePollInterval: function(e) {
       var range = this.$(e.currentTarget).val();
       this.$('label[for="pollingRange"] span').text(range);
       pollingInfo.rate = range;
@@ -149,7 +149,7 @@ function (app, FauxtonAPI, ActiveTasks) {
       clearInterval(pollingInfo.intervalId);
     },
 
-    requestByType: function(e){
+    requestByType: function(e) {
       var currentTarget = e.currentTarget,
           filter = this.$(currentTarget).attr('data-type');
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/e3425b03/app/addons/config/views.js
----------------------------------------------------------------------
diff --git a/app/addons/config/views.js b/app/addons/config/views.js
index a234810..f04aec8 100644
--- a/app/addons/config/views.js
+++ b/app/addons/config/views.js
@@ -111,7 +111,7 @@ function(app, FauxtonAPI, Config, Components) {
   Views.Table = FauxtonAPI.View.extend({
     template: "addons/config/templates/dashboard",
 
-    initialize: function(){
+    initialize: function() {
       this.listenTo(FauxtonAPI.Events, "config:newSection", this.render);
       this.listenTo(FauxtonAPI.Events, "config:rerender", this.render);
     },
@@ -257,7 +257,7 @@ function(app, FauxtonAPI, Config, Components) {
       this.$('li').removeClass('active');
       this.$('a[data-type-select="' + this.selectedTab + '"]').parent("li").addClass('active');
     },
-    afterRender: function(){
+    afterRender: function() {
       this.setSelectedTab(this.selectedTab);
     },
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/e3425b03/app/addons/databases/base.js
----------------------------------------------------------------------
diff --git a/app/addons/databases/base.js b/app/addons/databases/base.js
index 1be1ddf..e5aafd6 100644
--- a/app/addons/databases/base.js
+++ b/app/addons/databases/base.js
@@ -57,7 +57,7 @@ function(app, FauxtonAPI, Databases, Views) {
   });
 
   FauxtonAPI.registerUrls('allDBs', {
-    app: function(){
+    app: function() {
       return '_all_dbs' ;
     }
   });

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/e3425b03/app/addons/databases/resources.js
----------------------------------------------------------------------
diff --git a/app/addons/databases/resources.js b/app/addons/databases/resources.js
index 89c1c47..39e05a3 100644
--- a/app/addons/databases/resources.js
+++ b/app/addons/databases/resources.js
@@ -44,7 +44,7 @@ function(app, FauxtonAPI, Documents) {
       return this.allDocs;
     },
 
-    isNew: function(){
+    isNew: function() {
       // Databases are never new, to make Backbone do a PUT
       return false;
     },
@@ -70,7 +70,7 @@ function(app, FauxtonAPI, Documents) {
         return app.host + "/" + this.safeID();
       }
     },
-    safeName: function(){
+    safeName: function() {
       return app.utils.safeURLName(this.get("name"));
     },
     safeID: function() {
@@ -96,7 +96,7 @@ function(app, FauxtonAPI, Documents) {
       this.database = options.database;
       this.params = options.params;
     },
-    documentation: function(){
+    documentation: function() {
       return FauxtonAPI.constants.DOC_URLS.CHANGES;
     },
     url: function (context) {
@@ -149,7 +149,7 @@ function(app, FauxtonAPI, Documents) {
     },
 
     dataSize: function () {
-      if (this.get("other")){
+      if (this.get("other")) {
         return this.get("other").data_size;
       } else if (this.get('data_size')) {
         return this.get('data_size');

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/e3425b03/app/addons/documents/index-editor/stores.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/index-editor/stores.js b/app/addons/documents/index-editor/stores.js
index d96783b..bfcdf29 100644
--- a/app/addons/documents/index-editor/stores.js
+++ b/app/addons/documents/index-editor/stores.js
@@ -21,7 +21,7 @@ function(FauxtonAPI, ActionTypes) {
   Stores.IndexEditorStore = FauxtonAPI.Store.extend({
 
     defaultMap: 'function(doc) {\n  emit(doc._id, 1);\n}',
-    defaultReduce: 'function(keys, values, rereduce){\n  if (rereduce){\n    return sum(values);\n  } else {\n    return values.length;\n  }\n}',
+    defaultReduce: 'function(keys, values, rereduce) {\n  if (rereduce) {\n    return sum(values);\n  } else {\n    return values.length;\n  }\n}',
 
     editIndex: function (options) {
       this._database = options.database;

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/e3425b03/app/addons/documents/pagination/tests/paginationStoreSpec.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/pagination/tests/paginationStoreSpec.js b/app/addons/documents/pagination/tests/paginationStoreSpec.js
index 0c45c88..2230af5 100644
--- a/app/addons/documents/pagination/tests/paginationStoreSpec.js
+++ b/app/addons/documents/pagination/tests/paginationStoreSpec.js
@@ -194,13 +194,13 @@ define([
         assert.equal(store.getPerPage(), 20);
       });
 
-      it('uses localstorage when available', function (){
+      it('uses localstorage when available', function () {
         window.localStorage.setItem('fauxton:perpage', 44);
         store.initPerPage();
         assert.equal(store.getPerPage(), 44);
       });
 
-      it('uses doc limit when its less than perPage', function (){
+      it('uses doc limit when its less than perPage', function () {
         window.localStorage.setItem('fauxton:perpage', 100);
         store._docLimit = 6;
         store.initPerPage();

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/e3425b03/app/addons/documents/resources.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/resources.js b/app/addons/documents/resources.js
index 025c4ea..18bb213 100644
--- a/app/addons/documents/resources.js
+++ b/app/addons/documents/resources.js
@@ -47,7 +47,7 @@ function(app, FauxtonAPI, Documents, PagingCollection) {
 
   Documents.DdocInfo = FauxtonAPI.Model.extend({
     idAttribute: "_id",
-    documentation: function(){
+    documentation: function() {
       return FauxtonAPI.constants.DOC_URLS.GENERAL;
     },
     initialize: function (_attrs, options) {
@@ -177,7 +177,7 @@ function(app, FauxtonAPI, Documents, PagingCollection) {
 
   Documents.IndexCollection = PagingCollection.extend({
     model: Documents.Doc,
-    documentation: function(){
+    documentation: function() {
       return FauxtonAPI.constants.DOC_URLS.GENERAL;
     },
     initialize: function(_models, options) {
@@ -259,7 +259,7 @@ function(app, FauxtonAPI, Documents, PagingCollection) {
       return PagingCollection.prototype.parse.apply(this, arguments);
     },
 
-    buildAllDocs: function(){
+    buildAllDocs: function() {
       this.fetch();
     },
 
@@ -270,7 +270,7 @@ function(app, FauxtonAPI, Documents, PagingCollection) {
       return PagingCollection.prototype.fetch.call(this);
     },
 
-    allDocs: function(){
+    allDocs: function() {
       return this.models;
     },
 
@@ -311,7 +311,7 @@ function(app, FauxtonAPI, Documents, PagingCollection) {
 
   Documents.PouchIndexCollection = PagingCollection.extend({
     model: Documents.ViewRow,
-    documentation: function(){
+    documentation: function() {
       return FauxtonAPI.constants.DOC_URLS.GENERAL;
     },
     initialize: function(_models, options) {
@@ -368,11 +368,11 @@ function(app, FauxtonAPI, Documents, PagingCollection) {
       return this.viewMeta.update_seq || false;
     },
 
-    buildAllDocs: function(){
+    buildAllDocs: function() {
       this.fetch();
     },
 
-    allDocs: function(){
+    allDocs: function() {
       return this.models;
     }
   });

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/e3425b03/app/addons/documents/shared-resources.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/shared-resources.js b/app/addons/documents/shared-resources.js
index 6299e2c..930c600 100644
--- a/app/addons/documents/shared-resources.js
+++ b/app/addons/documents/shared-resources.js
@@ -23,7 +23,7 @@ define([
 
   Documents.Doc = FauxtonAPI.Model.extend({
     idAttribute: "_id",
-    documentation: function(){
+    documentation: function() {
       return FauxtonAPI.constants.DOC_URLS.GENERAL;
     },
     url: function(context) {
@@ -61,7 +61,7 @@ define([
       return this.docType() != "reduction";
     },
 
-    isFromView: function(){
+    isFromView: function() {
       return !this.id;
     },
 
@@ -155,7 +155,7 @@ define([
     // treated separately. For instance, we could default into the
     // json editor for docs, or into a ddoc specific page.
     safeID: function() {
-      if (this.isDdoc()){
+      if (this.isDdoc()) {
         var ddoc = this.id.replace(/^_design\//, "");
         return "_design/" + app.utils.safeURLName(ddoc);
       }else{
@@ -288,11 +288,11 @@ define([
 
       // remove any query errors that may return without doc info
       // important for when querying keys on all docs
-      var cleanRows = _.filter(rows, function(row){
+      var cleanRows = _.filter(rows, function(row) {
         return row.value;
       });
 
-      resp.rows = _.map(cleanRows, function(row){
+      resp.rows = _.map(cleanRows, function(row) {
         return {
           _id: row.id,
           _rev: row.value.rev,

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/e3425b03/app/addons/documents/shared-views.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/shared-views.js b/app/addons/documents/shared-views.js
index 6f614bd..f4595f8 100644
--- a/app/addons/documents/shared-views.js
+++ b/app/addons/documents/shared-views.js
@@ -118,7 +118,7 @@ function(app, FauxtonAPI, Components, Documents, Databases) {
       this.designDocList = [];
 
       this.collection.each(function(design) {
-        if (design.has('doc')){
+        if (design.has('doc')) {
           design.collection = this.collection;
           var view = this.insertView(new Views.DdocSidenav({
             model: design,
@@ -143,7 +143,7 @@ function(app, FauxtonAPI, Components, Documents, Databases) {
       this.$('li').removeClass('active');
       $selectedTab.parent().addClass('active');
 
-      if ($selectedTab.parents(".accordion-body").length !== 0){
+      if ($selectedTab.parents(".accordion-body").length !== 0) {
         $selectedTab
         .parents(".accordion-body")
         .addClass("in")
@@ -163,10 +163,10 @@ function(app, FauxtonAPI, Components, Documents, Databases) {
       "click .js-collapse-toggle": "toggleArrow"
     },
 
-    toggleArrow:  function(e){
+    toggleArrow:  function(e) {
       this.$(e.currentTarget).toggleClass("down");
     },
-    buildIndexList: function(designDocs, info){
+    buildIndexList: function(designDocs, info) {
       var design = this.model.id.replace(/^_design\//, "");
       var databaseId = this.model.database.id;
 
@@ -181,7 +181,7 @@ function(app, FauxtonAPI, Components, Documents, Databases) {
       }));
     },
 
-    serialize: function(){
+    serialize: function() {
       var ddocName = this.model.id.replace(/^_design\//, ""),
           docSafe = app.utils.safeURLName(ddocName),
           databaseName = this.collection.database.safeID();
@@ -220,7 +220,7 @@ function(app, FauxtonAPI, Components, Documents, Databases) {
       var ddocDocs = this.model.get("doc"),
           sidebarListTypes = FauxtonAPI.getExtensions('sidebar:list');
 
-      if (!ddocDocs){ return; }
+      if (!ddocDocs) { return; }
 
       this.buildIndexList(ddocDocs, {
         selector: "views",
@@ -252,7 +252,7 @@ function(app, FauxtonAPI, Components, Documents, Databases) {
     template: "addons/documents/templates/index_menu_item",
     tagName: 'li',
 
-    initialize: function(options){
+    initialize: function(options) {
       this.index = options.index;
       this.ddoc = options.ddoc;
       this.database = options.database;

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/e3425b03/app/addons/documents/tests/nightwatch/editDocumentsFromView.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/tests/nightwatch/editDocumentsFromView.js b/app/addons/documents/tests/nightwatch/editDocumentsFromView.js
index bc8a214..6aa2c37 100644
--- a/app/addons/documents/tests/nightwatch/editDocumentsFromView.js
+++ b/app/addons/documents/tests/nightwatch/editDocumentsFromView.js
@@ -19,7 +19,7 @@ module.exports = {
         ddocContents = {
           "views": {
             "evens": {
-              "map": "function (doc) { if (doc.number%2 === 0){ emit(doc._id, doc.number); } }",
+              "map": "function (doc) { if (doc.number%2 === 0) { emit(doc._id, doc.number); } }",
               "reduce" : "_count"
             }
           },

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/e3425b03/app/addons/documents/tests/storesSpec.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/tests/storesSpec.js b/app/addons/documents/tests/storesSpec.js
index 89adfaa..492213c 100644
--- a/app/addons/documents/tests/storesSpec.js
+++ b/app/addons/documents/tests/storesSpec.js
@@ -207,7 +207,7 @@ define([
             type: ActionTypes.SELECT_REDUCE_CHANGE,
             reduceSelectedOption: 'CUSTOM'
           });
-          assert.equal(store.getReduce(), 'function(keys, values, rereduce){\n  if (rereduce){\n    return sum(values);\n  } else {\n    return values.length;\n  }\n}');
+          assert.equal(store.getReduce(), 'function(keys, values, rereduce) {\n  if (rereduce) {\n    return sum(values);\n  } else {\n    return values.length;\n  }\n}');
         });
       });
     });

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/e3425b03/app/addons/documents/views-doceditor.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/views-doceditor.js b/app/addons/documents/views-doceditor.js
index f091a7d..9cc767e 100644
--- a/app/addons/documents/views-doceditor.js
+++ b/app/addons/documents/views-doceditor.js
@@ -582,8 +582,8 @@ function (app, FauxtonAPI, Components, Documents, Databases, prettify) {
     afterRender: function () {
       var that = this;
       this.$('.modal').on('hide', function (e) {
-        if(that.subEditor.edited){
-          if(!confirm("Close without saving changes?")){
+        if(that.subEditor.edited) {
+          if(!confirm("Close without saving changes?")) {
             e.preventDefault();
             return;
           }

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/e3425b03/app/addons/documents/views-queryoptions.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/views-queryoptions.js b/app/addons/documents/views-queryoptions.js
index 2271882..c9d1894 100644
--- a/app/addons/documents/views-queryoptions.js
+++ b/app/addons/documents/views-queryoptions.js
@@ -307,7 +307,7 @@ define([
         var $clickedEl = $(e.currentTarget);
         var $keyFieldsWrapper = this.$(".js-query-keys-wrapper");
 
-        if ($clickedEl.hasClass("active")){
+        if ($clickedEl.hasClass("active")) {
           $clickedEl.removeClass("active");
           $keyFieldsWrapper.addClass("hide");
         } else {
@@ -333,7 +333,7 @@ define([
         this.$('[name="keys"]').removeAttr("disabled");
       },
 
-      showBetweenKeysSection: function (){
+      showBetweenKeysSection: function () {
         this.$("#js-showStartEnd").show();
         this.$('[name="startkey"],[name="endkey"],[name="inclusive_end"]').removeAttr("disabled");
         this.$('.js-disabled-message').hide();

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/e3425b03/app/addons/documents/views.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/views.js b/app/addons/documents/views.js
index 323a5c8..b7a2257 100644
--- a/app/addons/documents/views.js
+++ b/app/addons/documents/views.js
@@ -555,7 +555,7 @@ function (app, FauxtonAPI, Components, Documents,
       return this.model.fetch();
     },
 
-    afterRender: function(){
+    afterRender: function() {
       this.startRefreshInterval();
     },
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/e3425b03/app/addons/fauxton/components.js
----------------------------------------------------------------------
diff --git a/app/addons/fauxton/components.js b/app/addons/fauxton/components.js
index e532ff6..0348296 100644
--- a/app/addons/fauxton/components.js
+++ b/app/addons/fauxton/components.js
@@ -73,7 +73,7 @@ function(app, FauxtonAPI, ace, spin, ZeroClipboard) {
       }
     },
 
-    beforeRender: function(){
+    beforeRender: function() {
       this.setUpCrumbs();
       this.setUpDropDownMenu();
 
@@ -82,14 +82,14 @@ function(app, FauxtonAPI, ace, spin, ZeroClipboard) {
       }
     },
 
-    setUpCrumbs: function(){
+    setUpCrumbs: function() {
       this.breadcrumbs = this.insertView("#header-breadcrumbs", new Components.Breadcrumbs({
         crumbs: this.crumbs
       }));
     },
 
-    setUpDropDownMenu: function(){
-      if (this.dropdownMenuLinks){
+    setUpDropDownMenu: function() {
+      if (this.dropdownMenuLinks) {
         this.dropdown = this.insertView("#header-dropdown-menu", new Components.MenuDropDown({
           icon: 'fonticon-cog',
           links: this.dropdownMenuLinks,
@@ -437,7 +437,7 @@ function(app, FauxtonAPI, ace, spin, ZeroClipboard) {
     },
 
     showModal: function () {
-      if (this._showModal){ this._showModal();}
+      if (this._showModal) { this._showModal();}
       this.clear_error_msg();
       this.$('.modal').modal();
 
@@ -464,7 +464,7 @@ function(app, FauxtonAPI, ace, spin, ZeroClipboard) {
     },
 
     serialize: function () {
-      if (this.model){
+      if (this.model) {
         return this.model.toJSON();
       }
       return {};
@@ -674,7 +674,7 @@ function(app, FauxtonAPI, ace, spin, ZeroClipboard) {
       return Math.floor(this.availableEditorHeight  / singleLine);
     },
 
-    getLines: function(){
+    getLines: function() {
       return this.editor.getSession().getDocument().getLength();
     },
 
@@ -802,12 +802,12 @@ function(app, FauxtonAPI, ace, spin, ZeroClipboard) {
   Components.MenuDropDown = FauxtonAPI.View.extend({
     template: "addons/fauxton/templates/menu_dropdown",
     className: "dropdown",
-    initialize: function(options){
+    initialize: function(options) {
       this.links = options.links;
       this.icon = options.icon || "fonticon-plus-circled";
       this.setUpEvents();
     },
-    setUpEvents: function(){
+    setUpEvents: function() {
       this.events = {};
       _.each(this.links, function (parentLink) {
         _.each(parentLink.links, function (link) {
@@ -816,16 +816,16 @@ function(app, FauxtonAPI, ace, spin, ZeroClipboard) {
         }, this);
       }, this);
     },
-    triggerEvent: function(e){
+    triggerEvent: function(e) {
       e.preventDefault();
       var eventTrigger = $(e.currentTarget).attr('triggerEvent');
       FauxtonAPI.Events.trigger(eventTrigger);
     },
-    update: function(links){
+    update: function(links) {
       this.links = links;
       this.render();
     },
-    serialize: function(){
+    serialize: function() {
       return {
         links: this.links,
         icon: this.icon
@@ -936,7 +936,7 @@ function(app, FauxtonAPI, ace, spin, ZeroClipboard) {
   var routeObjectSpinner;
 
   FauxtonAPI.RouteObject.on('beforeEstablish', function (routeObject) {
-    if (!routeObject.disableLoader){
+    if (!routeObject.disableLoader) {
       var opts = {
         lines: 16, // The number of lines to draw
         length: 8, // The length of each line
@@ -971,7 +971,7 @@ function(app, FauxtonAPI, ace, spin, ZeroClipboard) {
   var removeViewSpinner = function (selector) {
     var viewSpinner = viewSpinners[selector];
 
-    if (viewSpinner){
+    if (viewSpinner) {
       viewSpinner.stop();
       $(selector).find('.spinner').remove();
       delete viewSpinners[selector];
@@ -982,7 +982,7 @@ function(app, FauxtonAPI, ace, spin, ZeroClipboard) {
   FauxtonAPI.RouteObject.on('beforeRender', function (routeObject, view, selector) {
     removeRouteObjectSpinner();
 
-    if (!view.disableLoader){
+    if (!view.disableLoader) {
       var opts = {
         lines: 16, // The number of lines to draw
         length: 8, // The length of each line

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/e3425b03/app/addons/fauxton/stores.js
----------------------------------------------------------------------
diff --git a/app/addons/fauxton/stores.js b/app/addons/fauxton/stores.js
index 04b7be4..5211d9e 100644
--- a/app/addons/fauxton/stores.js
+++ b/app/addons/fauxton/stores.js
@@ -41,9 +41,9 @@ function(app, FauxtonAPI, ActionTypes) {
     },
 
     addLink: function (link) {
-      if (link.top && !link.bottomNav){
+      if (link.top && !link.bottomNav) {
         this.navLinks.unshift(link);
-      } else if (link.top && link.bottomNav){
+      } else if (link.top && link.bottomNav) {
         this.bottomNavLinks.unshift(link);
       } else if (link.bottomNav) {
         this.bottomNavLinks.push(link);

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/e3425b03/app/addons/fauxton/templates/menu_dropdown.html
----------------------------------------------------------------------
diff --git a/app/addons/fauxton/templates/menu_dropdown.html b/app/addons/fauxton/templates/menu_dropdown.html
index 3881a34..1fc3b16 100644
--- a/app/addons/fauxton/templates/menu_dropdown.html
+++ b/app/addons/fauxton/templates/menu_dropdown.html
@@ -21,7 +21,7 @@ the License.
     <% _.each(linkSection.links, function (link) { %>
       <li>
         <a
-          <% if (link.trigger){ %> data-bypass="true" triggerEvent="<%-link.trigger%>" <%}%>
+          <% if (link.trigger) { %> data-bypass="true" triggerEvent="<%-link.trigger%>" <%}%>
           <% if (link.icon) { %>
           class="icon <%- link.icon %>"
           <% } %>

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/e3425b03/app/addons/permissions/assets/less/permissions.less
----------------------------------------------------------------------
diff --git a/app/addons/permissions/assets/less/permissions.less b/app/addons/permissions/assets/less/permissions.less
index 3c52906..fdf1b31 100644
--- a/app/addons/permissions/assets/less/permissions.less
+++ b/app/addons/permissions/assets/less/permissions.less
@@ -20,7 +20,7 @@
     &:first-child {
       border-top: 1px solid #E3E3E3;
     }
-    &:nth-child(odd){
+    &:nth-child(odd) {
       border-left: 3px solid red;
     }
   }

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/e3425b03/app/addons/replication/resources.js
----------------------------------------------------------------------
diff --git a/app/addons/replication/resources.js b/app/addons/replication/resources.js
index dc74650..69fe1c1 100644
--- a/app/addons/replication/resources.js
+++ b/app/addons/replication/resources.js
@@ -49,9 +49,9 @@ function (app, FauxtonAPI) {
     url: function () {
       return app.host + '/_active_tasks';
     },
-    parse: function(resp){
+    parse: function(resp) {
       //only want replication tasks to return
-      return _.filter(resp, function(task){
+      return _.filter(resp, function(task) {
         return task.type === 'replication';
       });
     }
@@ -59,7 +59,7 @@ function (app, FauxtonAPI) {
 
   Replication.Replicate = Backbone.Model.extend({
     documentation: FauxtonAPI.constants.DOC_URLS.REPLICATION,
-    url: function(){
+    url: function() {
       return window.location.origin + '/_replicate';
     }
   });

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/e3425b03/app/addons/replication/route.js
----------------------------------------------------------------------
diff --git a/app/addons/replication/route.js b/app/addons/replication/route.js
index a40f0b8..8ec0c73 100644
--- a/app/addons/replication/route.js
+++ b/app/addons/replication/route.js
@@ -30,7 +30,7 @@ function(app, FauxtonAPI, Replication, Views) {
     crumbs: [
       { "name": 'Replicate changes from: ', 'link': 'replication' }
     ],
-    defaultView: function(dbname){
+    defaultView: function(dbname) {
       var isAdmin = FauxtonAPI.session.isAdmin();
 
       this.tasks = [];

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/e3425b03/app/addons/replication/templates/form.html
----------------------------------------------------------------------
diff --git a/app/addons/replication/templates/form.html b/app/addons/replication/templates/form.html
index 60de499..4dc12f4 100644
--- a/app/addons/replication/templates/form.html
+++ b/app/addons/replication/templates/form.html
@@ -21,8 +21,8 @@ the License.
 
     <div class="from_local local_option">
       <select id="from_name" name="source">
-        <% _.each( databases, function( db, i ){ %>
-           <option value="<%- db.name %>" <% if(selectedDB == db.name){%>selected<%}%> ><%- db.name %></option>
+        <% _.each( databases, function( db, i ) { %>
+           <option value="<%- db.name %>" <% if(selectedDB == db.name) {%>selected<%}%> ><%- db.name %></option>
         <% }); %>
       </select>
     </div>

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/e3425b03/app/addons/replication/views.js
----------------------------------------------------------------------
diff --git a/app/addons/replication/views.js b/app/addons/replication/views.js
index 8e98812..c072e11 100644
--- a/app/addons/replication/views.js
+++ b/app/addons/replication/views.js
@@ -137,7 +137,7 @@ function(app, FauxtonAPI, Components, Replication) {
       return error;
     },
 
-    serialize: function(){
+    serialize: function() {
       return {
         databases:  this.collection.toJSON(),
         selectedDB: this.selectedDB
@@ -169,7 +169,7 @@ function(app, FauxtonAPI, Components, Replication) {
       this.enableFields();
     },
 
-    updateButtonText: function(wait){
+    updateButtonText: function(wait) {
       var $button = this.$('#replication button[type=submit]');
       if (wait) {
         $button.text('Starting replication...').attr('disabled', true);

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/e3425b03/app/addons/styletests/routes.js
----------------------------------------------------------------------
diff --git a/app/addons/styletests/routes.js b/app/addons/styletests/routes.js
index 5ccbf0f..1595874 100644
--- a/app/addons/styletests/routes.js
+++ b/app/addons/styletests/routes.js
@@ -25,10 +25,10 @@ function(app, FauxtonAPI, Views) {
     },
     selectedHeader: 'theme tests',
     crumbs:[],
-    apiUrl: function(){
+    apiUrl: function() {
       return false;
     },
-    initialize: function(){
+    initialize: function() {
       this.setView("#dashboard-content", new Views.tests({}));
     }
   });

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/e3425b03/app/core/layout.js
----------------------------------------------------------------------
diff --git a/app/core/layout.js b/app/core/layout.js
index e6f1040..fe6e53b 100644
--- a/app/core/layout.js
+++ b/app/core/layout.js
@@ -40,14 +40,14 @@ define([
     },
 
     setTemplate: function(template) {
-      if (template.prefix){
+      if (template.prefix) {
         this.layout.template = template.prefix + template.name;
       } else{
         this.layout.template = "templates/layouts/" + template;
       }
       // If we're changing layouts all bets are off, so kill off all the
       // existing views in the layout.
-      _.each(this.layoutViews, function(view){view.removeView();});
+      _.each(this.layoutViews, function(view) {view.removeView();});
       this.layoutViews = {};
       return this.render().promise();
     },

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/e3425b03/app/core/routeObject.js
----------------------------------------------------------------------
diff --git a/app/core/routeObject.js b/app/core/routeObject.js
index a1c3865..03a9a0b 100644
--- a/app/core/routeObject.js
+++ b/app/core/routeObject.js
@@ -112,7 +112,7 @@ function(FauxtonAPI, Backbone) {
       });
     },
 
-    setTemplateOnFullRender: function(masterLayout){
+    setTemplateOnFullRender: function(masterLayout) {
 
       var promise = $.Deferred();
 
@@ -161,7 +161,7 @@ function(FauxtonAPI, Backbone) {
       return this.callEstablish(view.establish()).then(renderViewOnLayout, this.establishError);
     },
 
-    renderViewOnLayout: function(viewInfo, resp, xhr){
+    renderViewOnLayout: function(viewInfo, resp, xhr) {
       var masterLayout = viewInfo.masterLayout,
           triggerBroadcast = _.bind(this.triggerBroadcast, this);
 
@@ -175,7 +175,7 @@ function(FauxtonAPI, Backbone) {
       return promise;
     },
 
-    establishError: function(resp){
+    establishError: function(resp) {
       if (!resp || !resp.responseText) { return; }
       FauxtonAPI.addNotification({
             msg: 'An Error occurred: ' + JSON.parse(resp.responseText).reason,
@@ -190,7 +190,7 @@ function(FauxtonAPI, Backbone) {
       this.triggerBroadcast('renderComplete');
     },
 
-    setRenderedState: function(bool){
+    setRenderedState: function(bool) {
       this.renderedState = bool;
     },
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/e3425b03/app/core/router.js
----------------------------------------------------------------------
diff --git a/app/core/router.js b/app/core/router.js
index 6d15a6c..08a78a6 100644
--- a/app/core/router.js
+++ b/app/core/router.js
@@ -77,7 +77,7 @@ function(FauxtonAPI, Auth, Backbone) {
 
     setModuleRoutes: function(addons) {
       _.each(addons, function(module) {
-        if (module){
+        if (module) {
           module.initialize();
           // This is pure routes the addon provides
           if (module.RouteObjects) {

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/e3425b03/app/core/utils.js
----------------------------------------------------------------------
diff --git a/app/core/utils.js b/app/core/utils.js
index c8faee0..7029c45 100644
--- a/app/core/utils.js
+++ b/app/core/utils.js
@@ -66,19 +66,19 @@ function ($, _) {
       return fragment;
     },
 
-    addWindowResize: function(fun, key){
+    addWindowResize: function(fun, key) {
       onWindowResize[key] = fun;
       // You shouldn't need to call it here. Just define it at startup and each time it will loop
       // through all the functions in the hash.
       //app.initWindowResize();
     },
 
-    removeWindowResize: function(key){
+    removeWindowResize: function(key) {
       delete onWindowResize[key];
       utils.initWindowResize();
     },
 
-    initWindowResize: function(){
+    initWindowResize: function() {
       //when calling this it should be overriding what was called previously
       window.onresize = function(e) {
         // could do this instead of the above for loop
@@ -88,11 +88,11 @@ function ($, _) {
       };
     },
 
-    removeSpecialCharacters: function(name){
+    removeSpecialCharacters: function(name) {
       return name.replace(/[^\w\s]/gi, "");
     },
 
-    safeURLName: function(name){
+    safeURLName: function(name) {
       var testName = name || "";
       var checkforBad = testName.match(/[\$\-/,+-]/g);
       return (checkforBad !== null) ? encodeURIComponent(name) : name;

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/e3425b03/tasks/addon/template.js
----------------------------------------------------------------------
diff --git a/tasks/addon/template.js b/tasks/addon/template.js
index 91f95f1..89354e6 100644
--- a/tasks/addon/template.js
+++ b/tasks/addon/template.js
@@ -54,7 +54,7 @@ exports.template = function(grunt, init, done) {
       init.copyAndProcess(files, props);
 
       // Make the assets dir if requested
-      if (props.assets == "y"){
+      if (props.assets == "y") {
         var asspath = props.path + "/" + props.name.toLowerCase() + "/assets";
         grunt.file.mkdir(asspath);
         grunt.log.writeln("Created " + asspath);

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/e3425b03/tasks/fauxton.js
----------------------------------------------------------------------
diff --git a/tasks/fauxton.js b/tasks/fauxton.js
index 0393b8e..a61ccf4 100644
--- a/tasks/fauxton.js
+++ b/tasks/fauxton.js
@@ -14,7 +14,7 @@ module.exports = function(grunt) {
   var _ = grunt.util._,
       fs = require('fs');
 
-  grunt.registerMultiTask('template', 'generates an html file from a specified template', function(){
+  grunt.registerMultiTask('template', 'generates an html file from a specified template', function() {
     var data = this.data,
         _ = grunt.util._,
         tmpl = _.template(grunt.file.read(data.src), null, data.variables);
@@ -33,7 +33,7 @@ module.exports = function(grunt) {
         _ = grunt.util._;
 
     // This should probably be a helper, though they seem to have been removed
-    var fetch = function(deps, command){
+    var fetch = function(deps, command) {
       var child_process = require('child_process');
       var async = require('async');
       async.forEach(deps, function(dep, cb) {
@@ -58,13 +58,13 @@ module.exports = function(grunt) {
 
     var remoteDeps = _.filter(settings.deps, function(dep) { return !! dep.url; });
     grunt.log.writeln(remoteDeps.length + " remote dependencies");
-    var remote = fetch(remoteDeps, function(dep, destination){
+    var remote = fetch(remoteDeps, function(dep, destination) {
       return "git clone " + dep.url + " " + destination;
     });
 
     var localDeps = _.filter(settings.deps, function(dep) { return !! dep.path; });
     grunt.log.writeln(localDeps.length + " local dependencies");
-    var local = fetch(localDeps, function(dep, destination){
+    var local = fetch(localDeps, function(dep, destination) {
       // TODO: Windows
       var command = "cp -r " + dep.path + " " + destination;
       grunt.log.writeln(command);
@@ -108,7 +108,7 @@ module.exports = function(grunt) {
     grunt.file.write(dest, tmpl(app));
   });
 
-  grunt.registerMultiTask('mochaSetup', 'Generate a config.js and runner.html for tests', function(){
+  grunt.registerMultiTask('mochaSetup', 'Generate a config.js and runner.html for tests', function() {
     var data = this.data,
         configInfo,
         _ = grunt.util._,