You've already forked Sonarr
							
							
				mirror of
				https://github.com/Sonarr/Sonarr.git
				synced 2025-10-31 00:07:55 +02:00 
			
		
		
		
	fixed more require issues
This commit is contained in:
		| @@ -76,7 +76,7 @@ module.exports = function (grunt) { | |||||||
|  |  | ||||||
|         handlebars: { |         handlebars: { | ||||||
|             options: { |             options: { | ||||||
|                 namespace   : "Templates", |                 namespace   : "T", | ||||||
|                 partialRegex: /Partial.html/, |                 partialRegex: /Partial.html/, | ||||||
|                 wrapped     : true, |                 wrapped     : true, | ||||||
|                 amd         : true, |                 amd         : true, | ||||||
|   | |||||||
| @@ -1,26 +1,30 @@ | |||||||
| "use strict"; | "use strict"; | ||||||
|  |  | ||||||
| define(['app', 'marionette', 'handlebars', 'templates'], function (App, Marionette, HandleBars, Templates) { | define(['templates'], function (Templates) { | ||||||
|     Marionette.TemplateCache.get = function (templateId) { |     return function () { | ||||||
|  |         this.get = function (templateId) { | ||||||
|  |  | ||||||
|         var templateKey = templateId.toLowerCase(); |             var templateKey = templateId.toLowerCase(); | ||||||
|  |  | ||||||
|         var templateFunction = Templates[templateKey]; |             var templateFunction = Templates[templateKey]; | ||||||
|  |  | ||||||
|         if (!templateFunction) { |             if (!templateFunction) { | ||||||
|             throw 'couldn\'t find pre-compiled template ' + templateKey; |                 throw 'couldn\'t find pre-compiled template ' + templateKey; | ||||||
|         } |  | ||||||
|  |  | ||||||
|         return function (data) { |  | ||||||
|  |  | ||||||
|             try { |  | ||||||
|                 return templateFunction(data); |  | ||||||
|             } |  | ||||||
|             catch (error) { |  | ||||||
|                 console.error('template render failed for ' + templateKey + ' ' + error); |  | ||||||
|                 console.error(data); |  | ||||||
|                 throw error; |  | ||||||
|             } |             } | ||||||
|  |  | ||||||
|  |             return function (data) { | ||||||
|  |  | ||||||
|  |                 try { | ||||||
|  |                     return templateFunction(data); | ||||||
|  |                 } | ||||||
|  |                 catch (error) { | ||||||
|  |                     console.error('template render failed for ' + templateKey + ' ' + error); | ||||||
|  |                     console.error(data); | ||||||
|  |                     throw error; | ||||||
|  |                 } | ||||||
|  |             }; | ||||||
|         }; |         }; | ||||||
|     }; |     }; | ||||||
| }); | }); | ||||||
|  |  | ||||||
|  |  | ||||||
|   | |||||||
| @@ -98,12 +98,15 @@ | |||||||
|         return finalObj; |         return finalObj; | ||||||
|     }; |     }; | ||||||
|  |  | ||||||
|     _.mixin({ |     require(['underscore'], function (_) { | ||||||
|         deepClone: deepClone, |  | ||||||
|         isBasicObject: isBasicObject, |         _.mixin({ | ||||||
|         basicObjects: basicObjects, |             deepClone    : deepClone, | ||||||
|         arrays: arrays, |             isBasicObject: isBasicObject, | ||||||
|         deepExtend: deepExtend |             basicObjects : basicObjects, | ||||||
|  |             arrays       : arrays, | ||||||
|  |             deepExtend   : deepExtend | ||||||
|  |         }); | ||||||
|     }); |     }); | ||||||
|  |  | ||||||
| }).call(this); | }).call(this); | ||||||
|   | |||||||
| @@ -1,6 +1,6 @@ | |||||||
| "use strict"; | "use strict"; | ||||||
|  |  | ||||||
| define(['app'], function () { | define(['app','backgrid'], function () { | ||||||
|     NzbDrone.Release.DownloadReportCell = Backgrid.Cell.extend({ |     NzbDrone.Release.DownloadReportCell = Backgrid.Cell.extend({ | ||||||
|  |  | ||||||
|         className: "download-report-cell", |         className: "download-report-cell", | ||||||
|   | |||||||
| @@ -1,6 +1,6 @@ | |||||||
| "use strict"; | "use strict"; | ||||||
| define(['marionette'], function () { | define(['marionette', 'bootstrap'], function (Marionette) { | ||||||
|     return Backbone.Marionette.Region.extend({ |     return Marionette.Region.extend({ | ||||||
|         el: "#modal-region", |         el: "#modal-region", | ||||||
|  |  | ||||||
|         constructor: function () { |         constructor: function () { | ||||||
|   | |||||||
							
								
								
									
										32
									
								
								UI/app.js
									
									
									
									
									
								
							
							
						
						
									
										32
									
								
								UI/app.js
									
									
									
									
									
								
							| @@ -39,38 +39,33 @@ require.config({ | |||||||
|         }, |         }, | ||||||
|  |  | ||||||
|         'underscore': { |         'underscore': { | ||||||
|             dep    : ['$'], |             deps   : ['$'], | ||||||
|             exports: '_', |             exports: '_' | ||||||
|             init   : function () { |  | ||||||
|                 require(['mixins/underscore.mixin.deepExtend']); |  | ||||||
|             } |  | ||||||
|         }, |         }, | ||||||
|  |  | ||||||
|         backbone: { |         backbone: { | ||||||
|             deps   : ['underscore', '$'], |             deps   : ['underscore', '$'], | ||||||
|             exports: 'Backbone', |             exports: 'Backbone' | ||||||
|             init   : function () { |         }, | ||||||
|                 require(['libs/backbone.mutators']); |  | ||||||
|             } |         'backbone.deepmodel': { | ||||||
|  |             deps: ['mixins/underscore.mixin.deepExtend'] | ||||||
|         }, |         }, | ||||||
|  |  | ||||||
|         marionette: { |         marionette: { | ||||||
|             deps   : ['backbone'], |             deps   : ['backbone', 'mixins/backbone.marionette.templates'], | ||||||
|             exports: 'Marionette', |             exports: 'Marionette', | ||||||
|             init   : function () { |             init   : function (Backbone, TemplateMixin) { | ||||||
|                 require(['mixins/backbone.marionette.templates']); |                 TemplateMixin.call(Marionette.TemplateCache); | ||||||
|             } |             } | ||||||
|         }, |         }, | ||||||
|  |  | ||||||
|         signalR: { |         signalR: { | ||||||
|             dep: ['$'] |             deps: ['$'] | ||||||
|         }, |         }, | ||||||
|  |  | ||||||
|         'backbone.pageable': { |         'backbone.pageable': { | ||||||
|             dep : ['backbone'], |             deps: ['backbone'] | ||||||
|             init: function () { |  | ||||||
|                 console.log(this); |  | ||||||
|             } |  | ||||||
|         }, |         }, | ||||||
|  |  | ||||||
|         backgrid            : { |         backgrid            : { | ||||||
| @@ -101,6 +96,9 @@ define([ | |||||||
|     'Instrumentation/ErrorHandler' |     'Instrumentation/ErrorHandler' | ||||||
| ], function (Marionette, ModalRegion) { | ], function (Marionette, ModalRegion) { | ||||||
|  |  | ||||||
|  |     require(['libs/backbone.mutators']); | ||||||
|  |  | ||||||
|  |  | ||||||
|     window.NzbDrone = new Marionette.Application(); |     window.NzbDrone = new Marionette.Application(); | ||||||
|     window.NzbDrone.Config = {}; |     window.NzbDrone.Config = {}; | ||||||
|     window.NzbDrone.Form = {}; |     window.NzbDrone.Form = {}; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user