mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
everything should be moved to require.js
This commit is contained in:
57
NzbDrone.Web/_backboneApp/Series/SeriesCollectionView.js
Normal file
57
NzbDrone.Web/_backboneApp/Series/SeriesCollectionView.js
Normal file
@@ -0,0 +1,57 @@
|
||||
'use strict';
|
||||
|
||||
define(['app', 'Series/SeriesItemView', 'Quality/QualityProfileCollection','datatables'], function () {
|
||||
NzbDrone.Series.SeriesCollectionView = Backbone.Marionette.CompositeView.extend({
|
||||
itemView: NzbDrone.Series.SeriesItemView,
|
||||
itemViewOptions: {},
|
||||
template: 'Series/SeriesCollectionTemplate',
|
||||
tagName: 'table',
|
||||
className: 'table table-hover',
|
||||
qualityProfileCollection: new NzbDrone.Quality.QualityProfileCollection(),
|
||||
|
||||
initialize: function () {
|
||||
this.qualityProfileCollection.fetch();
|
||||
this.itemViewOptions = { qualityProfiles: this.qualityProfileCollection };
|
||||
},
|
||||
|
||||
onRender: function () {
|
||||
$('.table').dataTable({
|
||||
sDom: "<'row'<'span14'l><'span6'f>r>t<'row'<'span14'i><'span6'p>>",
|
||||
sPaginationType: "bootstrap",
|
||||
bLengthChange: false,
|
||||
bPaginate: false,
|
||||
bFilter: true,
|
||||
aaSorting: [[1, 'asc']],
|
||||
bStateSave: true,
|
||||
iCookieDuration: 60 * 60 * 24 * 365, //1 year
|
||||
oLanguage: {
|
||||
sInfo: "_TOTAL_ series",
|
||||
sEmptyTable: "No series have been added"
|
||||
},
|
||||
aoColumns: [
|
||||
{
|
||||
sType: "title-string",
|
||||
sWidth: "13px"
|
||||
},
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
{
|
||||
sType: "best-date"
|
||||
},
|
||||
{
|
||||
bSortable: false,
|
||||
sWidth: "125px"
|
||||
},
|
||||
{
|
||||
bSortable: false,
|
||||
sWidth: "50px"
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
Reference in New Issue
Block a user