modal region is loaded by controller

pull/2/head
Keivan Beigi 12 years ago
parent 20794bc461
commit bb86e20bed

@ -13,7 +13,8 @@ define(
'Calendar/CalendarLayout',
'Logs/Layout',
'Release/Layout',
'Shared/NotFoundView'
'Shared/NotFoundView',
'Shared/Modal/Region'
], function (App, Marionette, HistoryLayout, SettingsLayout, AddSeriesLayout, SeriesIndexLayout, SeriesDetailsLayout, MissingLayout, SeriesModel, CalendarLayout,
LogsLayout, ReleaseLayout, NotFoundView) {
return Marionette.Controller.extend({

@ -1,11 +1,12 @@
'use strict';
define(
[
'app',
'$',
'marionette',
'bootstrap'
], function ($, Marionette) {
return Marionette.Region.extend({
], function (app, $, Marionette) {
var region = Marionette.Region.extend({
el: '#modal-region',
constructor: function () {
@ -37,4 +38,12 @@ define(
}
});
app.addInitializer(function () {
app.addRegions({
modalRegion : region
});
});
return region;
});

@ -164,9 +164,8 @@ require.config({
define(
[
'marionette',
'shared/modal/region',
'Instrumentation/StringFormat',
], function (Marionette, ModalRegion) {
'Instrumentation/StringFormat'
], function (Marionette) {
var app = new Marionette.Application();
@ -179,14 +178,12 @@ define(
SaveSettings: 'saveSettings'
};
app.addInitializer(function () {
console.log('starting application');
});
app.addRegions({
mainRegion : '#main-region',
modalRegion : ModalRegion,
footerRegion : '#footer-region'
});
@ -200,9 +197,3 @@ define(
return app;
});

Loading…
Cancel
Save