parent
af2da6380b
commit
00276041ad
@ -1,12 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
define([
|
||||
'app',
|
||||
'Missing/MissingCollection'
|
||||
|
||||
], function () {
|
||||
NzbDrone.Missing.MissingItemView = Backbone.Marionette.ItemView.extend({
|
||||
template: 'Missing/MissingItemTemplate',
|
||||
tagName : 'tr',
|
||||
});
|
||||
});
|
@ -0,0 +1,84 @@
|
||||
"use strict";
|
||||
define([
|
||||
'app',
|
||||
'Missing/Collection',
|
||||
'Series/Index/Table/AirDateCell',
|
||||
'Series/Index/Table/SeriesStatusCell',
|
||||
'Shared/Toolbar/ToolbarView',
|
||||
'Shared/Toolbar/ToolbarLayout'
|
||||
],
|
||||
function () {
|
||||
NzbDrone.Missing.MissingLayout = Backbone.Marionette.Layout.extend({
|
||||
template: 'Missing/MissingLayoutTemplate',
|
||||
|
||||
regions: {
|
||||
missing: '#x-missing',
|
||||
toolbar: '#x-toolbar'
|
||||
},
|
||||
|
||||
showTable: function () {
|
||||
|
||||
var columns = [
|
||||
{
|
||||
name : 'seriesTitle',
|
||||
label : 'Series Title',
|
||||
editable : false,
|
||||
cell : Backgrid.TemplateBackedCell.extend({ template: 'Missing/SeriesTitleTemplate' }),
|
||||
headerCell: 'nzbDrone'
|
||||
},
|
||||
{
|
||||
name : 'episode',
|
||||
label : 'Episode',
|
||||
editable : false,
|
||||
sortable : false,
|
||||
cell : Backgrid.TemplateBackedCell.extend({ template: 'Missing/EpisodeColumnTemplate' }),
|
||||
headerCell: 'nzbDrone'
|
||||
},
|
||||
{
|
||||
name : 'title',
|
||||
label : 'Episode Title',
|
||||
editable : false,
|
||||
sortable : false,
|
||||
cell : 'string',
|
||||
headerCell: 'nzbDrone'
|
||||
},
|
||||
{
|
||||
name : 'airDate',
|
||||
label : 'Air Date',
|
||||
editable : false,
|
||||
cell : 'airDate',
|
||||
headerCell: 'nzbDrone'
|
||||
},
|
||||
{
|
||||
name : 'edit',
|
||||
label : '',
|
||||
editable : false,
|
||||
sortable : false,
|
||||
cell : Backgrid.TemplateBackedCell.extend({ template: 'Missing/ControlsColumnTemplate' }),
|
||||
headerCell: 'nzbDrone'
|
||||
}
|
||||
];
|
||||
|
||||
this.missing.show(new Backgrid.Grid(
|
||||
{
|
||||
row : NzbDrone.Missing.Row,
|
||||
columns : columns,
|
||||
collection: this.missingCollection,
|
||||
className : 'table table-hover'
|
||||
}));
|
||||
},
|
||||
|
||||
initialize: function () {
|
||||
this.missingCollection = new NzbDrone.Missing.Collection();
|
||||
this.missingCollection.fetch();
|
||||
},
|
||||
|
||||
onShow: function () {
|
||||
this.showTable();
|
||||
//this.toolbar.show(new NzbDrone.Shared.Toolbar.ToolbarLayout({right: [ viewButtons], context: this}));
|
||||
}
|
||||
|
||||
})
|
||||
;
|
||||
})
|
||||
;
|
@ -0,0 +1,9 @@
|
||||
NzbDrone.Missing.Row = Backgrid.Row.extend({
|
||||
events: {
|
||||
'click .x-search' : 'search'
|
||||
},
|
||||
|
||||
search: function () {
|
||||
window.alert('Episode Search');
|
||||
}
|
||||
});
|
@ -0,0 +1,21 @@
|
||||
NzbDrone.Series.Index.Table.Row = Backgrid.Row.extend({
|
||||
events: {
|
||||
'click .x-edit' : 'editSeries',
|
||||
'click .x-remove': 'removeSeries'
|
||||
},
|
||||
|
||||
editSeries: function () {
|
||||
var view = new NzbDrone.Series.Edit.EditSeriesView({ model: this.model});
|
||||
|
||||
NzbDrone.vent.trigger(NzbDrone.Events.OpenModalDialog, {
|
||||
view: view
|
||||
});
|
||||
},
|
||||
|
||||
removeSeries: function () {
|
||||
var view = new NzbDrone.Series.Delete.DeleteSeriesView({ model: this.model });
|
||||
NzbDrone.vent.trigger(NzbDrone.Events.OpenModalDialog, {
|
||||
view: view
|
||||
});
|
||||
}
|
||||
});
|
Loading…
Reference in new issue