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:
parent
420e6ee533
commit
6c9ea60382
|
@ -3,25 +3,38 @@
|
||||||
define(
|
define(
|
||||||
[
|
[
|
||||||
'vent',
|
'vent',
|
||||||
'Cells/NzbDroneCell'
|
'Cells/NzbDroneCell',
|
||||||
], function (vent, NzbDroneCell) {
|
'Commands/CommandController'
|
||||||
|
], function (vent, NzbDroneCell, CommandController) {
|
||||||
return NzbDroneCell.extend({
|
return NzbDroneCell.extend({
|
||||||
|
|
||||||
className: 'series-actions-cell',
|
className: 'series-actions-cell',
|
||||||
|
|
||||||
|
ui: {
|
||||||
|
refresh: '.x-refresh'
|
||||||
|
},
|
||||||
|
|
||||||
events: {
|
events: {
|
||||||
'click .x-edit-series' : '_editSeries',
|
'click .x-edit' : '_editSeries',
|
||||||
'click .x-remove-series': '_removeSeries'
|
'click .x-refresh' : '_refreshSeries'
|
||||||
},
|
},
|
||||||
|
|
||||||
render: function () {
|
render: function () {
|
||||||
this.$el.empty();
|
this.$el.empty();
|
||||||
|
|
||||||
this.$el.html(
|
this.$el.html(
|
||||||
'<i class="icon-nd-edit x-edit-series" title="" data-original-title="Edit Series"></i> ' +
|
'<i class="icon-refresh x-refresh hidden-xs" title="" data-original-title="Update series info and scan disk"></i> ' +
|
||||||
'<i class="icon-remove x-remove-series hidden-xs" title="" data-original-title="Delete Series"></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();
|
this.delegateEvents();
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
@ -30,8 +43,11 @@ define(
|
||||||
vent.trigger(vent.Commands.EditSeriesCommand, {series:this.model});
|
vent.trigger(vent.Commands.EditSeriesCommand, {series:this.model});
|
||||||
},
|
},
|
||||||
|
|
||||||
_removeSeries: function () {
|
_refreshSeries: function () {
|
||||||
vent.trigger(vent.Commands.DeleteSeriesCommand, {series:this.model});
|
CommandController.Execute('refreshSeries', {
|
||||||
|
name : 'refreshSeries',
|
||||||
|
seriesId: this.model.id
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -3,26 +3,10 @@
|
||||||
define(
|
define(
|
||||||
[
|
[
|
||||||
'vent',
|
'vent',
|
||||||
'marionette'
|
'marionette',
|
||||||
], function (vent, Marionette) {
|
'Series/Index/SeriesIndexItemView'
|
||||||
return Marionette.ItemView.extend({
|
], function (vent, Marionette, SeriesIndexItemView) {
|
||||||
|
return SeriesIndexItemView.extend({
|
||||||
template: 'Series/Index/Overview/SeriesOverviewItemViewTemplate',
|
template: 'Series/Index/Overview/SeriesOverviewItemViewTemplate',
|
||||||
|
|
||||||
ui: {
|
|
||||||
'progressbar': '.progress .bar'
|
|
||||||
},
|
|
||||||
|
|
||||||
events: {
|
|
||||||
'click .x-edit' : 'editSeries',
|
|
||||||
'click .x-remove': 'removeSeries'
|
|
||||||
},
|
|
||||||
|
|
||||||
editSeries: function () {
|
|
||||||
vent.trigger(vent.Commands.EditSeriesCommand, {series: this.model});
|
|
||||||
},
|
|
||||||
|
|
||||||
removeSeries: function () {
|
|
||||||
vent.trigger(vent.Commands.DeleteSeriesCommand, {series: this.model});
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -14,8 +14,8 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-2 col-xs-2">
|
<div class="col-md-2 col-xs-2">
|
||||||
<div class="pull-right series-overview-list-actions">
|
<div class="pull-right series-overview-list-actions">
|
||||||
|
<i class="icon-refresh x-refresh" title="Update series info and scan disk"/>
|
||||||
<i class="icon-nd-edit x-edit" title="Edit Series"/>
|
<i class="icon-nd-edit x-edit" title="Edit Series"/>
|
||||||
<i class="icon-remove x-remove" title="Delete Series"/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -3,37 +3,25 @@
|
||||||
define(
|
define(
|
||||||
[
|
[
|
||||||
'vent',
|
'vent',
|
||||||
'marionette'
|
'marionette',
|
||||||
], function (vent, Marionette) {
|
'Series/Index/SeriesIndexItemView'
|
||||||
|
], function (vent, Marionette, SeriesIndexItemView) {
|
||||||
|
|
||||||
return Marionette.ItemView.extend({
|
return SeriesIndexItemView.extend({
|
||||||
tagName : 'li',
|
tagName : 'li',
|
||||||
template: 'Series/Index/Posters/SeriesPostersItemViewTemplate',
|
template: 'Series/Index/Posters/SeriesPostersItemViewTemplate',
|
||||||
|
|
||||||
|
initialize: function () {
|
||||||
|
this.events['mouseenter .x-series-poster'] = 'posterHoverAction';
|
||||||
|
this.events['mouseleave .x-series-poster'] = 'posterHoverAction';
|
||||||
|
|
||||||
ui: {
|
this.ui.controls = '.x-series-controls';
|
||||||
'progressbar': '.progress .bar',
|
this.ui.title = '.x-title';
|
||||||
'controls' : '.series-controls'
|
|
||||||
},
|
|
||||||
|
|
||||||
events: {
|
|
||||||
'click .x-edit' : 'editSeries',
|
|
||||||
'click .x-remove' : 'removeSeries',
|
|
||||||
'mouseenter .x-series-poster': 'posterHoverAction',
|
|
||||||
'mouseleave .x-series-poster': 'posterHoverAction'
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
editSeries: function () {
|
|
||||||
vent.trigger(vent.Commands.EditSeriesCommand, {series:this.model});
|
|
||||||
},
|
|
||||||
|
|
||||||
removeSeries: function () {
|
|
||||||
vent.trigger(vent.Commands.DeleteSeriesCommand, {series:this.model});
|
|
||||||
},
|
},
|
||||||
|
|
||||||
posterHoverAction: function () {
|
posterHoverAction: function () {
|
||||||
this.ui.controls.slideToggle();
|
this.ui.controls.slideToggle();
|
||||||
|
this.ui.title.slideToggle();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
<div class="series-posters-item">
|
<div class="series-posters-item">
|
||||||
<div class="center">
|
<div class="center">
|
||||||
<div class="series-poster-container x-series-poster">
|
<div class="series-poster-container x-series-poster">
|
||||||
<div class="series-controls">
|
<div class="series-controls x-series-controls">
|
||||||
|
<i class="icon-refresh x-refresh" title="Refresh Series"/>
|
||||||
<i class="icon-nd-edit x-edit" title="Edit Series"/>
|
<i class="icon-nd-edit x-edit" title="Edit Series"/>
|
||||||
<i class="icon-remove x-remove" title="Delete Series"/>
|
|
||||||
</div>
|
</div>
|
||||||
{{#unless_eq status compare="continuing"}}
|
{{#unless_eq status compare="continuing"}}
|
||||||
<div class="ended-banner">Ended</div>
|
<div class="ended-banner">Ended</div>
|
||||||
|
@ -12,6 +12,9 @@
|
||||||
<img class="series-poster" src="{{poster}}" {{defaultImg}}>
|
<img class="series-poster" src="{{poster}}" {{defaultImg}}>
|
||||||
<div class="center title">{{title}}</div>
|
<div class="center title">{{title}}</div>
|
||||||
</a>
|
</a>
|
||||||
|
<div class="hidden-title x-title">
|
||||||
|
{{title}}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,41 @@
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
define(
|
||||||
|
[
|
||||||
|
'vent',
|
||||||
|
'marionette',
|
||||||
|
'Commands/CommandController'
|
||||||
|
], function (vent, Marionette, CommandController) {
|
||||||
|
return Marionette.ItemView.extend({
|
||||||
|
|
||||||
|
ui: {
|
||||||
|
refresh : '.x-refresh'
|
||||||
|
},
|
||||||
|
|
||||||
|
events: {
|
||||||
|
'click .x-edit' : '_editSeries',
|
||||||
|
'click .x-refresh' : '_refreshSeries'
|
||||||
|
},
|
||||||
|
|
||||||
|
onRender: function () {
|
||||||
|
CommandController.bindToCommand({
|
||||||
|
element: this.ui.refresh,
|
||||||
|
command: {
|
||||||
|
name : 'refreshSeries',
|
||||||
|
seriesId : this.model.get('id')
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
_editSeries: function () {
|
||||||
|
vent.trigger(vent.Commands.EditSeriesCommand, {series: this.model});
|
||||||
|
},
|
||||||
|
|
||||||
|
_refreshSeries: function () {
|
||||||
|
CommandController.Execute('refreshSeries', {
|
||||||
|
name : 'refreshSeries',
|
||||||
|
seriesId: this.model.id
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
|
@ -188,7 +188,22 @@
|
||||||
background-color : #eeeeee;
|
background-color : #eeeeee;
|
||||||
width : 100%;
|
width : 100%;
|
||||||
text-align : right;
|
text-align : right;
|
||||||
padding-right : 20px;
|
padding-right : 10px;
|
||||||
|
.opacity(0.8);
|
||||||
|
display : none;
|
||||||
|
|
||||||
|
i {
|
||||||
|
.clickable();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.hidden-title {
|
||||||
|
position : absolute;;
|
||||||
|
bottom : 0px;
|
||||||
|
overflow : hidden;
|
||||||
|
background-color : #eeeeee;
|
||||||
|
width : 100%;
|
||||||
|
text-align : center;
|
||||||
.opacity(0.8);
|
.opacity(0.8);
|
||||||
display : none;
|
display : none;
|
||||||
}
|
}
|
||||||
|
@ -279,7 +294,7 @@
|
||||||
text-transform : none;
|
text-transform : none;
|
||||||
|
|
||||||
i {
|
i {
|
||||||
.clickable;
|
.clickable();
|
||||||
font-size : 24px;
|
font-size : 24px;
|
||||||
padding-left : 5px;
|
padding-left : 5px;
|
||||||
}
|
}
|
||||||
|
@ -340,6 +355,10 @@
|
||||||
.series-overview-list-actions {
|
.series-overview-list-actions {
|
||||||
min-width: 56px;
|
min-width: 56px;
|
||||||
max-width: 56px;
|
max-width: 56px;
|
||||||
|
|
||||||
|
i {
|
||||||
|
.clickable();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Editor
|
//Editor
|
||||||
|
|
Loading…
Reference in New Issue