annotate src/DML/MainVisBundle/Resources/assets/marionette/modules/MainMenuModule/MainMenuModule.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 /*
Daniel@0 4 * TODO
Daniel@0 5 * keep scroll position when resize
Daniel@0 6 *
Daniel@0 7 * fix focus outline around links in TOC in FF
Daniel@0 8 * dotted border
Daniel@0 9 */
Daniel@0 10 App.module("MainMenuModule", function(MainMenuModule, App, Backbone, Marionette, $, _, Logger) {
Daniel@0 11
Daniel@0 12 // Prevent auto start
Daniel@0 13 MainMenuModule.startWithParent = false;
Daniel@0 14
Daniel@0 15 // Define options
Daniel@0 16 var defaultModuleOptions = {
Daniel@0 17 };
Daniel@0 18 var moduleOptions;
Daniel@0 19
Daniel@0 20 // Initialization checker
Daniel@0 21 var assertModuleIsInitialized = function() {
Daniel@0 22 if (!$bar) {
Daniel@0 23 throw "MainMenuModule has not been initialized";
Daniel@0 24 }
Daniel@0 25 };
Daniel@0 26
Daniel@0 27 /**
Daniel@0 28 * Module initializer
Daniel@0 29 *
Daniel@0 30 */
Daniel@0 31 MainMenuModule.addInitializer(function(options){
Daniel@0 32
Daniel@0 33 moduleOptions = _.extend(defaultModuleOptions, options);
Daniel@0 34
Daniel@0 35 MainMenuModule.logger = Logger.get("MainMenuModule");
Daniel@0 36 MainMenuModule.logger.setLevel(Logger.DEBUG);
Daniel@0 37
Daniel@0 38 this.barView = new App.MainMenuModule.MainMenuBarView();
Daniel@0 39 });
Daniel@0 40
Daniel@0 41 MainMenuModule.flashItem = function(item, times, callback) {
Daniel@0 42 this.barView.flashItem(item, times, callback);
Daniel@0 43 }
Daniel@0 44
Daniel@0 45 }, Logger);