Mercurial > hg > dml-open-vis
annotate src/DML/MainVisBundle/Resources/assets/marionette/modules/MainRegionModule/MainRegionModule.00.js @ 1:f38015048f48 tip
Added GPL
author | Daniel Wolff |
---|---|
date | Sat, 13 Feb 2016 20:43:38 +0100 |
parents | 493bcb69166c |
children |
rev | line source |
---|---|
Daniel@0 | 1 "use strict"; |
Daniel@0 | 2 |
Daniel@0 | 3 App.module("MainRegionModule", function(MainRegionModule, App, Backbone, Marionette, $, _, Logger) { |
Daniel@0 | 4 |
Daniel@0 | 5 // Prevent auto start |
Daniel@0 | 6 MainRegionModule.startWithParent = false; |
Daniel@0 | 7 |
Daniel@0 | 8 // Define options |
Daniel@0 | 9 var defaultModuleOptions = { |
Daniel@0 | 10 }; |
Daniel@0 | 11 |
Daniel@0 | 12 // Initialization checker |
Daniel@0 | 13 var assertModuleIsInitialized = function() { |
Daniel@0 | 14 if (!logger) { |
Daniel@0 | 15 throw "MainRegionModule has not been initialized"; |
Daniel@0 | 16 } |
Daniel@0 | 17 }; |
Daniel@0 | 18 |
Daniel@0 | 19 /** |
Daniel@0 | 20 * Module initializer |
Daniel@0 | 21 */ |
Daniel@0 | 22 MainRegionModule.addInitializer(function(options){ |
Daniel@0 | 23 |
Daniel@0 | 24 MainRegionModule.moduleOptions = _.extend(defaultModuleOptions, options); |
Daniel@0 | 25 |
Daniel@0 | 26 MainRegionModule.logger = Logger.get("MainRegionModule"); |
Daniel@0 | 27 MainRegionModule.logger.setLevel(Logger.DEBUG); |
Daniel@0 | 28 }); |
Daniel@0 | 29 }, Logger); |