Fixed stuff :)

NzbDrone.Console works again
Added empty collection message for Series
This commit is contained in:
Mark McDowall 2013-02-17 16:46:13 -08:00
parent b0940ed8de
commit e2314a7b17
9 changed files with 16 additions and 12 deletions

1
.gitignore vendored
View File

@ -137,3 +137,4 @@ NzbDrone.Web/_backboneApp/.idea/.
*.sqo
*.userprefs
*/test-results/*
.idea/*

View File

@ -196,6 +196,7 @@
<Content Include="_backboneApp\AddSeries\RootFolders\RootFolderCollection.js" />
<Content Include="_backboneApp\Content\jquery.dataTables.bootstrap.css" />
<Content Include="_backboneApp\Content\tablesorter.bootstrap.css" />
<Content Include="_backboneApp\Controller.js" />
<Content Include="_backboneApp\JsLibraries\jquery.js" />
<Content Include="_backboneApp\JsLibraries\jquery.tablesorter.bootstrap.js" />
<Content Include="_backboneApp\JsLibraries\jquery.tablesorter.js" />
@ -406,6 +407,7 @@
<Content Include="_backboneApp\JsLibraries\backbone.js" />
<Content Include="_backboneApp\JsLibraries\backbone.marionette.js" />
<Content Include="_backboneApp\AddSeries\addSeriesLayoutTemplate.html" />
<Content Include="_backboneApp\Series\EmptySeriesCollectionTemplate.html" />
<Content Include="_backboneApp\Series\SeriesCollectionView.js" />
<Content Include="_backboneApp\Series\Edit\EditSeriesTemplate.html" />
<Content Include="_backboneApp\Series\Edit\EditSeriesView.js" />
@ -648,6 +650,7 @@
</ItemGroup>
<ItemGroup>
<Folder Include="App_Data\" />
<Folder Include="_backboneApp\Upcoming\" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Autofac.Integration.Mvc\Autofac.Integration.Mvc.csproj">

View File

@ -10,7 +10,6 @@
series: function (action, query) {
NzbDrone.mainRegion.show(new NzbDrone.Series.SeriesCollectionView(this, action, query));
this.setTitle('NzbDrone');
},
notFound: function () {

View File

@ -13,7 +13,6 @@
}
});
NzbDrone.addInitializer(function () {
NzbDrone.Router = new NzbDrone.Router();

View File

@ -0,0 +1 @@
<td colspan="8">No series found</td>

View File

@ -6,9 +6,12 @@ define(['app', 'Quality/QualityProfileCollection', 'Series/SeriesItemView'], fun
itemViewContainer: 'tbody',
template: 'Series/SeriesCollectionTemplate',
qualityProfileCollection: qualityProfileCollection,
emptyView: NzbDrone.Series.EmptySeriesCollectionView,
initialize: function () {
this.collection = new NzbDrone.Series.SeriesCollection();
//Todo: This caused the onRendered event to be trigger twice, which displays two empty collection messages
//http://stackoverflow.com/questions/13065176/backbone-marionette-composit-view-onrender-executing-twice
this.collection.fetch();
this.qualityProfileCollection.fetch();
@ -19,7 +22,6 @@ define(['app', 'Quality/QualityProfileCollection', 'Series/SeriesItemView'], fun
table : '.x-series-table'
},
onItemRemoved: function()
{
this.ui.table.trigger('update');
@ -84,5 +86,9 @@ define(['app', 'Quality/QualityProfileCollection', 'Series/SeriesItemView'], fun
}
}
});
});
NzbDrone.Series.EmptySeriesCollectionView = Backbone.Marionette.CompositeView.extend({
template: 'Series/EmptySeriesCollectionTemplate',
tagName: 'tr'
});

View File

@ -1,6 +1,4 @@
define(['app', 'Quality/QualityProfileCollection'], function (app, qualityProfileCollection) {
NzbDrone.Series.SeriesModel = Backbone.Model.extend({
mutators: {
@ -33,8 +31,6 @@
}
},
defaults: {
episodeFileCount: 0,
episodeCount: 0,

View File

@ -48,7 +48,6 @@ define('app', function () {
ApiRoot: '/api'
};
window.NzbDrone.addInitializer(function () {
console.log('starting application');

View File

@ -74,13 +74,13 @@
<IntermediateOutputPath>C:\Users\Mark\AppData\Local\Temp\vs1A55.tmp\x86\Mono\</IntermediateOutputPath>
</PropertyGroup>
<ItemGroup>
<Reference Include="Autofac, Version=2.6.3.862, Culture=neutral, PublicKeyToken=17863af14b0044da, processorArchitecture=MSIL">
<Reference Include="Autofac, Version=3.0.0.0, Culture=neutral, PublicKeyToken=17863af14b0044da, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Autofac.2.6.3.862\lib\NET40\Autofac.dll</HintPath>
<HintPath>..\packages\Autofac.3.0.1\lib\net40\Autofac.dll</HintPath>
</Reference>
<Reference Include="Autofac.Configuration, Version=2.6.3.862, Culture=neutral, PublicKeyToken=17863af14b0044da, processorArchitecture=MSIL">
<Reference Include="Autofac.Configuration, Version=3.0.0.0, Culture=neutral, PublicKeyToken=17863af14b0044da, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Autofac.2.6.3.862\lib\NET40\Autofac.Configuration.dll</HintPath>
<HintPath>..\packages\Autofac.3.0.1\lib\net40\Autofac.Configuration.dll</HintPath>
</Reference>
<Reference Include="EnvDTE, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<EmbedInteropTypes>True</EmbedInteropTypes>