1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-09 12:32:31 +01:00

fixed more require issues

This commit is contained in:
kay.one 2013-06-14 22:28:35 -07:00
parent d1c279d3cd
commit 0ae1865dd8
6 changed files with 49 additions and 44 deletions

View File

@ -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,

View File

@ -1,7 +1,8 @@
"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();
@ -23,4 +24,7 @@ define(['app', 'marionette', 'handlebars', 'templates'], function (App, Marionet
} }
}; };
}; };
};
}); });

View File

@ -98,6 +98,8 @@
return finalObj; return finalObj;
}; };
require(['underscore'], function (_) {
_.mixin({ _.mixin({
deepClone : deepClone, deepClone : deepClone,
isBasicObject: isBasicObject, isBasicObject: isBasicObject,
@ -105,5 +107,6 @@
arrays : arrays, arrays : arrays,
deepExtend : deepExtend deepExtend : deepExtend
}); });
});
}).call(this); }).call(this);

View File

@ -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",

View File

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

View File

@ -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 = {};