|
|
@ -1,8 +1,11 @@
|
|
|
|
"use strict";
|
|
|
|
"use strict";
|
|
|
|
require.config({
|
|
|
|
require.config({
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
urlArgs: 'bust=' + window.ServerStatus.version,
|
|
|
|
|
|
|
|
|
|
|
|
paths: {
|
|
|
|
paths: {
|
|
|
|
'backbone' : 'JsLibraries/backbone',
|
|
|
|
'backbone' : 'JsLibraries/backbone',
|
|
|
|
|
|
|
|
'sugar' : 'JsLibraries/sugar',
|
|
|
|
'handlebars' : 'JsLibraries/handlebars.runtime',
|
|
|
|
'handlebars' : 'JsLibraries/handlebars.runtime',
|
|
|
|
'bootstrap' : 'JsLibraries/bootstrap',
|
|
|
|
'bootstrap' : 'JsLibraries/bootstrap',
|
|
|
|
'bootstrap.slider' : 'JsLibraries/bootstrap.slider',
|
|
|
|
'bootstrap.slider' : 'JsLibraries/bootstrap.slider',
|
|
|
@ -24,58 +27,100 @@ require.config({
|
|
|
|
shim: {
|
|
|
|
shim: {
|
|
|
|
|
|
|
|
|
|
|
|
$: {
|
|
|
|
$: {
|
|
|
|
exports: '$'
|
|
|
|
exports: '$',
|
|
|
|
|
|
|
|
init : function () {
|
|
|
|
|
|
|
|
window.Constants = {
|
|
|
|
|
|
|
|
ApiRoot: '/api'
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
bootstrap: {
|
|
|
|
bootstrap: {
|
|
|
|
deps: ['$']
|
|
|
|
deps:
|
|
|
|
|
|
|
|
[
|
|
|
|
|
|
|
|
'$'
|
|
|
|
|
|
|
|
]
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
'bootstrap.slider': {
|
|
|
|
'bootstrap.slider': {
|
|
|
|
deps: ['$']
|
|
|
|
deps:
|
|
|
|
|
|
|
|
[
|
|
|
|
|
|
|
|
'$'
|
|
|
|
|
|
|
|
]
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
backstrech: {
|
|
|
|
backstrech: {
|
|
|
|
deps: ['$']
|
|
|
|
deps:
|
|
|
|
|
|
|
|
[
|
|
|
|
|
|
|
|
'$'
|
|
|
|
|
|
|
|
]
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
'underscore': {
|
|
|
|
'underscore': {
|
|
|
|
deps : ['$'],
|
|
|
|
deps :
|
|
|
|
|
|
|
|
[
|
|
|
|
|
|
|
|
'$'
|
|
|
|
|
|
|
|
],
|
|
|
|
exports: '_'
|
|
|
|
exports: '_'
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
backbone: {
|
|
|
|
backbone: {
|
|
|
|
deps : ['underscore', '$'],
|
|
|
|
deps :
|
|
|
|
|
|
|
|
[
|
|
|
|
|
|
|
|
'underscore',
|
|
|
|
|
|
|
|
'$'
|
|
|
|
|
|
|
|
],
|
|
|
|
exports: 'Backbone'
|
|
|
|
exports: 'Backbone'
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
'backbone.deepmodel': {
|
|
|
|
'backbone.deepmodel': {
|
|
|
|
deps: ['mixins/underscore.mixin.deepExtend']
|
|
|
|
deps:
|
|
|
|
|
|
|
|
[
|
|
|
|
|
|
|
|
'mixins/underscore.mixin.deepExtend'
|
|
|
|
|
|
|
|
]
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
marionette: {
|
|
|
|
marionette: {
|
|
|
|
deps : [
|
|
|
|
deps:
|
|
|
|
|
|
|
|
[
|
|
|
|
'backbone',
|
|
|
|
'backbone',
|
|
|
|
|
|
|
|
'handlebars',
|
|
|
|
'mixins/backbone.marionette.templates',
|
|
|
|
'mixins/backbone.marionette.templates',
|
|
|
|
'mixins/AsNamedView'
|
|
|
|
'mixins/AsNamedView',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
'Handlebars/Helpers/DateTime'
|
|
|
|
],
|
|
|
|
],
|
|
|
|
|
|
|
|
|
|
|
|
exports: 'Marionette',
|
|
|
|
exports: 'Marionette',
|
|
|
|
init : function (Backbone, TemplateMixin, AsNamedView) {
|
|
|
|
init : function (Backbone, Handlebars, TemplateMixin, AsNamedView, DateTimeHelpers) {
|
|
|
|
TemplateMixin.call(Marionette.TemplateCache);
|
|
|
|
TemplateMixin.call(Marionette.TemplateCache);
|
|
|
|
AsNamedView.call(Marionette.ItemView.prototype);
|
|
|
|
AsNamedView.call(Marionette.ItemView.prototype);
|
|
|
|
|
|
|
|
DateTimeHelpers.register(Handlebars);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
signalR: {
|
|
|
|
signalR: {
|
|
|
|
deps: ['$']
|
|
|
|
deps:
|
|
|
|
|
|
|
|
[
|
|
|
|
|
|
|
|
'$'
|
|
|
|
|
|
|
|
]
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
'backbone.pageable': {
|
|
|
|
'backbone.pageable': {
|
|
|
|
deps: ['backbone']
|
|
|
|
deps:
|
|
|
|
|
|
|
|
[
|
|
|
|
|
|
|
|
'backbone'
|
|
|
|
|
|
|
|
]
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
backgrid : {
|
|
|
|
backgrid : {
|
|
|
|
deps: ['backbone'],
|
|
|
|
deps:
|
|
|
|
|
|
|
|
[
|
|
|
|
|
|
|
|
'backbone'
|
|
|
|
|
|
|
|
],
|
|
|
|
init: function () {
|
|
|
|
init: function () {
|
|
|
|
Backgrid.Column.prototype.defaults = {
|
|
|
|
Backgrid.Column.prototype.defaults = {
|
|
|
|
name : undefined,
|
|
|
|
name : undefined,
|
|
|
@ -90,19 +135,26 @@ require.config({
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
'backgrid.paginator': {
|
|
|
|
'backgrid.paginator': {
|
|
|
|
deps: ['backgrid']
|
|
|
|
deps:
|
|
|
|
|
|
|
|
[
|
|
|
|
|
|
|
|
'backgrid'
|
|
|
|
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
define([
|
|
|
|
define(
|
|
|
|
|
|
|
|
[
|
|
|
|
'marionette',
|
|
|
|
'marionette',
|
|
|
|
'shared/modal/region',
|
|
|
|
'shared/modal/region',
|
|
|
|
'Instrumentation/StringFormat',
|
|
|
|
'Instrumentation/StringFormat',
|
|
|
|
'Instrumentation/ErrorHandler'
|
|
|
|
'Instrumentation/ErrorHandler'
|
|
|
|
], function (Marionette, ModalRegion) {
|
|
|
|
], function (Marionette, ModalRegion) {
|
|
|
|
|
|
|
|
|
|
|
|
require(['libs/backbone.mutators']);
|
|
|
|
require(
|
|
|
|
|
|
|
|
[
|
|
|
|
|
|
|
|
'libs/backbone.mutators'
|
|
|
|
|
|
|
|
]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
window.NzbDrone = new Marionette.Application();
|
|
|
|
window.NzbDrone = new Marionette.Application();
|
|
|
@ -141,8 +193,7 @@ define([
|
|
|
|
Toolbar : {},
|
|
|
|
Toolbar : {},
|
|
|
|
Messenger : {},
|
|
|
|
Messenger : {},
|
|
|
|
FormatHelpers: {},
|
|
|
|
FormatHelpers: {},
|
|
|
|
Grid : {},
|
|
|
|
Grid : {}
|
|
|
|
Footer : {}
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
window.NzbDrone.Cells = {};
|
|
|
|
window.NzbDrone.Cells = {};
|
|
|
@ -164,9 +215,7 @@ define([
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
window.NzbDrone.Constants = {
|
|
|
|
window.NzbDrone.Constants = {
|
|
|
|
ApiRoot : '/api',
|
|
|
|
ApiRoot: '/api'
|
|
|
|
Version : '0.0.0.0',
|
|
|
|
|
|
|
|
BuildDate: '2013-01-01T00:00:00Z'
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
window.NzbDrone.addInitializer(function () {
|
|
|
|
window.NzbDrone.addInitializer(function () {
|
|
|
@ -184,8 +233,14 @@ define([
|
|
|
|
|
|
|
|
|
|
|
|
window.NzbDrone.start();
|
|
|
|
window.NzbDrone.start();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
window.require(
|
|
|
|
|
|
|
|
[
|
|
|
|
|
|
|
|
'Routing'
|
|
|
|
|
|
|
|
]);
|
|
|
|
|
|
|
|
|
|
|
|
return NzbDrone;
|
|
|
|
return NzbDrone;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|