1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-12-16 11:37:58 +02:00

modal region is loaded by controller

This commit is contained in:
Keivan Beigi 2013-07-19 16:08:41 -07:00
parent 20794bc461
commit bb86e20bed
3 changed files with 15 additions and 14 deletions

View File

@ -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({

View File

@ -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;
});

View File

@ -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;
});