mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-10-30 23:42:33 +01:00
Status image on Series grid will update when monitored state is changed.
This commit is contained in:
parent
ced3ef4081
commit
0f756e9e02
@ -180,6 +180,8 @@
|
||||
"Save": function () {
|
||||
//Save the form
|
||||
$('#SeriesEditorForm').submit();
|
||||
updateStatus();
|
||||
|
||||
$(this).dialog("close");
|
||||
},
|
||||
Cancel: function () {
|
||||
@ -261,5 +263,31 @@
|
||||
//Open the dialog
|
||||
$("#seriesDelete").dialog("open");
|
||||
});
|
||||
|
||||
function updateStatus() {
|
||||
var monitored = $('#Monitored').attr('checked');
|
||||
var seriesId = $('#SeriesId').val();
|
||||
var img = $('.' + seriesId).children('.statusColumn').children('img');
|
||||
var state = img.attr('alt');
|
||||
|
||||
if (state == "Ended")
|
||||
return;
|
||||
|
||||
if (state == "Active") {
|
||||
if (!monitored) {
|
||||
img.attr('title', 'Not monitored');
|
||||
img.attr('alt', 'Paused');
|
||||
img.attr('src', '../../Content/Images/pause.png');
|
||||
}
|
||||
}
|
||||
|
||||
if (state == "Paused") {
|
||||
if (monitored) {
|
||||
img.attr('title', 'Continuing');
|
||||
img.attr('alt', 'Active');
|
||||
img.attr('src', '../../Content/Images/play.png');
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
}
|
||||
|
@ -5,7 +5,7 @@
|
||||
<td class="statusColumn">
|
||||
@{if (!Model.Monitored)
|
||||
{
|
||||
<img src="../../Content/Images/pause.png" width="24" height="24" alt="Not monitored" title="Paused" />
|
||||
<img src="../../Content/Images/pause.png" width="24" height="24" alt="Paused" title="Not monitored" />
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -15,7 +15,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
<img src="../../Content/Images/play.png" width="24" height="24" alt="Continuing" title="Active" />
|
||||
<img src="../../Content/Images/play.png" width="24" height="24" alt="Active" title="Continuing" />
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user