Removed delete button from series lists, added refresh button

New: Refresh button on series lists (replaces delete)
New: Show series title on poster on hover
This commit is contained in:
Mark McDowall 2014-06-18 23:46:04 -07:00
parent 420e6ee533
commit 6c9ea60382
7 changed files with 106 additions and 55 deletions

View file

@ -3,25 +3,38 @@
define(
[
'vent',
'Cells/NzbDroneCell'
], function (vent, NzbDroneCell) {
'Cells/NzbDroneCell',
'Commands/CommandController'
], function (vent, NzbDroneCell, CommandController) {
return NzbDroneCell.extend({
className: 'series-actions-cell',
ui: {
refresh: '.x-refresh'
},
events: {
'click .x-edit-series' : '_editSeries',
'click .x-remove-series': '_removeSeries'
'click .x-edit' : '_editSeries',
'click .x-refresh' : '_refreshSeries'
},
render: function () {
this.$el.empty();
this.$el.html(
'<i class="icon-nd-edit x-edit-series" title="" data-original-title="Edit Series"></i> ' +
'<i class="icon-remove x-remove-series hidden-xs" title="" data-original-title="Delete Series"></i>'
'<i class="icon-refresh x-refresh hidden-xs" title="" data-original-title="Update series info and scan disk"></i> ' +
'<i class="icon-nd-edit x-edit" title="" data-original-title="Edit Series"></i>'
);
CommandController.bindToCommand({
element: this.$el.find('.x-refresh'),
command: {
name : 'refreshSeries',
seriesId : this.model.get('id')
}
});
this.delegateEvents();
return this;
},
@ -30,8 +43,11 @@ define(
vent.trigger(vent.Commands.EditSeriesCommand, {series:this.model});
},
_removeSeries: function () {
vent.trigger(vent.Commands.DeleteSeriesCommand, {series:this.model});
_refreshSeries: function () {
CommandController.Execute('refreshSeries', {
name : 'refreshSeries',
seriesId: this.model.id
});
}
});
});