diff --git a/CHANGES.md b/CHANGES.md index 4700b092..29644a5c 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -14,6 +14,9 @@ * Fix updating of pull requests * Add hidden cache debug page * Change autoProcessTV scripts python code quotes from " -> ' +* Add expand all button to Episode Status Management +* Add Unknown status query to Episode Status Management +* Fix Episode Status Management error popup from coming up when show is selected without expanding [develop changelog] * Fix traceback error when using the menu item Manage/Update Kodi diff --git a/gui/slick/css/lib/bootstrap.css b/gui/slick/css/lib/bootstrap.css index 3daf57ec..354d92db 100644 --- a/gui/slick/css/lib/bootstrap.css +++ b/gui/slick/css/lib/bootstrap.css @@ -6197,4 +6197,3 @@ button.close { display: none !important; } } -/*# sourceMappingURL=bootstrap.css.map */ diff --git a/gui/slick/interfaces/default/manage_episodeStatuses.tmpl b/gui/slick/interfaces/default/manage_episodeStatuses.tmpl index 0cd7844d..b9587f86 100644 --- a/gui/slick/interfaces/default/manage_episodeStatuses.tmpl +++ b/gui/slick/interfaces/default/manage_episodeStatuses.tmpl @@ -1,16 +1,15 @@ #import sickbeard #import datetime #from sickbeard import common -#set global $title="Episode Overview" -#set global $header="Episode Overview" -#set global $sbPath=".." +#set global $title = 'Episode Overview' +#set global $header = 'Episode Overview' +#set global $sbPath = '..' +#set global $topmenu = 'manage' -#set global $topmenu="manage"# #import os.path -#include $os.path.join($sickbeard.PROG_DIR, "gui/slick/interfaces/default/inc_top.tmpl") +#include $os.path.join($sickbeard.PROG_DIR, 'gui/slick/interfaces/default/inc_top.tmpl') -
#if $varExists('header')

$header

#else @@ -20,17 +19,16 @@ #if not $whichStatus or ($whichStatus and not $ep_counts): #if $whichStatus: -

None of your episodes have status $common.statusStrings[$int($whichStatus)]

-
+

None of your episodes have status $common.statusStrings[$int($whichStatus)]

#end if
-Manage episodes with status +#for $curStatus in [$common.SKIPPED, $common.UNKNOWN, $common.SNATCHED, $common.WANTED, $common.ARCHIVED, $common.IGNORED]: + #end for - - + +
#else @@ -40,50 +38,49 @@ Manage episodes with status -

Shows containing $common.statusStrings[$int($whichStatus)] episodes

- -
+

${len($sorted_show_ids)} Shows containing $common.statusStrings[$int($whichStatus)] episodes

#if $whichStatus in ($common.ARCHIVED, $common.IGNORED, $common.SNATCHED): -#set $row_class = "good" + #set $row_class = 'good' #else -#set $row_class = $common.Overview.overviewStrings[$whichStatus] + #set $row_class = $common.Overview.overviewStrings[$whichStatus] #end if -Set checked shows/episodes to #set $statusList = [$common.SKIPPED, $common.WANTED, $common.ARCHIVED, $common.IGNORED] #if $int($whichStatus) in $statusList -$statusList.remove($int($whichStatus)) + $statusList.remove($int($whichStatus)) #end if #if $int($whichStatus) in [$common.SNATCHED, $common.SNATCHED_PROPER] -$statusList.append($common.FAILED) + $statusList.append($common.FAILED) #end if #for $curStatus in $statusList: - + #end for - - - -
- - + + +
+ +
+ + +
-
#for $cur_indexer_id in $sorted_show_ids: - - - - + + + + #end for
$show_names[$cur_indexer_id] ($ep_counts[$cur_indexer_id])
$show_names[$cur_indexer_id] ($ep_counts[$cur_indexer_id])
#end if -
-#include $os.path.join($sickbeard.PROG_DIR,"gui/slick/interfaces/default/inc_bottom.tmpl") +#include $os.path.join($sickbeard.PROG_DIR, 'gui/slick/interfaces/default/inc_bottom.tmpl') diff --git a/gui/slick/js/manageEpisodeStatuses.js b/gui/slick/js/manageEpisodeStatuses.js index b9354e1a..8b31e102 100644 --- a/gui/slick/js/manageEpisodeStatuses.js +++ b/gui/slick/js/manageEpisodeStatuses.js @@ -1,73 +1,88 @@ $(document).ready(function() { - function make_row(indexer_id, season, episode, name, checked) { - var checkedbox = (checked ? ' checked' : ''), - row_class = $('#row_class').val(); + function make_row(indexer_id, season, episode, name, checked) { + var checkedbox = (checked ? ' checked' : ''), + row_class = $('#row_class').val(); - return ' ' - + ' ' - + '' - + ' ' + season + 'x' + episode + '' - + ' ' + name + '' - + ' '; - } + return ' ' + + ' ' + + '' + + ' ' + season + 'x' + episode + '' + + ' ' + name + '' + + ' '; + } - $('.go').click(function() { - var selected; + $('.go').click(function() { + if ($('input[class*="-epcheck"]:checked').length === 0 && $('input[id*="allCheck-"]:checked').length === 0) { + alert('Please select at least one Show or Episode'); + return false + } + }); - if (selected = (0 === $('input[class*="-epcheck"]:checked').length)) - alert('Please select at least one episode'); + $('.allCheck').click(function(){ + var indexer_id = $(this).attr('id').split('-')[1]; + $('.' + indexer_id + '-epcheck').prop('checked', $(this).prop('checked')); + }); - return !selected - }); + $('.get_more_eps').click(function(){ + var cur_indexer_id = $(this).attr('id'); + var checked = $('#allCheck-' + cur_indexer_id).prop('checked'); + var last_row = $('tr#' + cur_indexer_id); + + $.getJSON(sbRoot + '/manage/showEpisodeStatuses', + { + indexer_id: cur_indexer_id, + whichStatus: $('#oldStatus').val() + }, + function (data) { + $.each(data, function(season,eps){ + $.each(eps, function(episode, name) { + last_row.after(make_row(cur_indexer_id, season, episode, name, checked)); + }); + }); + }); + $(this).hide(); + ($('.get_more_eps:visible').length == 0 ? $('.expandAll').hide() : ''); + }); - $('.allCheck').click(function(){ - var indexer_id = $(this).attr('id').split('-')[1]; - $('.' + indexer_id + '-epcheck').prop('checked', $(this).prop('checked')); - }); + $('.expandAll').click(function() { + $('.get_more_eps').each(function() { + var cur_indexer_id = $(this).attr('id'); + var checked = $('#allCheck-' + cur_indexer_id).prop('checked'); + var last_row = $('tr#' + cur_indexer_id); - $('.get_more_eps').click(function(){ - var cur_indexer_id = $(this).attr('id'); - var checked = $('#allCheck-' + cur_indexer_id).prop('checked'); - var last_row = $('tr#' + cur_indexer_id); - - $.getJSON(sbRoot + '/manage/showEpisodeStatuses', - { - indexer_id: cur_indexer_id, - whichStatus: $('#oldStatus').val() - }, - function (data) { - $.each(data, function(season,eps){ - $.each(eps, function(episode, name) { - //alert(season+'x'+episode+': '+name); - last_row.after(make_row(cur_indexer_id, season, episode, name, checked)); - }); - }); - }); - $(this).hide(); - }); + $.getJSON(sbRoot + '/manage/showEpisodeStatuses', + { + indexer_id: cur_indexer_id, + whichStatus: $('#oldStatus').val() + }, + function (data) { + $.each(data, function(season, eps) { + $.each(eps, function(episode, name) { + last_row.after(make_row(cur_indexer_id, season, episode, name, checked)); + }); + }); + }); + $(this).hide(); + }); + $(this).hide(); + }); - // selects all visible episode checkboxes. - $('.selectAllShows').click(function(){ - $('.allCheck').each(function(){ - this.checked = true; - }); - $('input[class*="-epcheck"]').each(function(){ - this.checked = true; - }); - }); + // selects all visible episode checkboxes. + $('.selectAllShows').click(function(){ + $('.sickbeardTable input').each(function() { + this.checked = true; + }); + }); - // clears all visible episode checkboxes and the season selectors - $('.unselectAllShows').click(function(){ - $('.allCheck').each(function(){ - this.checked = false; - }); - $('input[class*="-epcheck"]').each(function(){ - this.checked = false; - }); - }); + // clears all visible episode checkboxes and the season selectors + $('.unselectAllShows').click(function(){ + $('.sickbeardTable input').each(function() { + this.checked = false; + }); + }); }); \ No newline at end of file