Add select all and clear all buttons to testRename template

This commit is contained in:
Supremicus 2015-01-25 09:54:16 +10:00
parent 94724779a3
commit 642969e06c
4 changed files with 32 additions and 6 deletions

View file

@ -15,6 +15,7 @@
* Fix provider list color
* Add handling of exceptional case with missing network name (NoneType) in Episode View
* Fix black and white list initialization on new show creation
* Add select all and clear all buttons to testRename template
[develop changelog]

View file

@ -2228,6 +2228,10 @@ div.blackwhitelist.anidb, div.blackwhitelist.manual {
display:block;
}
.padbottom {
padding-bottom: 10px;
}
/* =======================================================================
bootstrap Overrides
========================================================================== */

View file

@ -1,13 +1,13 @@
#import sickbeard
#from sickbeard import common
#from sickbeard import exceptions
#set global $title="Test Rename"
#set global $title = 'Test Rename ' + $show.name
#set global $header = '<a href="' + $sbRoot + '/home/displayShow?show=%d">%s</a>' % ($show.indexerid, $show.name)
#set global $sbPath=".."
#set global $sbPath = '..'
#set global $topmenu="home"#
#set global $topmenu = 'home'
#import os.path
#include $os.path.join($sickbeard.PROG_DIR, "gui/slick/interfaces/default/inc_top.tmpl")
#include $os.path.join($sickbeard.PROG_DIR, 'gui/slick/interfaces/default/inc_top.tmpl')
#if $varExists('header')
<h1 class="header">$header</h1>
@ -32,6 +32,14 @@
#set $curSeason = -1
#set $odd = False
<div class="clearfix padbottom">
<button class="btn seriesCheck">Select All Episodes</button>
<button class="btn clearAll">Clear All</button>
</div>
<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 +51,6 @@
<thead>
<tr class="seasonheader" id="season-$cur_ep_obj.season">
<td colspan="4">
<br/>
<h2>#if int($cur_ep_obj.season) == 0 then "Specials" else "Season "+str($cur_ep_obj.season)#</h2>
</td>
</tr>
@ -84,4 +91,4 @@
#end for
</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>
#include $os.path.join($sickbeard.PROG_DIR, "gui/slick/interfaces/default/inc_bottom.tmpl")
#include $os.path.join($sickbeard.PROG_DIR, 'gui/slick/interfaces/default/inc_bottom.tmpl')

View file

@ -12,6 +12,20 @@ $(document).ready(function(){
});
});
// 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()