Daniel@0: "use strict"; Daniel@0: Daniel@0: /* Daniel@0: * TODO Daniel@0: * keep scroll position when resize Daniel@0: * Daniel@0: * fix focus outline around links in TOC in FF Daniel@0: * dotted border Daniel@0: */ Daniel@0: App.module("MainMenuModule", function(MainMenuModule, App, Backbone, Marionette, $, _, Logger) { Daniel@0: Daniel@0: // Prevent auto start Daniel@0: MainMenuModule.startWithParent = false; Daniel@0: Daniel@0: // Define options Daniel@0: var defaultModuleOptions = { Daniel@0: }; Daniel@0: var moduleOptions; Daniel@0: Daniel@0: // Initialization checker Daniel@0: var assertModuleIsInitialized = function() { Daniel@0: if (!$bar) { Daniel@0: throw "MainMenuModule has not been initialized"; Daniel@0: } Daniel@0: }; Daniel@0: Daniel@0: /** Daniel@0: * Module initializer Daniel@0: * Daniel@0: */ Daniel@0: MainMenuModule.addInitializer(function(options){ Daniel@0: Daniel@0: moduleOptions = _.extend(defaultModuleOptions, options); Daniel@0: Daniel@0: MainMenuModule.logger = Logger.get("MainMenuModule"); Daniel@0: MainMenuModule.logger.setLevel(Logger.DEBUG); Daniel@0: Daniel@0: this.barView = new App.MainMenuModule.MainMenuBarView(); Daniel@0: }); Daniel@0: Daniel@0: MainMenuModule.flashItem = function(item, times, callback) { Daniel@0: this.barView.flashItem(item, times, callback); Daniel@0: } Daniel@0: Daniel@0: }, Logger);