1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-12-18 23:48:35 +02:00
Sonarr/UI/Series/Index/Posters/ItemView.js

40 lines
1.1 KiB
JavaScript
Raw Normal View History

'use strict';
2013-04-24 06:11:45 +03:00
define(
[
'app',
'marionette'
], function (App, Marionette) {
2013-04-24 06:11:45 +03:00
return Marionette.ItemView.extend({
tagName : 'li',
template: 'Series/Index/Posters/ItemTemplate',
2013-04-24 06:11:45 +03:00
ui: {
'progressbar': '.progress .bar',
'controls' : '.series-controls'
},
2013-04-24 06:11:45 +03:00
events: {
'click .x-edit' : 'editSeries',
'click .x-remove' : 'removeSeries',
'mouseenter .x-series-poster': 'posterHoverAction',
'mouseleave .x-series-poster': 'posterHoverAction'
},
2013-04-24 06:11:45 +03:00
editSeries: function () {
App.vent.trigger(App.Commands.EditSeriesCommand, {series:this.model});
},
2013-04-24 06:11:45 +03:00
removeSeries: function () {
App.vent.trigger(App.Commands.DeleteSeriesCommand, {series:this.model});
},
2013-04-25 21:58:38 +03:00
posterHoverAction: function () {
this.ui.controls.slideToggle();
}
});
2013-04-24 06:11:45 +03:00
});