2013-06-25 06:43:16 +02:00
|
|
|
|
'use strict';
|
2013-03-29 19:37:10 +01:00
|
|
|
|
require.config({
|
2013-02-14 03:28:56 +01:00
|
|
|
|
|
2013-06-21 03:43:58 +02:00
|
|
|
|
urlArgs: 'v=' + window.ServerStatus.version,
|
2013-06-21 02:06:56 +02:00
|
|
|
|
|
2013-02-14 03:28:56 +01:00
|
|
|
|
paths: {
|
2013-06-19 03:02:23 +02:00
|
|
|
|
'backbone' : 'JsLibraries/backbone',
|
2013-07-14 04:40:47 +02:00
|
|
|
|
'moment' : 'JsLibraries/moment',
|
2013-07-17 08:23:44 +02:00
|
|
|
|
'filesize' : 'JsLibraries/filesize',
|
2013-06-19 03:02:23 +02:00
|
|
|
|
'handlebars' : 'JsLibraries/handlebars.runtime',
|
2013-06-27 02:29:48 +02:00
|
|
|
|
'handlebars.helpers' : 'JsLibraries/handlebars.helpers',
|
2013-06-19 03:02:23 +02:00
|
|
|
|
'bootstrap' : 'JsLibraries/bootstrap',
|
|
|
|
|
'backbone.deepmodel' : 'JsLibraries/backbone.deep.model',
|
|
|
|
|
'backbone.pageable' : 'JsLibraries/backbone.pageable',
|
|
|
|
|
'backbone.modelbinder': 'JsLibraries/backbone.modelbinder',
|
|
|
|
|
'backgrid' : 'JsLibraries/backbone.backgrid',
|
|
|
|
|
'backgrid.paginator' : 'JsLibraries/backbone.backgrid.paginator',
|
|
|
|
|
'fullcalendar' : 'JsLibraries/fullcalendar',
|
|
|
|
|
'backstrech' : 'JsLibraries/jquery.backstretch',
|
|
|
|
|
'$' : 'JsLibraries/jquery',
|
2013-06-25 07:14:12 +02:00
|
|
|
|
'underscore' : 'JsLibraries/lodash.underscore',
|
2013-06-19 03:02:23 +02:00
|
|
|
|
'marionette' : 'JsLibraries/backbone.marionette',
|
|
|
|
|
'signalR' : 'JsLibraries/jquery.signalR',
|
2013-06-25 09:21:10 +02:00
|
|
|
|
'jquery.knob' : 'JsLibraries/jquery.knob',
|
2013-06-19 03:02:23 +02:00
|
|
|
|
'libs' : 'JsLibraries/'
|
2013-06-21 03:43:58 +02:00
|
|
|
|
|
2013-01-26 21:05:08 +01:00
|
|
|
|
},
|
2013-01-22 06:40:26 +01:00
|
|
|
|
|
2013-02-14 03:28:56 +01:00
|
|
|
|
shim: {
|
2013-06-15 01:18:37 +02:00
|
|
|
|
|
|
|
|
|
$: {
|
2013-06-25 07:47:56 +02:00
|
|
|
|
exports: '$',
|
|
|
|
|
|
|
|
|
|
init: function () {
|
|
|
|
|
require(
|
|
|
|
|
[
|
2013-07-06 01:53:05 +02:00
|
|
|
|
'jQuery/ToTheTop',
|
|
|
|
|
'Instrumentation/ErrorHandler'
|
2013-06-25 07:47:56 +02:00
|
|
|
|
]);
|
|
|
|
|
}
|
2013-06-15 01:18:37 +02:00
|
|
|
|
|
2013-06-25 07:47:56 +02:00
|
|
|
|
},
|
2013-06-25 06:43:16 +02:00
|
|
|
|
|
|
|
|
|
signalR: {
|
|
|
|
|
deps:
|
|
|
|
|
[
|
|
|
|
|
'$'
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
|
2013-06-15 01:18:37 +02:00
|
|
|
|
bootstrap: {
|
2013-06-21 02:06:56 +02:00
|
|
|
|
deps:
|
|
|
|
|
[
|
|
|
|
|
'$'
|
|
|
|
|
]
|
2013-06-15 01:18:37 +02:00
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
backstrech: {
|
2013-06-21 02:06:56 +02:00
|
|
|
|
deps:
|
|
|
|
|
[
|
|
|
|
|
'$'
|
|
|
|
|
]
|
2013-02-14 03:28:56 +01:00
|
|
|
|
},
|
2013-06-15 01:18:37 +02:00
|
|
|
|
|
2013-06-25 06:43:16 +02:00
|
|
|
|
underscore: {
|
2013-06-21 02:06:56 +02:00
|
|
|
|
deps :
|
|
|
|
|
[
|
|
|
|
|
'$'
|
|
|
|
|
],
|
2013-06-15 07:28:35 +02:00
|
|
|
|
exports: '_'
|
2013-06-15 01:18:37 +02:00
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
backbone: {
|
2013-06-21 02:06:56 +02:00
|
|
|
|
deps :
|
|
|
|
|
[
|
2013-06-21 07:35:56 +02:00
|
|
|
|
'mixins/backbone.ajax',
|
2013-06-21 02:06:56 +02:00
|
|
|
|
'underscore',
|
|
|
|
|
'$'
|
|
|
|
|
],
|
2013-06-21 07:35:56 +02:00
|
|
|
|
exports: 'Backbone',
|
|
|
|
|
init : function (AjaxMixin) {
|
|
|
|
|
AjaxMixin.apply(Backbone);
|
|
|
|
|
}
|
2013-06-15 07:28:35 +02:00
|
|
|
|
},
|
|
|
|
|
|
2013-06-21 02:06:56 +02:00
|
|
|
|
|
2013-06-15 07:28:35 +02:00
|
|
|
|
'backbone.deepmodel': {
|
2013-06-21 02:06:56 +02:00
|
|
|
|
deps:
|
|
|
|
|
[
|
|
|
|
|
'mixins/underscore.mixin.deepExtend'
|
|
|
|
|
]
|
2013-02-14 03:28:56 +01:00
|
|
|
|
},
|
2013-06-15 01:18:37 +02:00
|
|
|
|
|
2013-02-14 03:28:56 +01:00
|
|
|
|
marionette: {
|
2013-06-21 02:06:56 +02:00
|
|
|
|
deps:
|
|
|
|
|
[
|
|
|
|
|
'backbone',
|
2013-06-21 07:35:56 +02:00
|
|
|
|
'Handlebars/backbone.marionette.templates',
|
2013-06-25 06:43:16 +02:00
|
|
|
|
'mixins/AsNamedView'
|
2013-06-21 02:06:56 +02:00
|
|
|
|
],
|
|
|
|
|
|
2013-06-15 01:18:37 +02:00
|
|
|
|
exports: 'Marionette',
|
2013-06-25 06:43:16 +02:00
|
|
|
|
init : function (Backbone, TemplateMixin, AsNamedView) {
|
2013-06-15 07:28:35 +02:00
|
|
|
|
TemplateMixin.call(Marionette.TemplateCache);
|
2013-06-19 03:02:23 +02:00
|
|
|
|
AsNamedView.call(Marionette.ItemView.prototype);
|
2013-06-21 02:06:56 +02:00
|
|
|
|
|
2013-06-15 01:18:37 +02:00
|
|
|
|
}
|
2013-02-14 03:28:56 +01:00
|
|
|
|
},
|
2013-06-15 01:18:37 +02:00
|
|
|
|
|
2013-06-25 09:31:01 +02:00
|
|
|
|
'jquery.knob': {
|
2013-06-25 09:21:10 +02:00
|
|
|
|
deps:
|
|
|
|
|
[
|
|
|
|
|
'$'
|
|
|
|
|
]
|
|
|
|
|
},
|
2013-06-21 02:06:56 +02:00
|
|
|
|
|
2013-06-15 01:18:37 +02:00
|
|
|
|
'backbone.pageable': {
|
2013-06-21 02:06:56 +02:00
|
|
|
|
deps:
|
|
|
|
|
[
|
|
|
|
|
'backbone'
|
|
|
|
|
]
|
2013-06-15 01:18:37 +02:00
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
backgrid : {
|
2013-06-21 02:06:56 +02:00
|
|
|
|
deps:
|
|
|
|
|
[
|
|
|
|
|
'backbone'
|
|
|
|
|
],
|
2013-06-21 07:35:56 +02:00
|
|
|
|
|
|
|
|
|
exports: 'Backgrid',
|
|
|
|
|
|
2013-06-15 01:18:37 +02:00
|
|
|
|
init: function () {
|
2013-06-25 01:41:59 +02:00
|
|
|
|
require(
|
|
|
|
|
[
|
|
|
|
|
'Shared/Grid/HeaderCell'
|
|
|
|
|
], function () {
|
|
|
|
|
|
|
|
|
|
Backgrid.Column.prototype.defaults = {
|
|
|
|
|
name : undefined,
|
|
|
|
|
label : undefined,
|
|
|
|
|
sortable : true,
|
|
|
|
|
editable : false,
|
|
|
|
|
renderable: true,
|
|
|
|
|
formatter : undefined,
|
|
|
|
|
cell : undefined,
|
|
|
|
|
headerCell: 'NzbDrone'
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
});
|
2013-06-15 01:18:37 +02:00
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
'backgrid.paginator': {
|
2013-06-25 01:41:59 +02:00
|
|
|
|
|
|
|
|
|
exports: 'Backgrid.Extension.Paginator',
|
|
|
|
|
|
2013-06-21 02:06:56 +02:00
|
|
|
|
deps:
|
|
|
|
|
[
|
|
|
|
|
'backgrid'
|
|
|
|
|
]
|
2013-02-14 03:28:56 +01:00
|
|
|
|
}
|
2013-01-28 19:06:54 +01:00
|
|
|
|
}
|
2013-01-26 21:05:08 +01:00
|
|
|
|
});
|
2013-01-22 06:40:26 +01:00
|
|
|
|
|
2013-06-21 02:06:56 +02:00
|
|
|
|
define(
|
|
|
|
|
[
|
|
|
|
|
'marionette',
|
|
|
|
|
'shared/modal/region',
|
|
|
|
|
'Instrumentation/StringFormat',
|
2013-06-21 07:19:41 +02:00
|
|
|
|
], function (Marionette, ModalRegion) {
|
2013-01-22 06:40:26 +01:00
|
|
|
|
|
2013-06-25 01:41:59 +02:00
|
|
|
|
var app = new Marionette.Application();
|
2013-05-12 01:39:32 +02:00
|
|
|
|
|
2013-06-25 01:41:59 +02:00
|
|
|
|
app.Events = {
|
2013-06-21 02:06:56 +02:00
|
|
|
|
SeriesAdded: 'seriesAdded'
|
|
|
|
|
};
|
2013-02-16 01:49:25 +01:00
|
|
|
|
|
2013-06-25 01:41:59 +02:00
|
|
|
|
app.Commands = {
|
2013-06-21 02:06:56 +02:00
|
|
|
|
SaveSettings: 'saveSettings'
|
|
|
|
|
};
|
2013-04-25 06:27:49 +02:00
|
|
|
|
|
2013-01-22 06:40:26 +01:00
|
|
|
|
|
2013-06-25 01:41:59 +02:00
|
|
|
|
app.addInitializer(function () {
|
2013-06-21 02:06:56 +02:00
|
|
|
|
console.log('starting application');
|
|
|
|
|
});
|
2013-02-14 03:28:56 +01:00
|
|
|
|
|
2013-06-25 01:41:59 +02:00
|
|
|
|
app.addRegions({
|
2013-06-21 02:06:56 +02:00
|
|
|
|
mainRegion : '#main-region',
|
|
|
|
|
modalRegion : ModalRegion,
|
|
|
|
|
footerRegion : '#footer-region'
|
|
|
|
|
});
|
2013-03-29 19:37:10 +01:00
|
|
|
|
|
2013-06-25 01:41:59 +02:00
|
|
|
|
app.start();
|
2013-06-21 03:43:58 +02:00
|
|
|
|
|
2013-06-21 02:06:56 +02:00
|
|
|
|
window.require(
|
|
|
|
|
[
|
2013-06-21 08:01:00 +02:00
|
|
|
|
'Router',
|
|
|
|
|
'jQuery/TooltipBinder'
|
2013-06-21 02:06:56 +02:00
|
|
|
|
]);
|
|
|
|
|
|
2013-06-25 01:41:59 +02:00
|
|
|
|
return app;
|
2013-06-21 02:06:56 +02:00
|
|
|
|
});
|
2013-02-14 03:28:56 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-29 19:37:10 +01:00
|
|
|
|
|