Merge pull request #903 from JackDandy/feature/ChangeRestart

Change restart to use updated jQuery.
This commit is contained in:
JackDandy 2017-02-03 12:52:02 +00:00 committed by GitHub
commit fa303ef962
7 changed files with 48 additions and 8 deletions

View file

@ -41,11 +41,13 @@
* Update qTip 2.2.1 to 2.2.2
* Update tablesorter 2.17.7 to 2.28.5
* Update jQuery 1.8.3 to 2.2.4
* Add one time run to start up that deletes troublemaking compiled files
[develop changelog]
* Fix "too many redirects" or "no CSS/JS content" delivered
* Change restart/shutdown to use updated jQuery
### 0.12.5 (2017-01-16 16:22:00 UTC)

View file

@ -38,6 +38,11 @@ if not (2, 7, 9) <= sys.version_info < (3, 0):
print('Sorry, SickGear requires Python 2.7.9 or higher. Python 3 is not supported.')
sys.exit(1)
try:
import _cleaner
except (StandardError, Exception):
pass
try:
import Cheetah

33
_cleaner.py Normal file
View file

@ -0,0 +1,33 @@
# remove this file when no longer needed
import os
import shutil
parent_dir = os.path.abspath(os.path.dirname(__file__))
cleaned_file = os.path.abspath(os.path.join(parent_dir, r'.cleaned.tmp'))
if not os.path.isfile(cleaned_file):
dead_dirs = [os.path.abspath(os.path.join(parent_dir, *d)) for d in [
('tornado',),
('lib', 'feedcache'),
('lib', 'jsonrpclib'),
('lib', 'shove'),
('lib', 'unrar2')
]]
for dirpath, dirnames, filenames in os.walk(parent_dir):
for dead_dir in filter(lambda x: x in dead_dirs, [os.path.abspath(os.path.join(dirpath, d)) for d in dirnames]):
try:
shutil.rmtree(dead_dir)
except (StandardError, Exception):
pass
for filename in [fn for fn in filenames if os.path.splitext(fn)[-1].lower() in ('.pyc', '.pyo')]:
try:
os.remove(os.path.abspath(os.path.join(dirpath, filename)))
except (StandardError, Exception):
pass
with open(cleaned_file, 'wb') as fp:
fp.write('This file exists to prevent a rerun delete of *.pyc, *.pyo files')
fp.flush()
os.fsync(fp.fileno())

View file

@ -8,7 +8,7 @@
sbRoot = "$sbRoot";
//-->
</script>
<script type="text/javascript" src="$sbRoot/js/lib/jquery-1.8.3.min.js?v=$sbPID"></script>
<script type="text/javascript" src="$sbRoot/js/lib/jquery-2.2.4.min.js?v=$sbPID"></script>
<script type="text/javascript" src="$sbRoot/js/apibuilder.js?v=$sbPID"></script>
<style type="text/css">

View file

@ -107,11 +107,11 @@
</button>
<a href="$sbRoot/home/" class="navbar-brand" tabindex="-1" title="SickGear"><img alt="SickGear" src="$sbRoot/images/sickgear.png" style="height: 50px;" class="img-responsive pull-left" /></a>
</div>
#set $hover_dropdown='data-hover="dropdown" data-hover-delay="400" data-delay="500"'
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-right">
<li id="NAVhome" class="dropdown">
<a href="$sbRoot/home/" class="dropdown-toggle" data-toggle="dropdown" tabindex="$tab#set $tab += 1#">Shows <b class="caret"></b></a>
<a href="$sbRoot/home/" class="dropdown-toggle" data-toggle="dropdown" $hover_dropdown tabindex="$tab#set $tab += 1#">Shows <b class="caret"></b></a>
#set $showlist_home, $episode_home, $history_home = 3 * ['(<i class="sgicon-home tight"></i>)']
#if 'shows' == $sickbeard.DEFAULT_HOME
#set $episode_home, $history_home = 2 * ['']
@ -143,7 +143,7 @@
</li>
<li id="NAVmanage" class="dropdown">
<a href="$sbRoot/manage/" class="dropdown-toggle" data-toggle="dropdown" tabindex="$tab#set $tab += 1#">Manage <b class="caret"></b></a>
<a href="$sbRoot/manage/" class="dropdown-toggle" data-toggle="dropdown" $hover_dropdown tabindex="$tab#set $tab += 1#">Manage <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="$sbRoot/home/postprocess/" tabindex="$tab#set $tab += 1#"><i class="sgicon-postprocess"></i>Process Media</a></li>
<li class="divider"></li>
@ -174,7 +174,7 @@
</li>
<li id="NAVconfig" class="dropdown">
<a href="$sbRoot/config/" class="dropdown-toggle" data-toggle="dropdown" tabindex="$tab#set $tab += 1#"><img src="$sbRoot/images/menu/system18.png" class="navbaricon hidden-xs" /><b class="caret hidden-xs"></b><span class="visible-xs">Config <b class="caret"></b></span></a>
<a href="$sbRoot/config/" class="dropdown-toggle" data-toggle="dropdown" $hover_dropdown tabindex="$tab#set $tab += 1#"><img src="$sbRoot/images/menu/system18.png" class="navbaricon hidden-xs" /><b class="caret hidden-xs"></b><span class="visible-xs">Config <b class="caret"></b></span></a>
<ul class="dropdown-menu">
<li><a href="$sbRoot/config/" tabindex="$tab#set $tab += 1#"><i class="sgicon-info"></i>About</a></li>
<li class="divider"></li>
@ -192,7 +192,7 @@
<li class="dropdown">
#set num_errors = $getVar('$log_num_errors', None)
#set $err_class = ('', ' errors ' + (len('%s' % $num_errors ) * 'n')[0:4])[any([$num_errors])]
<a href="#" class="dropdown-toggle" data-toggle="dropdown" tabindex="$tab#set $tab += 1#"><img src="$sbRoot/images/menu/system18-2.png" class="navbaricon hidden-xs" /><b class="caret hidden-xs"></b><span class="visible-xs">System <b class="caret"></b></span><span class="logger bar$err_class"><i class="sgicon-warning"></i></span></a>
<a href="#" class="dropdown-toggle" data-toggle="dropdown" $hover_dropdown tabindex="$tab#set $tab += 1#"><img src="$sbRoot/images/menu/system18-2.png" class="navbaricon hidden-xs" /><b class="caret hidden-xs"></b><span class="visible-xs">System <b class="caret"></b></span><span class="logger bar$err_class"><i class="sgicon-warning"></i></span></a>
<ul class="dropdown-menu">
<li><a href="$sbRoot/manage/manageSearches/forceVersionCheck" tabindex="$tab#set $tab += 1#"><i class="sgicon-updatecheck"></i>Check for Updates</a></li>
<li><a href="$sbRoot/home/viewchanges" tabindex="$tab#set $tab += 1#"><i class="sgicon-changes"></i>View Changes</a></li>

View file

@ -35,7 +35,7 @@
<meta name="msapplication-TileImage" content="$sg_root/images/ico/mstile-144x144.png">
<meta name="msapplication-config" content="$sg_root/css/browserconfig.xml">
<script type="text/javascript" src="$sg_root/js/lib/jquery-1.8.3.min.js?v=$sg_pid"></script>
<script type="text/javascript" src="$sg_root/js/lib/jquery-2.2.4.min.js?v=$sg_pid"></script>
<script type="text/javascript" charset="utf-8">
<!--
\$.SickGear = {

View file

@ -40,6 +40,6 @@ function initActions() {
$(document).ready(function(){
initActions();
$('#NAV' + topmenu).addClass('active');
$('.dropdown-toggle').dropdownHover({delay:500, hoverDelay:400});
$('.dropdown-toggle').dropdownHover();
(/undefined/i.test(document.createElement('input').placeholder)) && $('body').addClass('no-placeholders');
});