You've already forked Sonarr
							
							
				mirror of
				https://github.com/Sonarr/Sonarr.git
				synced 2025-10-31 00:07:55 +02:00 
			
		
		
		
	modal region is loaded by controller
This commit is contained in:
		| @@ -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; | ||||
|     }); | ||||
|   | ||||
							
								
								
									
										13
									
								
								UI/app.js
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								UI/app.js
									
									
									
									
									
								
							| @@ -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; | ||||
|     }); | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user