Created
February 20, 2013 04:38
-
-
Save dbouwman/4992923 to your computer and use it in GitHub Desktop.
Empty Module and Controller
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*global gmm */ | |
if (!this.gmm || typeof this.gmm !== 'object') { | |
this.gmm = {}; | |
} | |
(function () { | |
'use strict'; | |
gmm.Viewer.module('NavbarModule', function (Mod, Viewer, Backbone, Marionette, $, _) { | |
//================================== | |
//initializer called on Viewer.start(options) | |
//================================== | |
Mod.addInitializer(function (options) { | |
Mod.controller = new Controller({ | |
toolItems: options.toolItems, | |
//we pass in the region from the app because it will be | |
//converted into a Marionette.Region for us | |
region: Viewer.toolsRegion | |
}); | |
}); | |
//================================== | |
//Controller for the NavbarModule | |
//================================== | |
var Controller = Backbone.Marionette.Controller.extend({ | |
initialize: function (options) { | |
_.bindAll(); | |
this.region = options.region; | |
}); | |
}); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment