Merge pull request #1222 from TagForce/SelectAll

Added Select All Checkbox to Preview Rename page
This commit is contained in:
echel0n 2015-01-29 14:42:37 -08:00
commit 59915f62ac
2 changed files with 35 additions and 1 deletions

View File

@ -32,6 +32,26 @@
#set $curSeason = -1
#set $odd = False
<table id="SelectAllTable" class="sickbeardTable" cellspacing="1" border="0" cellpadding="0">
<thead>
<tr class="seasonheader" id="season-all">
<td colspan="4">
<h2>All Seasons</h2>
</td>
</tr>
<tr class="seasoncols" id="selectall">
<th class="col-checkbox"><input type="checkbox" class="seriesCheck" id="SelectAll" /></th>
<th align="left" valign="top" class="nowrap">Select All</th>
<th width="100%" class="col-name" style="visibility:hidden;"></th>
</tr>
</thead>
</table>
<br/>
<input type="submit" value="Rename Selected" class="btn btn-success"> <a href="/home/displayShow?show=$show.indexerid" class="btn btn-danger">Cancel Rename</a>
<table id="testRenameTable" class="sickbeardTable" cellspacing="1" border="0" cellpadding="0">
#for $cur_ep_obj in $ep_obj_list:
@ -43,7 +63,7 @@
<thead>
<tr class="seasonheader" id="season-$cur_ep_obj.season">
<td colspan="4">
<br/>
<br/>
<h2>#if int($cur_ep_obj.season) == 0 then "Specials" else "Season "+str($cur_ep_obj.season)#</h2>
</td>
</tr>

View File

@ -1,4 +1,18 @@
$(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');