fixed more require issues

pull/24/head
kay.one 11 years ago
parent d1c279d3cd
commit 0ae1865dd8

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

@ -98,12 +98,15 @@
return finalObj; return finalObj;
}; };
require(['underscore'], function (_) {
_.mixin({ _.mixin({
deepClone: deepClone, deepClone : deepClone,
isBasicObject: isBasicObject, isBasicObject: isBasicObject,
basicObjects: basicObjects, basicObjects : basicObjects,
arrays: arrays, arrays : arrays,
deepExtend: deepExtend 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 () {

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

Loading…
Cancel
Save