2013-04-24 05:11:45 +02:00
|
|
|
|
'use strict';
|
|
|
|
|
|
|
|
|
|
define([
|
|
|
|
|
'app',
|
|
|
|
|
'Quality/QualityProfileCollection',
|
|
|
|
|
'Series/SeriesCollection',
|
|
|
|
|
'Series/Edit/EditSeriesView',
|
|
|
|
|
'Series/Delete/DeleteSeriesView'
|
|
|
|
|
|
|
|
|
|
], function () {
|
|
|
|
|
|
|
|
|
|
NzbDrone.Series.Index.Posters.ItemView = Backbone.Marionette.ItemView.extend({
|
|
|
|
|
tagName : 'li',
|
|
|
|
|
template: 'Series/Index/Posters/ItemTemplate',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ui: {
|
2013-04-25 02:23:07 +02:00
|
|
|
|
'progressbar': '.progress .bar',
|
2013-04-25 20:58:38 +02:00
|
|
|
|
'controls': '.series-controls'
|
2013-04-24 05:11:45 +02:00
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
events: {
|
|
|
|
|
'click .x-edit' : 'editSeries',
|
2013-04-25 20:58:38 +02:00
|
|
|
|
'click .x-remove': 'removeSeries',
|
|
|
|
|
'mouseenter .x-series-poster': 'posterHoverAction',
|
|
|
|
|
'mouseleave .x-series-poster': 'posterHoverAction'
|
2013-04-24 05:11:45 +02:00
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
initialize: function (options) {
|
|
|
|
|
this.qualityProfileCollection = options.qualityProfiles;
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
editSeries: function () {
|
|
|
|
|
var view = new NzbDrone.Series.Edit.EditSeriesView({ model: this.model});
|
2013-05-15 03:17:24 +02:00
|
|
|
|
NzbDrone.modalRegion.show(view);
|
2013-04-24 05:11:45 +02:00
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
removeSeries: function () {
|
|
|
|
|
var view = new NzbDrone.Series.Delete.DeleteSeriesView({ model: this.model });
|
2013-05-15 03:17:24 +02:00
|
|
|
|
NzbDrone.modalRegion.show(view);
|
2013-04-25 20:58:38 +02:00
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
posterHoverAction: function () {
|
|
|
|
|
this.ui.controls.slideToggle();
|
2013-04-24 05:11:45 +02:00
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|