2013-03-29 11:37:10 -07:00
|
|
|
"use strict";
|
|
|
|
require.config({
|
2013-02-13 18:28:56 -08:00
|
|
|
|
|
|
|
paths: {
|
2013-03-29 11:37:10 -07:00
|
|
|
'backbone' : 'JsLibraries/backbone',
|
2013-02-13 18:28:56 -08:00
|
|
|
'underscore': 'JsLibraries/underscore',
|
|
|
|
'marionette': 'JsLibraries/backbone.marionette',
|
2013-02-14 19:10:03 -08:00
|
|
|
'handlebars': 'JsLibraries/handlebars'
|
2013-01-26 12:05:08 -08:00
|
|
|
},
|
2013-01-21 21:40:26 -08:00
|
|
|
|
2013-02-13 18:28:56 -08:00
|
|
|
shim: {
|
|
|
|
underscore: {
|
|
|
|
exports: '_'
|
|
|
|
},
|
2013-03-29 11:37:10 -07:00
|
|
|
backbone : {
|
|
|
|
deps : ['underscore'],
|
2013-02-14 18:40:29 -08:00
|
|
|
exports: 'Backbone'
|
2013-02-13 18:28:56 -08:00
|
|
|
},
|
|
|
|
marionette: {
|
2013-03-29 11:37:10 -07:00
|
|
|
deps : ['backbone'],
|
2013-02-14 18:40:29 -08:00
|
|
|
exports: 'Marionette'
|
2013-02-13 18:28:56 -08:00
|
|
|
},
|
|
|
|
handlebars: {
|
2013-02-14 18:40:29 -08:00
|
|
|
exports: 'Handlebars'
|
2013-02-13 18:28:56 -08:00
|
|
|
}
|
2013-01-28 10:06:54 -08:00
|
|
|
}
|
2013-01-26 12:05:08 -08:00
|
|
|
});
|
2013-01-21 21:40:26 -08:00
|
|
|
|
2013-05-05 14:24:33 -07:00
|
|
|
define('app', function () {
|
2013-01-21 21:40:26 -08:00
|
|
|
|
2013-03-03 16:09:43 -08:00
|
|
|
window.NzbDrone = new Backbone.Marionette.Application();
|
2013-04-07 16:15:04 -07:00
|
|
|
window.NzbDrone.Config = {};
|
2013-03-03 16:09:43 -08:00
|
|
|
window.NzbDrone.Series = {};
|
2013-03-03 16:29:48 -08:00
|
|
|
window.NzbDrone.Series.Index = {};
|
2013-04-23 20:11:45 -07:00
|
|
|
window.NzbDrone.Series.Index.Table = {};
|
2013-04-22 17:35:04 -07:00
|
|
|
window.NzbDrone.Series.Index.List = {};
|
2013-04-23 20:11:45 -07:00
|
|
|
window.NzbDrone.Series.Index.Posters = {};
|
2013-03-03 16:09:43 -08:00
|
|
|
window.NzbDrone.Series.Edit = {};
|
|
|
|
window.NzbDrone.Series.Delete = {};
|
|
|
|
window.NzbDrone.Series.Details = {};
|
|
|
|
window.NzbDrone.AddSeries = {};
|
|
|
|
window.NzbDrone.AddSeries.New = {};
|
|
|
|
window.NzbDrone.AddSeries.Existing = {};
|
|
|
|
window.NzbDrone.AddSeries.RootFolders = {};
|
|
|
|
window.NzbDrone.Quality = {};
|
|
|
|
window.NzbDrone.Shared = {};
|
2013-04-17 17:48:52 -07:00
|
|
|
window.NzbDrone.Shared.Toolbar = {};
|
2013-03-03 16:09:43 -08:00
|
|
|
window.NzbDrone.Calendar = {};
|
|
|
|
window.NzbDrone.Settings = {};
|
|
|
|
window.NzbDrone.Settings.Naming = {};
|
|
|
|
window.NzbDrone.Settings.Quality = {};
|
2013-03-08 17:55:47 -08:00
|
|
|
window.NzbDrone.Settings.Quality.Size = {};
|
|
|
|
window.NzbDrone.Settings.Quality.Profile = {};
|
2013-03-03 16:09:43 -08:00
|
|
|
window.NzbDrone.Settings.Indexers = {};
|
|
|
|
window.NzbDrone.Settings.DownloadClient = {};
|
|
|
|
window.NzbDrone.Settings.Notifications = {};
|
|
|
|
window.NzbDrone.Settings.System = {};
|
|
|
|
window.NzbDrone.Settings.Misc = {};
|
2013-03-20 20:02:57 -07:00
|
|
|
window.NzbDrone.Missing = {};
|
2013-05-02 23:53:32 -07:00
|
|
|
window.NzbDrone.History = {};
|
2013-03-03 16:09:43 -08:00
|
|
|
|
|
|
|
window.NzbDrone.Events = {
|
2013-04-24 21:27:49 -07:00
|
|
|
//TODO: Move to commands
|
2013-03-29 11:37:10 -07:00
|
|
|
OpenModalDialog : 'openModal',
|
2013-04-12 08:08:09 -07:00
|
|
|
CloseModalDialog: 'closeModal',
|
2013-05-03 16:50:22 -07:00
|
|
|
SeriesAdded : 'seriesAdded'
|
2013-03-29 11:37:10 -07:00
|
|
|
};
|
2013-02-15 16:49:25 -08:00
|
|
|
|
2013-04-24 21:27:49 -07:00
|
|
|
window.NzbDrone.Commands = {
|
2013-05-03 16:50:22 -07:00
|
|
|
SaveSettings: 'saveSettings'
|
2013-04-24 21:27:49 -07:00
|
|
|
};
|
|
|
|
|
2013-03-03 16:09:43 -08:00
|
|
|
window.NzbDrone.Constants = {
|
|
|
|
ApiRoot: '/api'
|
|
|
|
};
|
2013-01-21 21:40:26 -08:00
|
|
|
|
2013-03-03 16:09:43 -08:00
|
|
|
window.NzbDrone.addInitializer(function () {
|
2013-02-13 18:28:56 -08:00
|
|
|
|
2013-03-03 16:09:43 -08:00
|
|
|
console.log('starting application');
|
2013-02-13 18:28:56 -08:00
|
|
|
|
2013-03-03 16:09:43 -08:00
|
|
|
});
|
2013-02-13 18:28:56 -08:00
|
|
|
|
2013-03-29 11:37:10 -07:00
|
|
|
NzbDrone.addRegions({
|
|
|
|
mainRegion : '#main-region',
|
|
|
|
notificationRegion: '#notification-region'
|
|
|
|
});
|
|
|
|
|
2013-03-03 16:09:43 -08:00
|
|
|
window.NzbDrone.start();
|
2013-02-14 09:18:29 -08:00
|
|
|
|
2013-03-03 16:09:43 -08:00
|
|
|
return NzbDrone;
|
|
|
|
});
|
2013-02-13 18:28:56 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-29 11:37:10 -07:00
|
|
|
|