mirror of
https://github.com/SickGear/SickGear.git
synced 2024-11-22 12:55:05 +00:00
e56303798c
Initial SickGear for Python 3.
45 lines
1.2 KiB
JavaScript
45 lines
1.2 KiB
JavaScript
$(document).ready(function(){
|
|
$('.seasonCheck').click(function(){
|
|
var seasCheck = this;
|
|
var seasNo = $(seasCheck).attr('id');
|
|
|
|
$('.epCheck:visible').each(function(){
|
|
var epParts = $(this).attr('id').split('x')
|
|
|
|
if (epParts[0] == seasNo) {
|
|
this.checked = seasCheck.checked
|
|
}
|
|
});
|
|
});
|
|
|
|
// 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
|
|
});
|
|
});
|
|
|
|
$('input[type=submit]').click(function(){
|
|
var epArr = new Array()
|
|
|
|
$('.epCheck').each(function() {
|
|
if (this.checked == true) {
|
|
epArr.push($(this).attr('id'))
|
|
}
|
|
});
|
|
|
|
if (epArr.length == 0)
|
|
return false
|
|
|
|
url = sbRoot + '/home/do-rename?tvid_prodid=' + $('#tvid-prodid').val() + '&eps=' + epArr.join('|');
|
|
window.location.href = url
|
|
});
|
|
|
|
});
|