Repository: couchdb-fauxton Updated Branches: refs/heads/master 515dcc4ea -> 47c3d9388
Constants: move to Api move constants to the creation of FauxtonAPI to make them available sooner as they are a property of FauxtonAPI Fixes the broken testsuite in a browser and App boot problems Project: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/commit/47c3d938 Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/tree/47c3d938 Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/diff/47c3d938 Branch: refs/heads/master Commit: 47c3d938823c726bbf7835936a508fc374cd171a Parents: 515dcc4 Author: Robert Kowalski <[email protected]> Authored: Thu Feb 26 16:20:01 2015 +0100 Committer: Robert Kowalski <[email protected]> Committed: Thu Feb 26 16:20:03 2015 +0100 ---------------------------------------------------------------------- app/app.js | 6 +----- app/core/api.js | 7 ++++++- 2 files changed, 7 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/47c3d938/app/app.js ---------------------------------------------------------------------- diff --git a/app/app.js b/app/app.js index af9cab4..167ccbd 100644 --- a/app/app.js +++ b/app/app.js @@ -20,7 +20,6 @@ define([ 'backbone', 'bootstrap', 'helpers', - 'constants', 'core/utils', // modules @@ -32,7 +31,7 @@ define([ 'plugins/jquery.form' ], -function(app, $, _, Backbone, Bootstrap, Helpers, constants, Utils, FauxtonAPI, Couchdb) { +function(app, $, _, Backbone, Bootstrap, Helpers, Utils, FauxtonAPI, Couchdb) { // Make sure we have a console.log if (_.isUndefined(console)) { @@ -64,9 +63,6 @@ function(app, $, _, Backbone, Bootstrap, Helpers, constants, Utils, FauxtonAPI, // Localize or create a new JavaScript Template object var JST = window.JST = window.JST || {}; - // Pass along all constants - FauxtonAPI.constants = constants; - // Configure LayoutManager with Backbone Boilerplate defaults FauxtonAPI.Layout.configure({ // Allow LayoutManager to augment Backbone.View.prototype. http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/47c3d938/app/core/api.js ---------------------------------------------------------------------- diff --git a/app/core/api.js b/app/core/api.js index a2771fd..019490b 100644 --- a/app/core/api.js +++ b/app/core/api.js @@ -17,10 +17,12 @@ define([ 'core/routeObject', 'core/utils', 'core/store', + 'constants', + 'flux' ], -function(FauxtonAPI, Layout, Router, RouteObject, utils, Store, Flux) { +function(FauxtonAPI, Layout, Router, RouteObject, utils, Store, constants, Flux) { FauxtonAPI = _.extend(FauxtonAPI, { Layout: Layout, Router: Router, @@ -31,6 +33,9 @@ function(FauxtonAPI, Layout, Router, RouteObject, utils, Store, Flux) { dispatcher: new Flux.Dispatcher() }); + // Pass along all constants + FauxtonAPI.constants = constants; + FauxtonAPI.dispatch = _.bind(FauxtonAPI.dispatcher.dispatch, FauxtonAPI.dispatcher); FauxtonAPI.navigate = function (url, _opts) {
