|
|
@ -24,9 +24,11 @@ $(".ignoreEpisode").live("click", function () {
|
|
|
|
ignored = !ignored;
|
|
|
|
ignored = !ignored;
|
|
|
|
|
|
|
|
|
|
|
|
if (toggle.hasClass('ignoredEpisodesMaster')) {
|
|
|
|
if (toggle.hasClass('ignoredEpisodesMaster')) {
|
|
|
|
seasonNumber = toggle.attr('id').replace('master_', '');
|
|
|
|
//seasonNumber = toggle.attr('id').replace('master_', '');
|
|
|
|
|
|
|
|
seasonNumber = toggle.attr('class').split(/\s+/)[2].replace('ignoreSeason_', '');
|
|
|
|
|
|
|
|
|
|
|
|
toggleChildren(seasonNumber, ignored);
|
|
|
|
toggleChildren(seasonNumber, ignored);
|
|
|
|
|
|
|
|
toggleMasters(seasonNumber, ignored);
|
|
|
|
saveSeasonIgnore(seasonNumber, ignored);
|
|
|
|
saveSeasonIgnore(seasonNumber, ignored);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -60,16 +62,36 @@ function toggleChildren(seasonNumber, ignored) {
|
|
|
|
function toggleMaster(seasonNumber) {
|
|
|
|
function toggleMaster(seasonNumber) {
|
|
|
|
var ignoreEpisodes = $('.ignoreEpisode_' + seasonNumber);
|
|
|
|
var ignoreEpisodes = $('.ignoreEpisode_' + seasonNumber);
|
|
|
|
var ignoredCount = ignoreEpisodes.filter('.ignored').length;
|
|
|
|
var ignoredCount = ignoreEpisodes.filter('.ignored').length;
|
|
|
|
var master = $('#master_' + seasonNumber);
|
|
|
|
var masters = $('.ignoreSeason_' + seasonNumber);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
masters.each(function (index) {
|
|
|
|
if (ignoreEpisodes.length == ignoredCount) {
|
|
|
|
if (ignoreEpisodes.length == ignoredCount) {
|
|
|
|
master.attr('src', ignoredImage);
|
|
|
|
$(this).attr('src', ignoredImage);
|
|
|
|
master.addClass('ignored');
|
|
|
|
$(this).addClass('ignored');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
master.attr('src', notIgnoredImage);
|
|
|
|
$(this).attr('src', notIgnoredImage);
|
|
|
|
master.removeClass('ignored');
|
|
|
|
$(this).removeClass('ignored');
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function toggleMasters(seasonNumber, ignored) {
|
|
|
|
|
|
|
|
var masters = $('.ignoreSeason_' + seasonNumber);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (ignored) {
|
|
|
|
|
|
|
|
masters.each(function (index) {
|
|
|
|
|
|
|
|
$(this).addClass('ignored');
|
|
|
|
|
|
|
|
$(this).attr('src', ignoredImage);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
else {
|
|
|
|
|
|
|
|
masters.each(function (index) {
|
|
|
|
|
|
|
|
$(this).removeClass('ignored');
|
|
|
|
|
|
|
|
$(this).attr('src', notIgnoredImage);
|
|
|
|
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -91,26 +113,14 @@ function grid_rowBound(e) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (seriesId == 0)
|
|
|
|
if (seriesId == 0)
|
|
|
|
seriesId = dataItem.SeriesId
|
|
|
|
seriesId = dataItem.SeriesId;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function grid_dataBound(e) {
|
|
|
|
function grid_dataBound(e) {
|
|
|
|
var id = $(this).attr('id');
|
|
|
|
var id = $(this).attr('id');
|
|
|
|
var seasonNumber = id.replace('seasons_', '');
|
|
|
|
var seasonNumber = id.replace('seasons_', '');
|
|
|
|
var ignoreEpisodes = $('.ignoreEpisode_' + seasonNumber);
|
|
|
|
|
|
|
|
var master = $('#master_' + seasonNumber);
|
|
|
|
|
|
|
|
var count = ignoreEpisodes.length;
|
|
|
|
|
|
|
|
var ignoredCount = ignoreEpisodes.filter('.ignored').length;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (ignoredCount == count) {
|
|
|
|
|
|
|
|
master.attr('src', ignoredImage);
|
|
|
|
|
|
|
|
master.addClass('ignored');
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
else {
|
|
|
|
toggleMaster(seasonNumber);
|
|
|
|
master.attr('src', notIgnoredImage);
|
|
|
|
|
|
|
|
master.removeClass('ignored');
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function saveSeasonIgnore(seasonNumber, ignored) {
|
|
|
|
function saveSeasonIgnore(seasonNumber, ignored) {
|
|
|
|