fixed modal dialog.

This commit is contained in:
kay.one 2013-02-15 16:49:25 -08:00
parent 6a7e346bf2
commit 90332b8f01
7 changed files with 41 additions and 13 deletions

View file

@ -1,4 +1,4 @@
define(['app', 'AddSeries/AddSeriesLayout','Series/SeriesCollectionView'], function () {
define(['app', 'Shared/ModalRegion', 'AddSeries/AddSeriesLayout','Series/SeriesCollectionView', 'Shared/NotificationView'], function (app, modalRegion) {
var controller = Backbone.Marionette.Controller.extend({
@ -32,6 +32,23 @@
}
});
NzbDrone.addInitializer(function () {
NzbDrone.addRegions({modalRegion: modalRegion});
NzbDrone.vent.on(NzbDrone.Events.OpenModalDialog, function (options) {
console.log('opening modal dialog ' + options.view.template );
NzbDrone.modalRegion.show(options.view);
});
NzbDrone.vent.on(NzbDrone.Events.CloseModalDialog, function () {
console.log('closing modal dialog');
NzbDrone.modalRegion.close();
});
});
return new controller();
});