styleguide: 2 spaces intendation PR: #326 PR-URL: https://github.com/apache/couchdb-fauxton/pull/326 Reviewed-By: garren smith <garren.sm...@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/7f441fa5 Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/tree/7f441fa5 Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/diff/7f441fa5 Branch: refs/heads/master Commit: 7f441fa51e8c3f817885984030b6dcb7b254d82c Parents: 5fb57a6 Author: Robert Kowalski <r...@kowalski.gd> Authored: Sun Mar 22 18:31:27 2015 +0100 Committer: Robert Kowalski <robertkowal...@apache.org> Committed: Wed Mar 25 11:11:40 2015 +0100 ---------------------------------------------------------------------- Gruntfile.js | 10 +++--- app/addons/auth/resources.js | 8 ++--- app/addons/cors/components.react.jsx | 4 +-- app/addons/cors/stores.js | 4 +-- app/addons/databases/base.js | 2 +- app/addons/databases/resources.js | 2 +- app/addons/databases/views.js | 10 +++--- app/addons/documents/changes/stores.js | 8 ++--- app/addons/documents/header/header.stores.js | 4 +-- app/addons/documents/index-editor/stores.js | 2 +- app/addons/documents/pagination/stores.js | 14 ++++---- app/addons/documents/resources.js | 2 +- app/addons/documents/shared-resources.js | 2 +- app/addons/documents/shared-views.js | 28 +++++++-------- .../tests/nightwatch/paginateAllDocs.js | 2 +- .../documents/tests/nightwatch/paginateView.js | 2 +- .../documents/tests/views-advancedoptsSpec.js | 14 ++++---- app/addons/documents/views-doceditor.js | 2 +- app/addons/documents/views.js | 24 ++++++------- app/addons/fauxton/base.js | 8 ++--- app/addons/fauxton/components.js | 28 +++++++-------- app/addons/fauxton/stores.js | 2 +- app/addons/fauxton/tests/baseSpec.js | 7 ++-- app/addons/plugins/routes.js | 38 ++++++++++---------- app/addons/replication/base.js | 2 +- app/addons/styletests/base.js | 18 +++++----- app/addons/styletests/routes.js | 22 ++++++------ app/addons/verifyinstall/base.js | 10 +++--- app/addons/verifyinstall/resources.js | 2 +- app/addons/verifyinstall/views.js | 6 ++-- app/core/layout.js | 2 +- app/core/routeObject.js | 2 +- tasks/fauxton.js | 14 ++++---- test/nightwatch_tests/helpers/helpers.js | 2 +- 34 files changed, 154 insertions(+), 153 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7f441fa5/Gruntfile.js ---------------------------------------------------------------------- diff --git a/Gruntfile.js b/Gruntfile.js index be5dc97..089d00a 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -405,11 +405,11 @@ module.exports = function(grunt) { }, shell: { - 'build-jsx': { - command: 'node ./node_modules/react-tools/bin/jsx -x jsx app/addons/ app/addons/', - stdout: true, - failOnError: true - } + 'build-jsx': { + command: 'node ./node_modules/react-tools/bin/jsx -x jsx app/addons/ app/addons/', + stdout: true, + failOnError: true + } }, exec: { http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7f441fa5/app/addons/auth/resources.js ---------------------------------------------------------------------- diff --git a/app/addons/auth/resources.js b/app/addons/auth/resources.js index ff8ffc8..b879d31 100644 --- a/app/addons/auth/resources.js +++ b/app/addons/auth/resources.js @@ -157,7 +157,7 @@ function (app, FauxtonAPI, CouchdbSession) { if (login) { return that.login(username, password); } else { - return that.fetchUser({forceFetch: true}); + return that.fetchUser({forceFetch: true}); } }); }, @@ -176,7 +176,7 @@ function (app, FauxtonAPI, CouchdbSession) { dataType: "json", data: {name: username, password: password} }).then(function () { - return that.fetchUser({forceFetch: true}); + return that.fetchUser({forceFetch: true}); }); }, @@ -190,7 +190,7 @@ function (app, FauxtonAPI, CouchdbSession) { username : "_", password : "_" }).then(function () { - return that.fetchUser({forceFetch: true }); + return that.fetchUser({forceFetch: true }); }); }, @@ -203,7 +203,7 @@ function (app, FauxtonAPI, CouchdbSession) { info = this.get('info'), userCtx = this.get('userCtx'); - var admin = new Admin({ + var admin = new Admin({ name: userCtx.name, value: password }); http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7f441fa5/app/addons/cors/components.react.jsx ---------------------------------------------------------------------- diff --git a/app/addons/cors/components.react.jsx b/app/addons/cors/components.react.jsx index 65d7cfc..357810c 100644 --- a/app/addons/cors/components.react.jsx +++ b/app/addons/cors/components.react.jsx @@ -71,7 +71,7 @@ define([ onKeyUp: function (e) { if (e.keyCode === 13) { //enter key - return this.updateOrigin(e); + return this.updateOrigin(e); } }, @@ -160,7 +160,7 @@ define([ onKeyUp: function (e) { if (e.keyCode == 13) { //enter key - return this.addOrigin(e); + return this.addOrigin(e); } }, http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7f441fa5/app/addons/cors/stores.js ---------------------------------------------------------------------- diff --git a/app/addons/cors/stores.js b/app/addons/cors/stores.js index dc70cbd..3e6ce16 100644 --- a/app/addons/cors/stores.js +++ b/app/addons/cors/stores.js @@ -25,7 +25,7 @@ define([ }, saving: function () { - this._savingStatus = 'Saving'; + this._savingStatus = 'Saving'; }, savingDone: function () { @@ -145,7 +145,7 @@ define([ break; default: - return; + return; } } http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7f441fa5/app/addons/databases/base.js ---------------------------------------------------------------------- diff --git a/app/addons/databases/base.js b/app/addons/databases/base.js index 06c872e..546bd94 100644 --- a/app/addons/databases/base.js +++ b/app/addons/databases/base.js @@ -52,7 +52,7 @@ function(app, FauxtonAPI, Databases, Views) { }, apiurl: function (id, query) { - return window.location.origin + '/' + id + '/_changes' + query; + return window.location.origin + '/' + id + '/_changes' + query; } }); http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7f441fa5/app/addons/databases/resources.js ---------------------------------------------------------------------- diff --git a/app/addons/databases/resources.js b/app/addons/databases/resources.js index 17113d4..c49aa47 100644 --- a/app/addons/databases/resources.js +++ b/app/addons/databases/resources.js @@ -105,7 +105,7 @@ function(app, FauxtonAPI, Documents) { query = "?" + $.param(this.params); } - if (!context) { context = 'server';} + if (!context) { context = 'server';} return FauxtonAPI.urls('changes', context, this.database.safeID(), query); }, http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7f441fa5/app/addons/databases/views.js ---------------------------------------------------------------------- diff --git a/app/addons/databases/views.js b/app/addons/databases/views.js index d3eb5cb..591e9a8 100644 --- a/app/addons/databases/views.js +++ b/app/addons/databases/views.js @@ -148,11 +148,11 @@ function(app, Components, FauxtonAPI, Databases) { dbname = selectedName; } if (dbname && this.collection.where({ id: app.utils.safeURLName(dbname) }).length > 0) { - // TODO: switch to using a model, or Databases.databaseUrl() - // Neither of which are in scope right now - // var db = new Database.Model({id: dbname}); - var url = FauxtonAPI.urls('allDocs', 'app', app.utils.safeURLName(dbname)); - FauxtonAPI.navigate(url); + // TODO: switch to using a model, or Databases.databaseUrl() + // Neither of which are in scope right now + // var db = new Database.Model({id: dbname}); + var url = FauxtonAPI.urls('allDocs', 'app', app.utils.safeURLName(dbname)); + FauxtonAPI.navigate(url); } else { FauxtonAPI.addNotification({ msg: 'Database does not exist.', http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7f441fa5/app/addons/documents/changes/stores.js ---------------------------------------------------------------------- diff --git a/app/addons/documents/changes/stores.js b/app/addons/documents/changes/stores.js index 2e8f279..301e8c0 100644 --- a/app/addons/documents/changes/stores.js +++ b/app/addons/documents/changes/stores.js @@ -107,19 +107,19 @@ define([ case ActionTypes.SET_CHANGES: this.setChanges(action.options); this.triggerChange(); - break; + break; case ActionTypes.TOGGLE_CHANGES_TAB_VISIBILITY: this.toggleTabVisibility(); this.triggerChange(); - break; + break; case ActionTypes.ADD_CHANGES_FILTER_ITEM: this.addFilter(action.filter); this.triggerChange(); - break; + break; case ActionTypes.REMOVE_CHANGES_FILTER_ITEM: this.removeFilter(action.filter); this.triggerChange(); - break; + break; } } }); http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7f441fa5/app/addons/documents/header/header.stores.js ---------------------------------------------------------------------- diff --git a/app/addons/documents/header/header.stores.js b/app/addons/documents/header/header.stores.js index ec40d7e..4085b0e 100644 --- a/app/addons/documents/header/header.stores.js +++ b/app/addons/documents/header/header.stores.js @@ -79,7 +79,7 @@ function (FauxtonAPI, ActionTypes) { break; default: - return; + return; } } @@ -129,7 +129,7 @@ function (FauxtonAPI, ActionTypes) { break; default: - return; + return; } } }); http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7f441fa5/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 198a440..d96783b 100644 --- a/app/addons/documents/index-editor/stores.js +++ b/app/addons/documents/index-editor/stores.js @@ -200,7 +200,7 @@ function(FauxtonAPI, ActionTypes) { break; default: - return; + return; // do nothing } } http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7f441fa5/app/addons/documents/pagination/stores.js ---------------------------------------------------------------------- diff --git a/app/addons/documents/pagination/stores.js b/app/addons/documents/pagination/stores.js index d37c66b..3802d7c 100644 --- a/app/addons/documents/pagination/stores.js +++ b/app/addons/documents/pagination/stores.js @@ -145,29 +145,29 @@ define([ case ActionTypes.NEW_PAGINATION: this.newPagination(action.collection); this.triggerChange(); - break; + break; case ActionTypes.SET_PAGINATION_DOCUMENT_LIMIT: this.setDocumentLimit(action.docLimit); this.triggerChange(); - break; + break; case ActionTypes.PAGINATION_COLLECTION_RESET: this.triggerChange(); - break; + break; case ActionTypes.PAGINATE_NEXT: this.paginateNext(); this.triggerChange(); - break; + break; case ActionTypes.PAGINATE_PREVIOUS: this.paginatePrevious(); this.triggerChange(); - break; + break; case ActionTypes.PER_PAGE_CHANGE: this.reset(); this.setPerPage(action.perPage); this.triggerChange(); - break; + break; default: - return; + return; } } }); http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7f441fa5/app/addons/documents/resources.js ---------------------------------------------------------------------- diff --git a/app/addons/documents/resources.js b/app/addons/documents/resources.js index d2e460d..c07c758 100644 --- a/app/addons/documents/resources.js +++ b/app/addons/documents/resources.js @@ -282,7 +282,7 @@ function(app, FauxtonAPI, Documents, PagingCollection) { min = Math.floor(sec / 60.0); sec = (sec % 60.0).toString(); if (sec.length < 2) { - sec = "0" + sec; + sec = "0" + sec; } h = (Math.floor(min / 60.0)).toString(); http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7f441fa5/app/addons/documents/shared-resources.js ---------------------------------------------------------------------- diff --git a/app/addons/documents/shared-resources.js b/app/addons/documents/shared-resources.js index 130bab6..11e6b04 100644 --- a/app/addons/documents/shared-resources.js +++ b/app/addons/documents/shared-resources.js @@ -278,7 +278,7 @@ define([ updateSeq: function() { if (!this.viewMeta) { - return false; + return false; } return this.viewMeta.update_seq || false; }, http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7f441fa5/app/addons/documents/shared-views.js ---------------------------------------------------------------------- diff --git a/app/addons/documents/shared-views.js b/app/addons/documents/shared-views.js index e775ffa..c3d145d 100644 --- a/app/addons/documents/shared-views.js +++ b/app/addons/documents/shared-views.js @@ -81,15 +81,15 @@ function(app, FauxtonAPI, Components, Documents, Databases) { }); return menuLinks; - }, [{ - title: 'New Doc', - url: newUrlPrefix + '/new', - icon: 'fonticon-plus-circled' - },{ - title: 'New View', - url: newUrlPrefix + '/new_view', - icon: 'fonticon-plus-circled' - }]); + }, [{ + title: 'New Doc', + url: newUrlPrefix + '/new', + icon: 'fonticon-plus-circled' + },{ + title: 'New View', + url: newUrlPrefix + '/new_view', + icon: 'fonticon-plus-circled' + }]); }, beforeRender: function(manage) { @@ -208,11 +208,11 @@ function(app, FauxtonAPI, Components, Documents, Databases) { }); return menuLinks; - }, [{ - title: 'New View', - url: '#' + FauxtonAPI.urls('new', 'addView', databaseName, docSafe), - icon: 'fonticon-plus-circled' - }]); + }, [{ + title: 'New View', + url: '#' + FauxtonAPI.urls('new', 'addView', databaseName, docSafe), + icon: 'fonticon-plus-circled' + }]); }, http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7f441fa5/app/addons/documents/tests/nightwatch/paginateAllDocs.js ---------------------------------------------------------------------- diff --git a/app/addons/documents/tests/nightwatch/paginateAllDocs.js b/app/addons/documents/tests/nightwatch/paginateAllDocs.js index ffadfd0..5774034 100644 --- a/app/addons/documents/tests/nightwatch/paginateAllDocs.js +++ b/app/addons/documents/tests/nightwatch/paginateAllDocs.js @@ -31,7 +31,7 @@ module.exports = { .execute(function () { return $('.doc-row').length; }, function (result) { - client.assert.equal(result.value, 10); + client.assert.equal(result.value, 10); }) .end(); }, http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7f441fa5/app/addons/documents/tests/nightwatch/paginateView.js ---------------------------------------------------------------------- diff --git a/app/addons/documents/tests/nightwatch/paginateView.js b/app/addons/documents/tests/nightwatch/paginateView.js index ba57e89..a711267 100644 --- a/app/addons/documents/tests/nightwatch/paginateView.js +++ b/app/addons/documents/tests/nightwatch/paginateView.js @@ -31,7 +31,7 @@ module.exports = { .execute(function () { return $('.doc-row').length; }, function (result) { - client.assert.equal(result.value, 10); + client.assert.equal(result.value, 10); }) .end(); }, http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7f441fa5/app/addons/documents/tests/views-advancedoptsSpec.js ---------------------------------------------------------------------- diff --git a/app/addons/documents/tests/views-advancedoptsSpec.js b/app/addons/documents/tests/views-advancedoptsSpec.js index fe9bbe5..48a29cb 100644 --- a/app/addons/documents/tests/views-advancedoptsSpec.js +++ b/app/addons/documents/tests/views-advancedoptsSpec.js @@ -19,14 +19,14 @@ define([ describe('Documents QueryOptions', function () { var view; - beforeEach(function () { - viewSandbox = new ViewSandbox(); - viewSandbox.renderView(view); - }); + beforeEach(function () { + viewSandbox = new ViewSandbox(); + viewSandbox.renderView(view); + }); - afterEach(function () { - viewSandbox.remove(); - }); + afterEach(function () { + viewSandbox.remove(); + }); }); }); http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7f441fa5/app/addons/documents/views-doceditor.js ---------------------------------------------------------------------- diff --git a/app/addons/documents/views-doceditor.js b/app/addons/documents/views-doceditor.js index 396994d..fd57ffd 100644 --- a/app/addons/documents/views-doceditor.js +++ b/app/addons/documents/views-doceditor.js @@ -377,7 +377,7 @@ function (app, FauxtonAPI, Components, Documents, Databases, prettify) { goBack(); } deferred.reject(); - }); + }); return deferred; }, http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7f441fa5/app/addons/documents/views.js ---------------------------------------------------------------------- diff --git a/app/addons/documents/views.js b/app/addons/documents/views.js index fefe254..3e8b8fb 100644 --- a/app/addons/documents/views.js +++ b/app/addons/documents/views.js @@ -367,16 +367,16 @@ function (app, FauxtonAPI, Components, Documents, return this.collection.fetch({reset: true}).then(function () { PaginationActions.collectionReset(); }, function (model, xhr, options) { - // TODO: handle error requests that slip through - // This should just throw a notification, not break the page - FauxtonAPI.addNotification({ - msg: "Bad Request", - type: "error", - clear: true - }); - - //now redirect back to alldocs - FauxtonAPI.navigate(model.database.url("index") + "?limit=100"); + // TODO: handle error requests that slip through + // This should just throw a notification, not break the page + FauxtonAPI.addNotification({ + msg: "Bad Request", + type: "error", + clear: true + }); + + //now redirect back to alldocs + FauxtonAPI.navigate(model.database.url("index") + "?limit=100"); }); }, @@ -535,8 +535,8 @@ function (app, FauxtonAPI, Components, Documents, }, afterRender: function () { - this.typeAhead = new Components.DocSearchTypeahead({el: '#jump-to-doc-id', database: this.database}); - this.typeAhead.render(); + this.typeAhead = new Components.DocSearchTypeahead({el: '#jump-to-doc-id', database: this.database}); + this.typeAhead.render(); } }); http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7f441fa5/app/addons/fauxton/base.js ---------------------------------------------------------------------- diff --git a/app/addons/fauxton/base.js b/app/addons/fauxton/base.js index 781aea7..01cf6f5 100644 --- a/app/addons/fauxton/base.js +++ b/app/addons/fauxton/base.js @@ -128,16 +128,16 @@ function(app, FauxtonAPI, Components, ReactComponents, Actions, ZeroClipboard) { switch (this.type) { case 'error': icon = 'fonticon-attention-circled'; - break; + break; case 'info': icon = 'fonticon-info-circled'; - break; + break; case 'success': icon = 'fonticon-ok-circled'; - break; + break; default: icon = 'fonticon-info-circled'; - break; + break; } return { http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7f441fa5/app/addons/fauxton/components.js ---------------------------------------------------------------------- diff --git a/app/addons/fauxton/components.js b/app/addons/fauxton/components.js index cf0edaa..5f72e35 100644 --- a/app/addons/fauxton/components.js +++ b/app/addons/fauxton/components.js @@ -675,7 +675,7 @@ function(app, FauxtonAPI, ace, spin, ZeroClipboard) { }, getLines: function(){ - return this.editor.getSession().getDocument().getLength(); + return this.editor.getSession().getDocument().getLength(); }, addCommands: function () { @@ -726,10 +726,10 @@ function(app, FauxtonAPI, ace, spin, ZeroClipboard) { }, hadValidCode: function () { - var errors = this.getAnnotations(); - // By default CouchDB view functions don't pass lint - return _.every(errors, function(error) { - return this.isIgnorableError(error.raw); + var errors = this.getAnnotations(); + // By default CouchDB view functions don't pass lint + return _.every(errors, function(error) { + return this.isIgnorableError(error.raw); },this); }, @@ -946,18 +946,18 @@ function(app, FauxtonAPI, ace, spin, ZeroClipboard) { speed: 1, // Rounds per second trail: 10, // Afterglow percentage shadow: false // Whether to render a shadow - }; + }; - if (routeObjectSpinner) { return; } + if (routeObjectSpinner) { return; } - if (!$('.spinner').length) { - $('<div class="spinner"></div>') - .appendTo('#app-container'); - } + if (!$('.spinner').length) { + $('<div class="spinner"></div>') + .appendTo('#app-container'); + } - routeObjectSpinner = new Spinner(opts).spin(); - $('.spinner').append(routeObjectSpinner.el); - } + routeObjectSpinner = new Spinner(opts).spin(); + $('.spinner').append(routeObjectSpinner.el); + } }); var removeRouteObjectSpinner = function () { http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7f441fa5/app/addons/fauxton/stores.js ---------------------------------------------------------------------- diff --git a/app/addons/fauxton/stores.js b/app/addons/fauxton/stores.js index 6662b57..04b7be4 100644 --- a/app/addons/fauxton/stores.js +++ b/app/addons/fauxton/stores.js @@ -175,7 +175,7 @@ function(app, FauxtonAPI, ActionTypes) { break; default: - return; + return; // do nothing } http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7f441fa5/app/addons/fauxton/tests/baseSpec.js ---------------------------------------------------------------------- diff --git a/app/addons/fauxton/tests/baseSpec.js b/app/addons/fauxton/tests/baseSpec.js index 6a04eee..63b6669 100644 --- a/app/addons/fauxton/tests/baseSpec.js +++ b/app/addons/fauxton/tests/baseSpec.js @@ -79,7 +79,7 @@ define([ }); -describe('Fauxton Notifications', function () { + describe('Fauxton Notifications', function () { it('should escape by default', function () { window.fauxton_xss_test_escaped = true; @@ -107,14 +107,15 @@ describe('Fauxton Notifications', function () { }); }); - it('should render escaped if the escape value is not explicitly false,' + - 'e.g. was forgotten in a direct call', function () { + it('should render escaped if the escape value is not explicitly false, ' + + 'e.g. was forgotten in a direct call', function () { window.fauxton_xss_test2_escaped = true; var view = new Base.Notification({ msg: '<script>window.fauxton_xss_test2_escaped = false;</script>', selector: 'body' }).render(); + view.$el.remove(); assert.ok(window.fauxton_xss_test2_escaped); delete window.fauxton_xss_test2_escaped; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7f441fa5/app/addons/plugins/routes.js ---------------------------------------------------------------------- diff --git a/app/addons/plugins/routes.js b/app/addons/plugins/routes.js index 24d47f0..7eb3a11 100644 --- a/app/addons/plugins/routes.js +++ b/app/addons/plugins/routes.js @@ -16,32 +16,32 @@ define([ "addons/plugins/resources" ], function(app, FauxtonAPI, plugins) { - var PluginsRouteObject = FauxtonAPI.RouteObject.extend({ - layout: "one_pane", + var PluginsRouteObject = FauxtonAPI.RouteObject.extend({ + layout: "one_pane", - crumbs: [ - {"name": "Plugins","link": "_plugins"} - ], + crumbs: [ + {"name": "Plugins","link": "_plugins"} + ], - routes: { - "_plugins": "pluginsRoute" - }, + routes: { + "_plugins": "pluginsRoute" + }, - selectedHeader: "Plugins", + selectedHeader: "Plugins", - roles: ["_admin"], + roles: ["_admin"], - apiUrl:'plugins', + apiUrl:'plugins', - initialize: function () { - //put common views used on all your routes here (eg: sidebars ) - }, + initialize: function () { + //put common views used on all your routes here (eg: sidebars ) + }, - pluginsRoute: function () { - this.setView("#dashboard-content", new plugins.Hello({})); - } - }); + pluginsRoute: function () { + this.setView("#dashboard-content", new plugins.Hello({})); + } + }); - plugins.RouteObjects = [PluginsRouteObject]; + plugins.RouteObjects = [PluginsRouteObject]; return plugins; }); http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7f441fa5/app/addons/replication/base.js ---------------------------------------------------------------------- diff --git a/app/addons/replication/base.js b/app/addons/replication/base.js index 5e0c717..08a5088 100644 --- a/app/addons/replication/base.js +++ b/app/addons/replication/base.js @@ -17,7 +17,7 @@ define([ ], function(app, FauxtonAPI, replication) { - replication.initialize = function() { + replication.initialize = function() { FauxtonAPI.addHeaderLink({ title: 'Replication', href: '#/replication', icon: 'fonticon-replicate' }); }; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7f441fa5/app/addons/styletests/base.js ---------------------------------------------------------------------- diff --git a/app/addons/styletests/base.js b/app/addons/styletests/base.js index f350912..51a095b 100644 --- a/app/addons/styletests/base.js +++ b/app/addons/styletests/base.js @@ -18,16 +18,16 @@ define([ function(app, FauxtonAPI, tests) { - tests.initialize = function() { + tests.initialize = function() { - FauxtonAPI.addHeaderLink({ - title: "Tests", - href: '#/tests', - bottomNav: true, - icon: "fonticon-wrench" - }); + FauxtonAPI.addHeaderLink({ + title: "Tests", + href: '#/tests', + bottomNav: true, + icon: "fonticon-wrench" + }); - }; + }; - return tests; + return tests; }); http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7f441fa5/app/addons/styletests/routes.js ---------------------------------------------------------------------- diff --git a/app/addons/styletests/routes.js b/app/addons/styletests/routes.js index d6940f1..5ccbf0f 100644 --- a/app/addons/styletests/routes.js +++ b/app/addons/styletests/routes.js @@ -18,23 +18,23 @@ define([ function(app, FauxtonAPI, Views) { - var TestRouteObject = FauxtonAPI.RouteObject.extend({ - layout: "one_pane", - routes: { - "tests": "initialize" - }, - selectedHeader: 'theme tests', - crumbs:[], + var TestRouteObject = FauxtonAPI.RouteObject.extend({ + layout: "one_pane", + routes: { + "tests": "initialize" + }, + selectedHeader: 'theme tests', + crumbs:[], apiUrl: function(){ return false; }, initialize: function(){ - this.setView("#dashboard-content", new Views.tests({})); + this.setView("#dashboard-content", new Views.tests({})); } - }); + }); - Views.RouteObjects = [TestRouteObject]; + Views.RouteObjects = [TestRouteObject]; - return Views; + return Views; }); http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7f441fa5/app/addons/verifyinstall/base.js ---------------------------------------------------------------------- diff --git a/app/addons/verifyinstall/base.js b/app/addons/verifyinstall/base.js index a64d44a..bfdb321 100644 --- a/app/addons/verifyinstall/base.js +++ b/app/addons/verifyinstall/base.js @@ -19,11 +19,11 @@ define([ function(app, FauxtonAPI, VerifyInstall) { VerifyInstall.initialize = function () { FauxtonAPI.addHeaderLink({ - title: 'Verify', - href: '#verifyinstall', - icon: 'fonticon-ok-circled', - bottomNav: true - }); + title: 'Verify', + href: '#verifyinstall', + icon: 'fonticon-ok-circled', + bottomNav: true + }); }; return VerifyInstall; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7f441fa5/app/addons/verifyinstall/resources.js ---------------------------------------------------------------------- diff --git a/app/addons/verifyinstall/resources.js b/app/addons/verifyinstall/resources.js index 8adbc03..a422ee7 100644 --- a/app/addons/verifyinstall/resources.js +++ b/app/addons/verifyinstall/resources.js @@ -42,7 +42,7 @@ function (app, FauxtonAPI, Databases, Documents) { }, destroyDoc: function () { - return doc.destroy(); + return doc.destroy(); }, updateDoc: function () { http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7f441fa5/app/addons/verifyinstall/views.js ---------------------------------------------------------------------- diff --git a/app/addons/verifyinstall/views.js b/app/addons/verifyinstall/views.js index d22681c..a7e9b9a 100644 --- a/app/addons/verifyinstall/views.js +++ b/app/addons/verifyinstall/views.js @@ -108,9 +108,9 @@ function(app, FauxtonAPI, VerifyInstall) { return testProcess.testReplicate(); }, formatError('replicate')) .then(function () { - setPass('replicate'); - complete(); - testProcess.removeDBs(); + setPass('replicate'); + complete(); + testProcess.removeDBs(); }, formatError('replicate')); this.enableButton(); http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7f441fa5/app/core/layout.js ---------------------------------------------------------------------- diff --git a/app/core/layout.js b/app/core/layout.js index ff709cb..e6f1040 100644 --- a/app/core/layout.js +++ b/app/core/layout.js @@ -78,7 +78,7 @@ define([ if (!view) { return false; - } + } this.layout.removeView(selector); http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7f441fa5/app/core/routeObject.js ---------------------------------------------------------------------- diff --git a/app/core/routeObject.js b/app/core/routeObject.js index 664c579..8132e7e 100644 --- a/app/core/routeObject.js +++ b/app/core/routeObject.js @@ -261,7 +261,7 @@ function(FauxtonAPI, Backbone) { } _.each(promise, function (p) { - this._promises.push(p); + this._promises.push(p); }, this); }, http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7f441fa5/tasks/fauxton.js ---------------------------------------------------------------------- diff --git a/tasks/fauxton.js b/tasks/fauxton.js index 1fab584..5b427ee 100644 --- a/tasks/fauxton.js +++ b/tasks/fauxton.js @@ -92,11 +92,11 @@ module.exports = function(grunt) { grunt.registerMultiTask('gen_initialize', 'Generate the app.js file', function() { var _ = grunt.util._, - settings = this.data, - template = "app/initialize.js.underscore", - dest = "app/initialize.js" - tmpl = _.template(grunt.file.read(template)), - app = {}; + settings = this.data, + template = "app/initialize.js.underscore", + dest = "app/initialize.js", + tmpl = _.template(grunt.file.read(template)), + app = {}; _.defaults(app, settings.app, { @@ -114,8 +114,8 @@ module.exports = function(grunt) { _ = grunt.util._, configTemplateSrc = data.template; - var fileSrc = grunt.option('file') || data.files.src; - var testFiles = grunt.file.expand(fileSrc); + var fileSrc = grunt.option('file') || data.files.src; + var testFiles = grunt.file.expand(fileSrc); var configTemplate = _.template(grunt.file.read(configTemplateSrc)); // a bit of a nasty hack to read our current config.js and get the info so we can change it http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7f441fa5/test/nightwatch_tests/helpers/helpers.js ---------------------------------------------------------------------- diff --git a/test/nightwatch_tests/helpers/helpers.js b/test/nightwatch_tests/helpers/helpers.js index 0fd6a95..f827268 100644 --- a/test/nightwatch_tests/helpers/helpers.js +++ b/test/nightwatch_tests/helpers/helpers.js @@ -34,7 +34,7 @@ module.exports = { // create a new database nano.db.create(database, function (err, body, header) { if (err) { - console.log('Error in setting up ' + database, err.message); + console.log('Error in setting up ' + database, err.message); } nano.db.create('_replicator', function (err, body, header) { done();