Skip to content

Instantly share code, notes, and snippets.

@mattd
Last active December 10, 2015 22:29
Show Gist options
  • Select an option

  • Save mattd/4502387 to your computer and use it in GitHub Desktop.

Select an option

Save mattd/4502387 to your computer and use it in GitHub Desktop.
define([
'vent',
'routers/manage/groups',
'routers/manage/learners',
'controllers/manage/groups',
'controllers/manage/learners',
'views/layouts/manage/module',
'views/tab/collection/section',
'collections/client/tab/section'
], function (
vent,
ManageGroupsRouter,
ManageLearnersRouter,
ManageGroupsController,
ManageLearnersController,
ManageModuleLayout,
SectionTabCollectionView,
SectionTabCollection
) {
"use strict";
return function (manageModule, app) {
this.config.options.startWithParent = false;
this.layout = new ManageModuleLayout();
this.addInitializer(function () {
this.layout.on('render', function () {
this.sectionNav.show(
new SectionTabCollectionView({
collection: new SectionTabCollection([
{id: 'learners', text: 'Learners Tab'},
{id: 'groups', text: 'Groups Tab'}
])
})
);
});
this.config.app.canvas.show(this.layout);
});
app.addInitializer(function () {
new ManageGroupsRouter({
controller: new ManageGroupsController({
region: manageModule.layout.content
})
});
new ManageLearnersRouter({
controller: new ManageLearnersController({
region: manageModule.layout.content
})
});
});
};
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment