2014-03-10 05:18:05 +00:00
|
|
|
$(document).ready(function(){
|
|
|
|
$('.seasonCheck').click(function(){
|
|
|
|
var seasCheck = this;
|
|
|
|
var seasNo = $(seasCheck).attr('id');
|
|
|
|
|
|
|
|
$('.epCheck:visible').each(function(){
|
2014-03-20 18:03:22 +00:00
|
|
|
var epParts = $(this).attr('id').split('x')
|
2014-03-10 05:18:05 +00:00
|
|
|
|
|
|
|
if (epParts[0] == seasNo) {
|
|
|
|
this.checked = seasCheck.checked
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
2015-01-24 23:54:16 +00:00
|
|
|
// selects all visible episode checkboxes
|
|
|
|
$('.seriesCheck').click(function () {
|
|
|
|
$('.epCheck:visible, .seasonCheck:visible').each(function () {
|
|
|
|
this.checked = true
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
// clears all visible episode checkboxes and the season selectors
|
|
|
|
$('.clearAll').click(function () {
|
|
|
|
$('.epCheck:visible, .seasonCheck:visible').each(function () {
|
|
|
|
this.checked = false
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
2014-03-10 05:18:05 +00:00
|
|
|
$('input[type=submit]').click(function(){
|
2014-03-20 18:03:22 +00:00
|
|
|
var epArr = new Array()
|
2014-03-10 05:18:05 +00:00
|
|
|
|
|
|
|
$('.epCheck').each(function() {
|
|
|
|
if (this.checked == true) {
|
|
|
|
epArr.push($(this).attr('id'))
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
if (epArr.length == 0)
|
|
|
|
return false
|
|
|
|
|
2017-01-30 00:49:58 +00:00
|
|
|
url = sbRoot+'/home/doRename?show='+$('#showID').val()+'&eps='+epArr.join('|')
|
2014-03-10 05:18:05 +00:00
|
|
|
window.location.href = url
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|