more add series backbone cleanup.

pull/6/head
Keivan Beigi 12 years ago committed by kay.one
parent c43eb59efb
commit 5e32760c6a

@ -188,8 +188,10 @@
<Content Include="_backboneApp\AddSeries\AddNewSeries\AddNewSeriesTemplate.html" />
<Content Include="_backboneApp\AddSeries\AddNewSeries\AddNewSeriesView.js" />
<Content Include="_backboneApp\AddSeries\AddNewSeries\SearchResultTemplate.html" />
<Content Include="_backboneApp\AddSeries\SeriesSearchModel.js" />
<Content Include="_backboneApp\AddSeries\SearchResultModel.js" />
<Content Include="_backboneApp\AddSeries\SearchResultCollection.js" />
<Content Include="_backboneApp\Content\Intelisense\bootstrap.css" />
<Content Include="_backboneApp\errorHandler.js" />
<Content Include="_backboneApp\JsLibraries\backbone.marionette.extend.js" />
<Compile Include="_backboneApp\CassetteConfiguration.cs" />
<Compile Include="Controllers\ImageController.cs" />
@ -380,7 +382,7 @@
<Content Include="_backboneApp\AddSeries\addSeriesLayoutTemplate.html" />
<Content Include="Cassette.targets" />
<None Include="_backboneApp\JsLibraries\jquery-1.8.2.intellisense.js" />
<Content Include="_backboneApp\JsLibraries\jquery-1.8.2.js" />
<Content Include="_backboneApp\JsLibraries\jquery.js" />
<Content Include="_backboneApp\JsLibraries\jquery-ui-1.9.0.js" />
<Content Include="_backboneApp\JsLibraries\underscore.js" />
<Content Include="Views\System\Index.cshtml" />

@ -1,5 +1,6 @@
/// <reference path="../../app.js" />
/// <reference path="../SeriesSearchModel.js" />
/// <reference path="../SearchResultModel.js" />
/// <reference path="../SearchResultCollection.js" />
NzbDrone.AddSeries.SearchItemView = Backbone.Marionette.ItemView.extend({

@ -1,11 +1,8 @@
/// <reference path="../app.js" />
NzbDrone.AddSeries.SearchResultModel = Backbone.Model.extend({
});
/// <reference path="SearchResultModel.js" />
NzbDrone.AddSeries.SearchResultCollection = Backbone.Collection.extend({
url: NzbDrone.Constants.ApiRoot + "/series/lookup",
model: NzbDrone.AddSeries.SearchResultModel,
url: "http://localhost/api/v1/series/lookup"
});

@ -0,0 +1,4 @@
/// <reference path="../app.js" />
NzbDrone.AddSeries.SearchResultModel = Backbone.Model.extend({
});

@ -1,9 +1,10 @@
/// <reference path="JsLibraries/jquery-1.8.2.js" />
/// <reference path="JsLibraries/jquery.js" />
/// <reference path="JsLibraries/underscore.js" />
/// <reference path="JsLibraries/backbone.js" />
/// <reference path="JsLibraries/backbone.marionette.js" />
/// <reference path="JsLibraries/backbone.marionette.extend.js" />
/// <reference path="JsLibraries/bootstrap.js" />
/// <reference path="errorHandler.js" />
if (typeof console == "undefined") {
window.console = { log: function () { } };
@ -13,8 +14,7 @@ NzbDrone = new Backbone.Marionette.Application();
NzbDrone.AddSeries = NzbDrone.module("AddSeries");
NzbDrone.Constants = {
ApiRoot: 'http://localhost:8080/api/v1/'
};
NzbDrone.Events = {
@ -25,7 +25,6 @@ NzbDrone.Events = {
NzbDrone.Routes = {
Series: {
Add: 'series/add',
},
};
@ -33,7 +32,7 @@ NzbDrone.Routes = {
NzbDrone.Controller = Backbone.Marionette.Controller.extend({
addSeries: function () {
NzbDrone.mainRegion.show(new NzbDrone.AddSeries.AddNewSeriesView());
NzbDrone.mainRegion.show(new NzbDrone.AddSeries.AddSeriesLayout());
},

@ -0,0 +1,11 @@
/// <reference path="JsLibraries/jquery.js" />
window.onerror = function (msg, url, line) {
alert("Error: " + msg + "\nurl: " + url + "\nline #: " + line);
var suppressErrorAlert = true;
// If you return true, then error alerts (like in older versions of
// Internet Explorer) will be suppressed.
return suppressErrorAlert;
};
Loading…
Cancel
Save