1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-08-13 16:53:54 -04:00
SickRage/gui/slick/js/testRename.js
TagForce 2203939e6f Added Select All Checkbox to Preview Rename page
- Added "Select All" check box under new "All Seasons" table
- Duplicated "Rename Selected" and "Cancel Rename" buttons to be
available underneath the "Select All" checkbox.
2015-01-22 13:03:06 +01:00

45 lines
1.0 KiB
JavaScript

$(document).ready(function(){
$('.seriesCheck').click(function(){
var serCheck = this;
$('.seasonCheck:visible').each(function(){
this.checked = serCheck.checked
});
$('.epCheck:visible').each(function(){
this.checked = serCheck.checked
});
});
$('.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
}
});
});
$('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/doRename?show='+$('#showID').attr('value')+'&eps='+epArr.join('|')
window.location.href = url
});
});