Browse Source

Cleanup of whitespace in Glitter/Config/wizzard

pull/711/head
Safihre 9 years ago
parent
commit
91ce734d32
  1. 2
      interfaces/Config/README.txt
  2. 2
      interfaces/Config/templates/_inc_footer_uc.tmpl
  3. 12
      interfaces/Config/templates/_inc_header_uc.tmpl
  4. 6
      interfaces/Config/templates/config.tmpl
  5. 8
      interfaces/Config/templates/config_cat.tmpl
  6. 2
      interfaces/Config/templates/config_folders.tmpl
  7. 10
      interfaces/Config/templates/config_general.tmpl
  8. 4
      interfaces/Config/templates/config_notify.tmpl
  9. 44
      interfaces/Config/templates/config_rss.tmpl
  10. 4
      interfaces/Config/templates/config_scheduling.tmpl
  11. 30
      interfaces/Config/templates/config_sorting.tmpl
  12. 2
      interfaces/Config/templates/config_special.tmpl
  13. 26
      interfaces/Config/templates/config_switches.tmpl
  14. 12
      interfaces/Config/templates/login/main.tmpl
  15. 10
      interfaces/Config/templates/staticcfg/css/login.css
  16. 80
      interfaces/Config/templates/staticcfg/css/style.css
  17. 62
      interfaces/Config/templates/staticcfg/js/script.js
  18. 2
      interfaces/Glitter/templates/include_history.tmpl
  19. 2
      interfaces/Glitter/templates/include_messages.tmpl
  20. 4
      interfaces/Glitter/templates/include_queue.tmpl
  21. 10
      interfaces/Glitter/templates/main.tmpl
  22. 12
      interfaces/Glitter/templates/queue.tmpl
  23. 2
      interfaces/Glitter/templates/static/bootstrap/css/bootstrap.min.css
  24. 2
      interfaces/Glitter/templates/static/javascripts/date.min.js
  25. 28
      interfaces/Glitter/templates/static/javascripts/glitter.basic.js
  26. 4
      interfaces/Glitter/templates/static/javascripts/glitter.js
  27. 84
      interfaces/Glitter/templates/static/javascripts/glitter.main.js
  28. 84
      interfaces/Glitter/templates/static/javascripts/glitter.queue.js
  29. 6
      interfaces/Glitter/templates/static/javascripts/knockout-extensions.js
  30. 28
      interfaces/Glitter/templates/static/stylesheets/colorschemes/Night.css
  31. 52
      interfaces/Glitter/templates/static/stylesheets/glitter.css
  32. 2
      interfaces/Glitter/templates/static/stylesheets/glitter.mobile.css
  33. 6
      interfaces/wizard/one.html
  34. 14
      interfaces/wizard/static/javascript/checkserver.js
  35. 6
      interfaces/wizard/static/style.css
  36. 2
      sabnzbd/postproc.py

2
interfaces/Config/README.txt

@ -20,7 +20,7 @@ jQuery Form Plugin
* http://www.opensource.org/licenses/mit-license.php * http://www.opensource.org/licenses/mit-license.php
Bootstrap v3.3.6 (http://getbootstrap.com) Bootstrap v3.3.6 (http://getbootstrap.com)
* Licensed under the MIT license * Licensed under the MIT license
Changed by Safihre, Nov 2015 Changed by Safihre, Nov 2015
We include the icon-file directly into the CSS, We include the icon-file directly into the CSS,
this way we avoid errors when HTTPS is enabled this way we avoid errors when HTTPS is enabled

2
interfaces/Config/templates/_inc_footer_uc.tmpl

@ -1,6 +1,6 @@
<!-- Content end --> <!-- Content end -->
<div class="clearfix"></div> <div class="clearfix"></div>
<!-- Filebrowser modal --> <!-- Filebrowser modal -->
<div class="modal fade" id="filebrowser_modal"> <div class="modal fade" id="filebrowser_modal">
<div class="modal-dialog"> <div class="modal-dialog">

12
interfaces/Config/templates/_inc_header_uc.tmpl

@ -20,18 +20,18 @@
#if $pane == "Special" then $T('cmenu-special') else ""# #if $pane == "Special" then $T('cmenu-special') else ""#
#if $pane == "RSS" then $T('cmenu-rss') else ""# #if $pane == "RSS" then $T('cmenu-rss') else ""#
</title> </title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="apple-mobile-web-app-title" content="SABnzbd" /> <meta name="apple-mobile-web-app-title" content="SABnzbd" />
<link rel="apple-touch-icon" sizes="76x76" href="${root}staticcfg/ico/apple-touch-icon-76x76-precomposed.png" /> <link rel="apple-touch-icon" sizes="76x76" href="${root}staticcfg/ico/apple-touch-icon-76x76-precomposed.png" />
<link rel="apple-touch-icon" sizes="120x120" href="${root}staticcfg/ico/apple-touch-icon-120x120-precomposed.png" /> <link rel="apple-touch-icon" sizes="120x120" href="${root}staticcfg/ico/apple-touch-icon-120x120-precomposed.png" />
<link rel="apple-touch-icon" sizes="152x152" href="${root}staticcfg/ico/apple-touch-icon-152x152-precomposed.png" /> <link rel="apple-touch-icon" sizes="152x152" href="${root}staticcfg/ico/apple-touch-icon-152x152-precomposed.png" />
<link rel="apple-touch-icon" sizes="180x180" href="${root}staticcfg/ico/apple-touch-icon-180x180-precomposed.png" /> <link rel="apple-touch-icon" sizes="180x180" href="${root}staticcfg/ico/apple-touch-icon-180x180-precomposed.png" />
<link rel="apple-touch-icon" sizes="192x192" href="${root}staticcfg/ico/android-192x192.png" /> <link rel="apple-touch-icon" sizes="192x192" href="${root}staticcfg/ico/android-192x192.png" />
<link rel="stylesheet" type="text/css" href="${root}staticcfg/bootstrap/css/bootstrap.min.css" /> <link rel="stylesheet" type="text/css" href="${root}staticcfg/bootstrap/css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" href="${root}staticcfg/css/style.css?p=$pid" /> <link rel="stylesheet" type="text/css" href="${root}staticcfg/css/style.css?p=$pid" />
<link rel="shortcut icon" href="${root}staticcfg/ico/favicon.ico?v=1.1.0" /> <link rel="shortcut icon" href="${root}staticcfg/ico/favicon.ico?v=1.1.0" />
@ -39,12 +39,12 @@
// Keeping track of the form state // Keeping track of the form state
var formHasChanged = false; var formHasChanged = false;
var formWasSubmitted = false; var formWasSubmitted = false;
// Information we need // Information we need
var sabSession = '$session'; var sabSession = '$session';
var folderBrowseUrl = '${root}tapi?mode=browse&output=json&apikey=$session'; var folderBrowseUrl = '${root}tapi?mode=browse&output=json&apikey=$session';
var folderSeperator = '#if $os.sep == '\\' then '\\\\' else '/'#' var folderSeperator = '#if $os.sep == '\\' then '\\\\' else '/'#'
// Translations // Translations
var configTranslate = new Object(); var configTranslate = new Object();
configTranslate.browseText = "$T('browse-folder')"; configTranslate.browseText = "$T('browse-folder')";

6
interfaces/Config/templates/config.tmpl

@ -34,7 +34,7 @@
<tr> <tr>
<th scope="row">OpenSSL:</th> <th scope="row">OpenSSL:</th>
<td> <td>
<!--#if $have_ssl#--> <!--#if $have_ssl#-->
$ssl_version &nbsp; [$ssl_protocols] $ssl_version &nbsp; [$ssl_protocols]
<!--#else#--> <!--#else#-->
<span class="label label-danger">$T('notAvailable')</span> <span class="label label-danger">$T('notAvailable')</span>
@ -42,7 +42,7 @@
<!--#end if#--> <!--#end if#-->
</td> </td>
</tr> </tr>
<!--#if not $have_ssl_context#--> <!--#if not $have_ssl_context#-->
<tr> <tr>
<th scope="row"></th> <th scope="row"></th>
<td> <td>
@ -53,7 +53,7 @@
<tr> <tr>
<th scope="row">yEnc:</th> <th scope="row">yEnc:</th>
<td> <td>
<!--#if $have_yenc#--> <!--#if $have_yenc#-->
<span class="glyphicon glyphicon-ok"></span> <span class="glyphicon glyphicon-ok"></span>
<!--#else#--> <!--#else#-->
<span class="label label-danger">$T('notAvailable')</span> <span class="label label-danger">$T('notAvailable')</span>

8
interfaces/Config/templates/config_cat.tmpl

@ -6,7 +6,7 @@
<div class="padTable"> <a class="main-helplink" href="$helpuri$help_uri" target="_blank"><span class="glyphicon glyphicon-question-sign"></span></a> <div class="padTable"> <a class="main-helplink" href="$helpuri$help_uri" target="_blank"><span class="glyphicon glyphicon-question-sign"></span></a>
<p> $T('explain-catTags') $T('explain-catTags2')<br/> </p> <p> $T('explain-catTags') $T('explain-catTags2')<br/> </p>
<h5 class="darkred"><strong>$T('explain-relFolder'):</strong> <span class="path">$defdir</span></h5> <h5 class="darkred"><strong>$T('explain-relFolder'):</strong> <span class="path">$defdir</span></h5>
<!--#set $odd = False#--> <!--#set $odd = False#-->
<!--#set $cur = 0#--> <!--#set $cur = 0#-->
<!--#for $slot in $slotinfo#--> <!--#for $slot in $slotinfo#-->
@ -72,10 +72,10 @@
</td> </td>
<!--#end if#--> <!--#end if#-->
<td class="nowrap"> <td class="nowrap">
<input type="text" name="dir" class="fileBrowserSmall" value="$slot.dir" size="20" data-initialdir="$defdir" data-title="$T('catFolderPath')" /> <input type="text" name="dir" class="fileBrowserSmall" value="$slot.dir" size="20" data-initialdir="$defdir" data-title="$T('catFolderPath')" />
</td> </td>
<td> <td>
<input type="text" name="newzbin" value="$slot.newzbin" size="20" /> <input type="text" name="newzbin" value="$slot.newzbin" size="20" />
</td> </td>
<td class="nowrap"> <td class="nowrap">
<button class="btn btn-default"> <button class="btn btn-default">
@ -100,7 +100,7 @@
var theForm = \$(this).closest("form"); var theForm = \$(this).closest("form");
theForm.attr("action", "delete").submit(); theForm.attr("action", "delete").submit();
}); });
// Add autocomplete and file-browser // Add autocomplete and file-browser
\$('.fileBrowserSmall').typeahead().fileBrowser(); \$('.fileBrowserSmall').typeahead().fileBrowser();
}); });

2
interfaces/Config/templates/config_folders.tmpl

@ -65,7 +65,7 @@
</div> </div>
<div class="field-pair"> <div class="field-pair">
<button class="btn btn-default saveButton"><span class="glyphicon glyphicon-ok"></span> $T('button-saveChanges')</button> <button class="btn btn-default saveButton"><span class="glyphicon glyphicon-ok"></span> $T('button-saveChanges')</button>
<span>&nbsp;&nbsp;&nbsp;&nbsp;</span> <span>&nbsp;&nbsp;&nbsp;&nbsp;</span>
<span id="config_err_msg" class="darkred nomargin">&nbsp;</span> <span id="config_err_msg" class="darkred nomargin">&nbsp;</span>
</div> </div>

10
interfaces/Config/templates/config_general.tmpl

@ -76,7 +76,7 @@
<label class="config" for="${pid}_wp">$T('opt-web_password')</label> <label class="config" for="${pid}_wp">$T('opt-web_password')</label>
<input type="text" name="${pid}_wp" id="${pid}_wp" value="$password" data-hide="password" /> <input type="text" name="${pid}_wp" id="${pid}_wp" value="$password" data-hide="password" />
<span class="desc">$T('explain-web_password')</span> <span class="desc">$T('explain-web_password')</span>
</div> </div>
<div class="field-pair"> <div class="field-pair">
<label class="config" for="inet_exposure">$T('opt-inet_exposure')</label> <label class="config" for="inet_exposure">$T('opt-inet_exposure')</label>
<select name="inet_exposure" id="inet_exposure" class="select"> <select name="inet_exposure" id="inet_exposure" class="select">
@ -223,7 +223,7 @@
hideOrShowTranslate() hideOrShowTranslate()
\$('#apikey, #nzbkey').click(function () { \$(this).select() }); \$('#apikey, #nzbkey').click(function () { \$(this).select() });
\$('#generate_new_apikey').click(function () { \$('#generate_new_apikey').click(function () {
if (confirm("$T('Plush-confirm')")) { if (confirm("$T('Plush-confirm')")) {
$.ajax({ $.ajax({
@ -260,9 +260,9 @@
"text": \$(this).attr('rel') "text": \$(this).attr('rel')
}); });
\$('#modal_qr').modal('show'); \$('#modal_qr').modal('show');
// No save on this button click // No save on this button click
e.preventDefault(); e.preventDefault();
}); });
\$('.generate_cert').click(function(e) { \$('.generate_cert').click(function(e) {
@ -296,7 +296,7 @@
\$('#bandwidth_max_value').val(bandwithLimitNumber) \$('#bandwidth_max_value').val(bandwithLimitNumber)
\$('#bandwidth_max_dropdown').val(bandwithLimitText) \$('#bandwidth_max_dropdown').val(bandwithLimitText)
} }
// Update the value // Update the value
\$('#bandwidth_max_value, #bandwidth_max_dropdown').on('change', function() { \$('#bandwidth_max_value, #bandwidth_max_dropdown').on('change', function() {

4
interfaces/Config/templates/config_notify.tmpl

@ -827,7 +827,7 @@
\$(document).ready(function(){ \$(document).ready(function(){
// Autocomplete and filebrowser // Autocomplete and filebrowser
\$('#email_dir').typeahead().fileBrowser(); \$('#email_dir').typeahead().fileBrowser();
// Expand on enable // Expand on enable
\$('.col2 input[name$="enable"]').change(function() { \$('.col2 input[name$="enable"]').change(function() {
if(this.checked) { if(this.checked) {
@ -837,7 +837,7 @@
} }
\$('form').submit() \$('form').submit()
}) })
/** /**
Testing functions Testing functions
**/ **/

44
interfaces/Config/templates/config_rss.tmpl

@ -4,7 +4,7 @@
<div class="colmask"> <div class="colmask">
<!--#if not $active_feed#--> <!--#if not $active_feed#-->
<div class="section"> <div class="section">
<div class="padTable"> <div class="padTable">
<a class="main-helplink" href="$helpuri$help_uri" target="_blank"><span class="glyphicon glyphicon-question-sign"></span></a> <a class="main-helplink" href="$helpuri$help_uri" target="_blank"><span class="glyphicon glyphicon-question-sign"></span></a>
<p>$T('explain-RSS')</p> <p>$T('explain-RSS')</p>
<form action="add_rss_feed" method="post" autocomplete="off" novalidate> <form action="add_rss_feed" method="post" autocomplete="off" novalidate>
@ -47,11 +47,11 @@
<!--#set $odd = not $odd#--> <!--#set $odd = not $odd#-->
<tr class="data-row <!--#if $odd then " alt " else " "#-->"> <tr class="data-row <!--#if $odd then " alt " else " "#-->">
<td class="chk"> <td class="chk">
<input type="checkbox" class="toggleFeedCheckbox" name="enable" value="1" <!--#if int($rss[$feed_item]['enable']) !=0 then 'checked="checked"' else ""#--> rel="$feed_item" /> <input type="checkbox" class="toggleFeedCheckbox" name="enable" value="1" <!--#if int($rss[$feed_item]['enable']) !=0 then 'checked="checked"' else ""#--> rel="$feed_item" />
</td> </td>
<td class="title"> <td class="title">
<a href="?feed=$rss[$feed_item]['link']" class="subscription-title path feed <!--#if int($rss[$feed_item]['enable']) != 0 then 'feed_enabled' else 'feed_disabled'#-->"> <a href="?feed=$rss[$feed_item]['link']" class="subscription-title path feed <!--#if int($rss[$feed_item]['enable']) != 0 then 'feed_enabled' else 'feed_disabled'#-->">
<div class="favicon" data-domain="$rss[$feed_item]['baselink']"></div> $feed_item <div class="favicon" data-domain="$rss[$feed_item]['baselink']"></div> $feed_item
</a> </a>
</td> </td>
<td class="controls"> <td class="controls">
@ -89,9 +89,9 @@
<div class="field-pair"> <div class="field-pair">
<label class="config narrow" for="rss_rate">$T('opt-rss_rate')</label> <label class="config narrow" for="rss_rate">$T('opt-rss_rate')</label>
<input type="number" name="rss_rate" id="rss_rate" value="$rss_rate" min="15" max="1440" /> <input type="number" name="rss_rate" id="rss_rate" value="$rss_rate" min="15" max="1440" />
<button type="submit" class="btn btn-default"><span class="glyphicon glyphicon-ok"></span> $T('button-save')</button> <button type="submit" class="btn btn-default"><span class="glyphicon glyphicon-ok"></span> $T('button-save')</button>
<span class="config narrow">&nbsp;&nbsp;$T('Next scan at:')&nbsp;$rss_next</span> <span class="config narrow">&nbsp;&nbsp;$T('Next scan at:')&nbsp;$rss_next</span>
<span class="desc narrow">$T('explain-rss_rate')</span> <span class="desc narrow">$T('explain-rss_rate')</span>
</div> </div>
</fieldset> </fieldset>
</div> </div>
@ -105,7 +105,7 @@
<div class="padTable"> <div class="padTable">
<a class="main-helplink" href="$helpuri$help_uri" target="_blank"><span class="glyphicon glyphicon-question-sign"></span></a> <a class="main-helplink" href="$helpuri$help_uri" target="_blank"><span class="glyphicon glyphicon-question-sign"></span></a>
<h2 class="nomargin activeRSS"> <h2 class="nomargin activeRSS">
<a href="${root}config/rss/">$T('cmenu-rss')</a> &raquo; <a href="${root}config/rss/">$T('cmenu-rss')</a> &raquo;
<a href="$rss[$active_feed]['uri']" onclick="window.open(this.href); return false;">$active_feed</a> <a href="$rss[$active_feed]['uri']" onclick="window.open(this.href); return false;">$active_feed</a>
</h2> </h2>
<!--#if $error#--> <!--#if $error#-->
@ -140,10 +140,10 @@
<tbody> <tbody>
<tr class="default"> <tr class="default">
<td> <td>
<input type="checkbox" disabled="disabled" class="hidden" /> <input type="checkbox" disabled="disabled" class="hidden" />
</td> </td>
<td> <td>
<input type="text" disabled="disabled" size="1" class="hidden" /> <input type="text" disabled="disabled" size="1" class="hidden" />
</td> </td>
<td> <td>
<select name="filter_type" disabled="disabled" class="hidden"> <select name="filter_type" disabled="disabled" class="hidden">
@ -157,7 +157,7 @@
</select> </select>
</td> </td>
<td> <td>
<input type="text" disabled="disabled" value="" class="hidden" /> <input type="text" disabled="disabled" value="" class="hidden" />
</td> </td>
<!--#if $rss[$feed]['pick_cat']#--> <!--#if $rss[$feed]['pick_cat']#-->
<td> <td>
@ -212,10 +212,10 @@
<tbody> <tbody>
<tr> <tr>
<td> <td>
<input type="checkbox" name="enabled" value="1" checked="checked" /> <input type="checkbox" name="enabled" value="1" checked="checked" />
</td> </td>
<td> <td>
<input type="text" name="new_index" size="1" /> <input type="text" name="new_index" size="1" />
</td> </td>
<td> <td>
<select name="filter_type"> <select name="filter_type">
@ -229,7 +229,7 @@
</select> </select>
</td> </td>
<td> <td>
<input type="text" name="filter_text" value="" /> <input type="text" name="filter_text" value="" />
</td> </td>
<!--#if $rss[$feed]['pick_cat']#--> <!--#if $rss[$feed]['pick_cat']#-->
<td> <td>
@ -287,10 +287,10 @@
<tbody> <tbody>
<tr class="<!--#if $odd then " alt " else " "#-->"> <tr class="<!--#if $odd then " alt " else " "#-->">
<td> <td>
<input type="checkbox" name="enabled" value="1" <!--#if $filter[6]=='1' then 'checked="checked"' else ""#--> /> <input type="checkbox" name="enabled" value="1" <!--#if $filter[6]=='1' then 'checked="checked"' else ""#--> />
</td> </td>
<td> <td>
<input type="text" name="new_index" value="$fnum" size="1" /> <input type="text" name="new_index" value="$fnum" size="1" />
</td> </td>
<td> <td>
<select name="filter_type"> <select name="filter_type">
@ -304,7 +304,7 @@
</select> </select>
</td> </td>
<td> <td>
<input type="text" name="filter_text" value="$filter[4]" /> <input type="text" name="filter_text" value="$filter[4]" />
</td> </td>
<!--#if $rss[$feed]['pick_cat']#--> <!--#if $rss[$feed]['pick_cat']#-->
<td> <td>
@ -468,7 +468,7 @@
</div> </div>
<!--#end if#--> <!--#end if#-->
</div> </div>
</div> </div>
<!-- /colmask --> <!-- /colmask -->
@ -490,7 +490,7 @@ function urlencode(str) {
\$(theContainer).append('<span class="glyphicon glyphicon-list"></span>') \$(theContainer).append('<span class="glyphicon glyphicon-list"></span>')
} }
}) })
\$('.tabs a').click(function (e) { \$('.tabs a').click(function (e) {
e.preventDefault() e.preventDefault()
\$(this).tab('show') \$(this).tab('show')
@ -525,7 +525,7 @@ function urlencode(str) {
}).done(function( msg ) { }).done(function( msg ) {
// Let us leave! // Let us leave!
formWasSubmitted = true; formWasSubmitted = true;
formHasChanged = false; formHasChanged = false;
location.reload(); location.reload();
}); });
} }
@ -541,7 +541,7 @@ function urlencode(str) {
}).done(function( msg ) { }).done(function( msg ) {
// Let us leave! // Let us leave!
formWasSubmitted = true; formWasSubmitted = true;
formHasChanged = false; formHasChanged = false;
location = '?feed=' + urlencode(whichFeed); location = '?feed=' + urlencode(whichFeed);
}); });
}); });
@ -555,7 +555,7 @@ function urlencode(str) {
}).done(function() { }).done(function() {
// Let us leave! // Let us leave!
formWasSubmitted = true; formWasSubmitted = true;
formHasChanged = false; formHasChanged = false;
location.reload(); location.reload();
}); });
}); });
@ -564,7 +564,7 @@ function urlencode(str) {
var theForm = \$(this).closest("form"); var theForm = \$(this).closest("form");
theForm.attr("action", "clean_rss_jobs").submit(); theForm.attr("action", "clean_rss_jobs").submit();
}); });
\$('.delFilter').click(function(){ \$('.delFilter').click(function(){
var theForm = \$(this).closest("form"); var theForm = \$(this).closest("form");
theForm.attr("action", "del_rss_filter").submit(); theForm.attr("action", "del_rss_filter").submit();

4
interfaces/Config/templates/config_scheduling.tmpl

@ -72,7 +72,7 @@ else:
</div><!-- /col1 --> </div><!-- /col1 -->
</form> </form>
</div><!-- /section --> </div><!-- /section -->
<div class="section"> <div class="section">
<div class="col2"> <div class="col2">
<h3>$T('currentSchedules')</h3> <h3>$T('currentSchedules')</h3>
@ -109,7 +109,7 @@ else:
\$('#action').on('change', function() { \$('#action').on('change', function() {
// Set the action // Set the action
\$('#arguments').val((\$(this).find('option:selected').data('action'))) \$('#arguments').val((\$(this).find('option:selected').data('action')))
// Is it speedlimit? // Is it speedlimit?
if(\$(this).find('option:selected').val() == 'speedlimit') { if(\$(this).find('option:selected').val() == 'speedlimit') {
\$('#hidden_arguments').show() \$('#hidden_arguments').show()

30
interfaces/Config/templates/config_sorting.tmpl

@ -9,7 +9,7 @@
<div class="section"> <div class="section">
<div class="col2"> <div class="col2">
<h3>$T('seriesSorting') <a href="$helpuri$help_uri#toc0" target="_blank"><span class="glyphicon glyphicon-question-sign"></span></a></h3> <h3>$T('seriesSorting') <a href="$helpuri$help_uri#toc0" target="_blank"><span class="glyphicon glyphicon-question-sign"></span></a></h3>
<p> <p>
<b>$T('affectedCat')</b><br/> <b>$T('affectedCat')</b><br/>
<select name="tv_cat" multiple="multiple" class="multiple_cats"> <select name="tv_cat" multiple="multiple" class="multiple_cats">
<!--#for $ct in $cat_list#--> <!--#for $ct in $cat_list#-->
@ -22,11 +22,11 @@
<div class="col1"> <div class="col1">
<fieldset> <fieldset>
<div class="field-pair"> <div class="field-pair">
<h5 class="darkred nomargin">$T('ft-download'): <span class="path">$complete_dir</span></h5> <h5 class="darkred nomargin">$T('ft-download'): <span class="path">$complete_dir</span></h5>
</div> </div>
<div class="field-pair"> <div class="field-pair">
<label class="config wide" for="enable_tv_sorting">$T('opt-tvsort')</label> <label class="config wide" for="enable_tv_sorting">$T('opt-tvsort')</label>
<input type="checkbox" name="enable_tv_sorting" id="enable_tv_sorting" value="1" <!--#if int($enable_tv_sorting)> 0 then 'checked="checked"' else ""#--> /> <input type="checkbox" name="enable_tv_sorting" id="enable_tv_sorting" value="1" <!--#if int($enable_tv_sorting)> 0 then 'checked="checked"' else ""#--> />
</div> </div>
<div class="field-pair"> <div class="field-pair">
<label class="config" for="tvfoldername">$T('sortString')</label> <label class="config" for="tvfoldername">$T('sortString')</label>
@ -39,7 +39,7 @@
<input type="button" class="btn btn-default" onclick="tvSet('%sn/Season %s/%sn - S%0sE%0e - %en.%ext')" value="$T('button-SeasonS01E05')" /> <input type="button" class="btn btn-default" onclick="tvSet('%sn/Season %s/%sn - S%0sE%0e - %en.%ext')" value="$T('button-SeasonS01E05')" />
<br/> <br/>
<input type="button" class="btn btn-default" onclick="tvSet('%sn/%sx%0e - %en/%sn - %sx%0e - %en.%ext')" value="$T('button-Ep1x05')" /> <input type="button" class="btn btn-default" onclick="tvSet('%sn/%sx%0e - %en/%sn - %sx%0e - %en.%ext')" value="$T('button-Ep1x05')" />
<input type="button" class="btn btn-default" onclick="tvSet('%sn/S%0sE%0e - %en/%sn - S%0sE%0e - %en.%ext')" value="$T('button-EpS01E05')" /> <input type="button" class="btn btn-default" onclick="tvSet('%sn/S%0sE%0e - %en/%sn - S%0sE%0e - %en.%ext')" value="$T('button-EpS01E05')" />
</div> </div>
</div> </div>
<div id="previewtv" class="example"> <div id="previewtv" class="example">
@ -48,7 +48,7 @@
<input type="text" id="tvsamplename" name="tvsamplename" placeholder="$T('show-name') S01E05 - $T('ep-name') [DTS]" /><button class="btn btn-default clearBtn" type="button"><span class="glyphicon glyphicon-remove"></span> $T('button-clear')</button> <input type="text" id="tvsamplename" name="tvsamplename" placeholder="$T('show-name') S01E05 - $T('ep-name') [DTS]" /><button class="btn btn-default clearBtn" type="button"><span class="glyphicon glyphicon-remove"></span> $T('button-clear')</button>
</div> </div>
<div class="field-pair"> <div class="field-pair">
<label class="config">$T('sortResult')</label> <span class="desc path" id="previewtv-result">&nbsp;</span> <label class="config">$T('sortResult')</label> <span class="desc path" id="previewtv-result">&nbsp;</span>
</div> </div>
</div> </div>
<div class="field-pair"> <div class="field-pair">
@ -162,7 +162,7 @@
<div class="section"> <div class="section">
<div class="col2"> <div class="col2">
<h3>$T('movieSort') <a href="$helpuri$help_uri#toc6" target="_blank"><span class="glyphicon glyphicon-question-sign"></span></a></h3> <h3>$T('movieSort') <a href="$helpuri$help_uri#toc6" target="_blank"><span class="glyphicon glyphicon-question-sign"></span></a></h3>
<p> <p>
<b>$T('affectedCat')</b><br/> <b>$T('affectedCat')</b><br/>
<select name="movie_cat" multiple="multiple" class="multiple_cats"> <select name="movie_cat" multiple="multiple" class="multiple_cats">
<!--#for $ct in $cat_list#--> <!--#for $ct in $cat_list#-->
@ -175,7 +175,7 @@
<div class="col1"> <div class="col1">
<fieldset> <fieldset>
<div class="field-pair"> <div class="field-pair">
<h5 class="darkred nomargin">$T('ft-download'): <span class="path">$complete_dir</span></h5> <h5 class="darkred nomargin">$T('ft-download'): <span class="path">$complete_dir</span></h5>
</div> </div>
<div class="field-pair"> <div class="field-pair">
<label class="config wide" for="enable_movie_sorting">$T('opt-movieSort')</label> <label class="config wide" for="enable_movie_sorting">$T('opt-movieSort')</label>
@ -183,7 +183,7 @@
</div> </div>
<div class="field-pair"> <div class="field-pair">
<label class="config wide" for="movie_extra_folder">$T('opt-movieExtra')</label> <label class="config wide" for="movie_extra_folder">$T('opt-movieExtra')</label>
<input type="checkbox" name="movie_extra_folder" id="movie_extra_folder" value="1" <!--#if int($movie_extra_folder)> 0 then 'checked="checked"' else ""#--> /> <input type="checkbox" name="movie_extra_folder" id="movie_extra_folder" value="1" <!--#if int($movie_extra_folder)> 0 then 'checked="checked"' else ""#--> />
</div> </div>
<div class="field-pair"> <div class="field-pair">
<label class="config" for="moviefoldername">$T('sortString')</label> <label class="config" for="moviefoldername">$T('sortString')</label>
@ -198,7 +198,7 @@
<div class="presets float-left"> <div class="presets float-left">
<input type="button" class="btn btn-default" onclick="movieSet('%title (%y)/%title (%y).%ext',' CD%1');movieExtraFolder(false)" value="$T('button-inFolders')" /> <input type="button" class="btn btn-default" onclick="movieSet('%title (%y)/%title (%y).%ext',' CD%1');movieExtraFolder(false)" value="$T('button-inFolders')" />
<input type="button" class="btn btn-default" onclick="movieSet('%title (%y).%ext',' CD%1');movieExtraFolder(true)" value="$T('button-noFolders')" /> <input type="button" class="btn btn-default" onclick="movieSet('%title (%y).%ext',' CD%1');movieExtraFolder(true)" value="$T('button-noFolders')" />
<input type="button" class="btn btn-default" onclick="movieSet('%0decade/%title (%y).%ext',' CD%1');movieExtraFolder(true)" value="Decades 1" /> <input type="button" class="btn btn-default" onclick="movieSet('%0decade/%title (%y).%ext',' CD%1');movieExtraFolder(true)" value="Decades 1" />
</div> </div>
</div> </div>
<div id="previewmovie" class="example"> <div id="previewmovie" class="example">
@ -313,11 +313,11 @@
<div class="col1"> <div class="col1">
<fieldset> <fieldset>
<div class="field-pair"> <div class="field-pair">
<h5 class="darkred nomargin">$T('ft-download'): <span class="path">$complete_dir</span></h5> <h5 class="darkred nomargin">$T('ft-download'): <span class="path">$complete_dir</span></h5>
</div> </div>
<div class="field-pair"> <div class="field-pair">
<label class="config wide" for="enable_date_sorting">$T('opt-dateSort')</label> <label class="config wide" for="enable_date_sorting">$T('opt-dateSort')</label>
<input type="checkbox" name="enable_date_sorting" id="enable_date_sorting" value="1" <!--#if int($enable_date_sorting)> 0 then 'checked="checked"' else ""#--> /> <input type="checkbox" name="enable_date_sorting" id="enable_date_sorting" value="1" <!--#if int($enable_date_sorting)> 0 then 'checked="checked"' else ""#--> />
</div> </div>
<div class="field-pair"> <div class="field-pair">
<label class="config" for="datefoldername">$T('sortString')</label> <label class="config" for="datefoldername">$T('sortString')</label>
@ -328,7 +328,7 @@
<div class="presets float-left"> <div class="presets float-left">
<input type="button" class="btn btn-default" onclick="dateSet('%t/%t - %y-%0m-%0d - %desc.%ext')" value="$T('button-ShowNameF')" /> <input type="button" class="btn btn-default" onclick="dateSet('%t/%t - %y-%0m-%0d - %desc.%ext')" value="$T('button-ShowNameF')" />
<input type="button" class="btn btn-default" onclick="dateSet('%y-%0m/%t - %y-%0m-%0d - %desc.%ext')" value="$T('button-YMF')" /> <input type="button" class="btn btn-default" onclick="dateSet('%y-%0m/%t - %y-%0m-%0d - %desc.%ext')" value="$T('button-YMF')" />
<input type="button" class="btn btn-default" onclick="dateSet('%y-%0m-%0d/%t - %y-%0m-%0d - %desc.%ext')" value="$T('button-DailyF')" /> <input type="button" class="btn btn-default" onclick="dateSet('%y-%0m-%0d/%t - %y-%0m-%0d - %desc.%ext')" value="$T('button-DailyF')" />
</div> </div>
</div> </div>
<div id="previewdate" class="example"> <div id="previewdate" class="example">
@ -337,7 +337,7 @@
<input type="text" id="datesamplename" name="datesamplename" placeholder="$T('show-name') 2009-01-02" /><button class="btn btn-default clearBtn" type="button"><span class="glyphicon glyphicon-remove"></span> $T('button-clear')</button> <input type="text" id="datesamplename" name="datesamplename" placeholder="$T('show-name') 2009-01-02" /><button class="btn btn-default clearBtn" type="button"><span class="glyphicon glyphicon-remove"></span> $T('button-clear')</button>
</div> </div>
<div class="field-pair"> <div class="field-pair">
<label class="config">$T('sortResult')</label> <span class="desc path" id="previewdate-result">&nbsp;</span> <label class="config">$T('sortResult')</label> <span class="desc path" id="previewdate-result">&nbsp;</span>
</div> </div>
</div> </div>
<div class="field-pair"> <div class="field-pair">
@ -519,12 +519,12 @@
else else
\$('#previewdate').hide(); \$('#previewdate').hide();
} }
\$(document).ready(function(){ \$(document).ready(function(){
new_previewtv(); new_previewtv();
new_previewmovie(); new_previewmovie();
new_previewdate(); new_previewdate();
\$('#tvfoldername, #tvsamplename').bind("keyup focus", new_previewtv); \$('#tvfoldername, #tvsamplename').bind("keyup focus", new_previewtv);
\$('#moviefoldername, #movieextra, #moviesamplename').bind("keyup focus", new_previewmovie); \$('#moviefoldername, #movieextra, #moviesamplename').bind("keyup focus", new_previewmovie);
\$('#datefoldername, #datesamplename').bind("keyup focus", new_previewdate); \$('#datefoldername, #datesamplename').bind("keyup focus", new_previewdate);

2
interfaces/Config/templates/config_special.tmpl

@ -17,7 +17,7 @@
<!--#for $option in $switches#--> <!--#for $option in $switches#-->
<div class="field-pair"> <div class="field-pair">
<label class="config wide" for="$option[0]"> <label class="config wide" for="$option[0]">
$option[0] ( <span class="path"><!--#if $option[2] then $T('on') else $T('off')#--></span> ) $option[0] ( <span class="path"><!--#if $option[2] then $T('on') else $T('off')#--></span> )
<!--#if $option[1] != $option[2] then '<span class="glyphicon glyphicon-asterisk"></span>' else ''#--> <!--#if $option[1] != $option[2] then '<span class="glyphicon glyphicon-asterisk"></span>' else ''#-->
</label> </label>
<input type="checkbox" name="$option[0]" id="$option[0]" value="1" <!--#if int($option[1]) > 0 then 'checked="checked"' else ""#--> /> <input type="checkbox" name="$option[0]" id="$option[0]" value="1" <!--#if int($option[1]) > 0 then 'checked="checked"' else ""#--> />

26
interfaces/Config/templates/config_switches.tmpl

@ -62,7 +62,7 @@
<input type="checkbox" name="max_art_opt" id="max_art_opt" value="1" <!--#if int($max_art_opt) > 0 then 'checked="checked"' else ""#--> /> <input type="checkbox" name="max_art_opt" id="max_art_opt" value="1" <!--#if int($max_art_opt) > 0 then 'checked="checked"' else ""#--> />
<span class="desc">$T('explain-max_art_opt')</span> <span class="desc">$T('explain-max_art_opt')</span>
</div> </div>
<div class="field-pair"> <div class="field-pair">
<label class="config" for="auto_disconnect">$T('opt-auto_disconnect')</label> <label class="config" for="auto_disconnect">$T('opt-auto_disconnect')</label>
<input type="checkbox" name="auto_disconnect" id="auto_disconnect" value="1" <!--#if int($auto_disconnect) > 0 then 'checked="checked"' else ""#--> /> <input type="checkbox" name="auto_disconnect" id="auto_disconnect" value="1" <!--#if int($auto_disconnect) > 0 then 'checked="checked"' else ""#--> />
@ -228,7 +228,7 @@
<input type="checkbox" name="unpack_check" id="unpack_check" value="1" <!--#if int($unpack_check) > 0 then 'checked="checked"' else ""#--> /> <input type="checkbox" name="unpack_check" id="unpack_check" value="1" <!--#if int($unpack_check) > 0 then 'checked="checked"' else ""#--> />
<span class="desc">$T('explain-unpack_check')</span> <span class="desc">$T('explain-unpack_check')</span>
</div> </div>
<div class="field-pair"> <div class="field-pair">
<label class="config" for="script_can_fail">$T('opt-script_can_fail')</label> <label class="config" for="script_can_fail">$T('opt-script_can_fail')</label>
<input type="checkbox" name="script_can_fail" id="script_can_fail" value="1" <!--#if int($script_can_fail) > 0 then 'checked="checked"' else ""#--> /> <input type="checkbox" name="script_can_fail" id="script_can_fail" value="1" <!--#if int($script_can_fail) > 0 then 'checked="checked"' else ""#--> />
@ -386,7 +386,7 @@
<p> <p>
<label for="rating_filter_abort_video">$T('opt-rating_filter_video')</label> <label for="rating_filter_abort_video">$T('opt-rating_filter_video')</label>
<select name="rating_filter_abort_video" id="rating_filter_abort_video"> <select name="rating_filter_abort_video" id="rating_filter_abort_video">
<option value="0" <!--#if $rating_filter_abort_video == 0 then 'selected="selected"' else ""#--> >$T('notUsed')</option> <option value="0" <!--#if $rating_filter_abort_video == 0 then 'selected="selected"' else ""#--> >$T('notUsed')</option>
<!--#for $val in $range(1, 10)#--><option value="$val" <!--#if $rating_filter_abort_video == $val then 'selected="selected"' else ""#--> >$val $T('orLess')</option><!--#end for#--> <!--#for $val in $range(1, 10)#--><option value="$val" <!--#if $rating_filter_abort_video == $val then 'selected="selected"' else ""#--> >$val $T('orLess')</option><!--#end for#-->
</select> </select>
</p> </p>
@ -406,7 +406,7 @@
<input type="checkbox" value="1" id="rating_filter_abort_encrypted_confirm" name="rating_filter_abort_encrypted_confirm" <!--#if int($rating_filter_abort_encrypted_confirm) > 0 then 'checked="checked"' else ""#--> /> <input type="checkbox" value="1" id="rating_filter_abort_encrypted_confirm" name="rating_filter_abort_encrypted_confirm" <!--#if int($rating_filter_abort_encrypted_confirm) > 0 then 'checked="checked"' else ""#--> />
<label for="rating_filter_abort_encrypted_confirm">$T('opt-rating_filter_confirmed')</label> <label for="rating_filter_abort_encrypted_confirm">$T('opt-rating_filter_confirmed')</label>
</span> </span>
</p> </p>
<p> <p>
<span> <span>
<input type="checkbox" value="1" id="rating_filter_abort_spam" name="rating_filter_abort_spam" <!--#if int($rating_filter_abort_spam) > 0 then 'checked="checked"' else ""#--> /> <input type="checkbox" value="1" id="rating_filter_abort_spam" name="rating_filter_abort_spam" <!--#if int($rating_filter_abort_spam) > 0 then 'checked="checked"' else ""#--> />
@ -416,7 +416,7 @@
<input type="checkbox" value="1" id="rating_filter_abort_spam_confirm" name="rating_filter_abort_spam_confirm" <!--#if int($rating_filter_abort_spam_confirm) > 0 then 'checked="checked"' else ""#--> /> <input type="checkbox" value="1" id="rating_filter_abort_spam_confirm" name="rating_filter_abort_spam_confirm" <!--#if int($rating_filter_abort_spam_confirm) > 0 then 'checked="checked"' else ""#--> />
<label for="rating_filter_abort_spam_confirm">$T('opt-rating_filter_confirmed')</label> <label for="rating_filter_abort_spam_confirm">$T('opt-rating_filter_confirmed')</label>
</span> </span>
</p> </p>
<p> <p>
<input type="checkbox" value="1" id="rating_filter_abort_downvoted" name="rating_filter_abort_downvoted" <!--#if int($rating_filter_abort_downvoted) > 0 then 'checked="checked"' else ""#--> /> <input type="checkbox" value="1" id="rating_filter_abort_downvoted" name="rating_filter_abort_downvoted" <!--#if int($rating_filter_abort_downvoted) > 0 then 'checked="checked"' else ""#--> />
<label for="rating_filter_abort_downvoted">$T('opt-rating_filter_downvoted')</label> <label for="rating_filter_abort_downvoted">$T('opt-rating_filter_downvoted')</label>
@ -454,7 +454,7 @@
<input type="checkbox" value="1" id="rating_filter_pause_encrypted_confirm" name="rating_filter_pause_encrypted_confirm" <!--#if int($rating_filter_pause_encrypted_confirm) > 0 then 'checked="checked"' else ""#--> /> <input type="checkbox" value="1" id="rating_filter_pause_encrypted_confirm" name="rating_filter_pause_encrypted_confirm" <!--#if int($rating_filter_pause_encrypted_confirm) > 0 then 'checked="checked"' else ""#--> />
<label for="rating_filter_pause_encrypted_confirm">$T('opt-rating_filter_confirmed')</label> <label for="rating_filter_pause_encrypted_confirm">$T('opt-rating_filter_confirmed')</label>
</span> </span>
</p> </p>
<p> <p>
<span> <span>
<input type="checkbox" value="1" id="rating_filter_pause_spam" name="rating_filter_pause_spam" <!--#if int($rating_filter_pause_spam) > 0 then 'checked="checked"' else ""#--> /> <input type="checkbox" value="1" id="rating_filter_pause_spam" name="rating_filter_pause_spam" <!--#if int($rating_filter_pause_spam) > 0 then 'checked="checked"' else ""#--> />
@ -464,7 +464,7 @@
<input type="checkbox" value="1" id="rating_filter_pause_spam_confirm" name="rating_filter_pause_spam_confirm" <!--#if int($rating_filter_pause_spam_confirm) > 0 then 'checked="checked"' else ""#--> /> <input type="checkbox" value="1" id="rating_filter_pause_spam_confirm" name="rating_filter_pause_spam_confirm" <!--#if int($rating_filter_pause_spam_confirm) > 0 then 'checked="checked"' else ""#--> />
<label for="rating_filter_pause_spam_confirm">$T('opt-rating_filter_confirmed')</label> <label for="rating_filter_pause_spam_confirm">$T('opt-rating_filter_confirmed')</label>
</span> </span>
</p> </p>
<p> <p>
<input type="checkbox" value="1" id="rating_filter_pause_downvoted" name="rating_filter_pause_downvoted" <!--#if int($rating_filter_pause_downvoted) > 0 then 'checked="checked"' else ""#--> /> <input type="checkbox" value="1" id="rating_filter_pause_downvoted" name="rating_filter_pause_downvoted" <!--#if int($rating_filter_pause_downvoted) > 0 then 'checked="checked"' else ""#--> />
<label for="rating_filter_pause_downvoted">$T('opt-rating_filter_downvoted')</label> <label for="rating_filter_pause_downvoted">$T('opt-rating_filter_downvoted')</label>
@ -488,16 +488,16 @@
<script type="text/javascript"> <script type="text/javascript">
\$(document).ready(function() { \$(document).ready(function() {
if (!\$('#rating_filter_enable').is(":checked")) { if (!\$('#rating_filter_enable').is(":checked")) {
\$("#rating_filter_abort").hide(); \$("#rating_filter_abort").hide();
\$("#rating_filter_pause").hide(); \$("#rating_filter_pause").hide();
} }
\$('#rating_filter_enable').change(function () { \$('#rating_filter_enable').change(function () {
if (\$(this).is(":checked")) { if (\$(this).is(":checked")) {
\$("#rating_filter_abort").show(); \$("#rating_filter_abort").show();
\$("#rating_filter_pause").show(); \$("#rating_filter_pause").show();
} }
else { else {
\$("#rating_filter_abort").hide(); \$("#rating_filter_abort").hide();
\$("#rating_filter_pause").hide(); \$("#rating_filter_pause").hide();
} }
}); });

12
interfaces/Config/templates/login/main.tmpl

@ -1,19 +1,19 @@
<html lang="$active_lang"> <html lang="$active_lang">
<head> <head>
<title>SABnzbd</title> <title>SABnzbd</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="apple-mobile-web-app-title" content="SABnzbd" /> <meta name="apple-mobile-web-app-title" content="SABnzbd" />
<link rel="apple-touch-icon" sizes="76x76" href="../staticcfg/ico/apple-touch-icon-76x76-precomposed.png" /> <link rel="apple-touch-icon" sizes="76x76" href="../staticcfg/ico/apple-touch-icon-76x76-precomposed.png" />
<link rel="apple-touch-icon" sizes="120x120" href="../staticcfg/ico/apple-touch-icon-120x120-precomposed.png" /> <link rel="apple-touch-icon" sizes="120x120" href="../staticcfg/ico/apple-touch-icon-120x120-precomposed.png" />
<link rel="apple-touch-icon" sizes="152x152" href="../staticcfg/ico/apple-touch-icon-152x152-precomposed.png" /> <link rel="apple-touch-icon" sizes="152x152" href="../staticcfg/ico/apple-touch-icon-152x152-precomposed.png" />
<link rel="apple-touch-icon" sizes="180x180" href="../staticcfg/ico/apple-touch-icon-180x180-precomposed.png" /> <link rel="apple-touch-icon" sizes="180x180" href="../staticcfg/ico/apple-touch-icon-180x180-precomposed.png" />
<link rel="apple-touch-icon" sizes="192x192" href="../staticcfg/ico/android-192x192.png" /> <link rel="apple-touch-icon" sizes="192x192" href="../staticcfg/ico/android-192x192.png" />
<link rel="shortcut icon" href="../staticcfg/ico/favicon.ico?v=1.1.0" /> <link rel="shortcut icon" href="../staticcfg/ico/favicon.ico?v=1.1.0" />
<link rel="stylesheet" type="text/css" href="../staticcfg/bootstrap/css/bootstrap.min.css" /> <link rel="stylesheet" type="text/css" href="../staticcfg/bootstrap/css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" href="../staticcfg/css/login.css?p=$pid" /> <link rel="stylesheet" type="text/css" href="../staticcfg/css/login.css?p=$pid" />
<script type="text/javascript" src="../staticcfg/js/jquery-1.11.2.min.js"></script> <script type="text/javascript" src="../staticcfg/js/jquery-1.11.2.min.js"></script>
@ -32,10 +32,10 @@
<!--#if $error#--> <!--#if $error#-->
<div class="alert alert-danger" role="alert">$error</div> <div class="alert alert-danger" role="alert">$error</div>
<!--#end if#--> <!--#end if#-->
<input type="text" class="form-control" name="username" placeholder="$T('srv-username')" required autofocus> <input type="text" class="form-control" name="username" placeholder="$T('srv-username')" required autofocus>
<input type="password" class="form-control" name="password" placeholder="$T('srv-password')" required> <input type="password" class="form-control" name="password" placeholder="$T('srv-password')" required>
<button class="btn btn-default"><span class="glyphicon glyphicon-circle-arrow-right"></span> $T('login') </button> <button class="btn btn-default"><span class="glyphicon glyphicon-circle-arrow-right"></span> $T('login') </button>
<div class="checkbox text-center" data-toggle="tooltip" data-placement="bottom" title="$T('explain-sessionExpire')"> <div class="checkbox text-center" data-toggle="tooltip" data-placement="bottom" title="$T('explain-sessionExpire')">

10
interfaces/Config/templates/staticcfg/css/login.css

@ -30,10 +30,10 @@ body {
} }
.text-center a { .text-center a {
position: absolute; position: absolute;
right: 13px; right: 13px;
top: 12px; top: 12px;
color: #636363; color: #636363;
font-size: 1.2em font-size: 1.2em
} }
@ -57,7 +57,7 @@ body {
} }
.btn .glyphicon { .btn .glyphicon {
margin-left: 3px; margin-left: 3px;
float: right; float: right;
top: 1px; top: 1px;
font-size: 1.2em; font-size: 1.2em;

80
interfaces/Config/templates/staticcfg/css/style.css

@ -106,7 +106,7 @@ label.config,
} }
label.config-hover { label.config-hover {
cursor: pointer; cursor: pointer;
} }
label.narrow { label.narrow {
width: 200px!important; width: 200px!important;
@ -131,7 +131,7 @@ label.wide,
} }
input[type="checkbox"]+.desc { input[type="checkbox"]+.desc {
padding-top: 6px; padding-top: 6px;
} }
.desc-check { .desc-check {
font-size: 12px; font-size: 12px;
font-style: italic; font-style: italic;
@ -174,8 +174,8 @@ input[type="checkbox"]+.desc {
padding-left: 12px; padding-left: 12px;
font-size: 13px; font-size: 13px;
} }
.typeahead.dropdown-menu>.active>a, .typeahead.dropdown-menu>.active>a,
.typeahead.dropdown-menu>.active>a:focus, .typeahead.dropdown-menu>.active>a:focus,
.typeahead.dropdown-menu>.active>a:hover { .typeahead.dropdown-menu>.active>a:hover {
color: black; color: black;
background-color: #E5E5E5; background-color: #E5E5E5;
@ -681,7 +681,7 @@ ul.tabs li.active a {
transition: none; transition: none;
} }
input[type=checkbox], input[type=checkbox],
input[type=radio] { input[type=radio] {
margin-top: 2px; margin-top: 2px;
} }
@ -725,10 +725,10 @@ select {
box-shadow: inset 0 1px 1px rgba(0,0,0,.075); box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
display:inline-block; display:inline-block;
vertical-align:middle; vertical-align:middle;
max-width: 100%; max-width: 100%;
min-height: 34px; min-height: 34px;
font-size: 13px; font-size: 13px;
background-color: white; background-color: white;
} }
input[type="text"]:not([size]), input[type="text"]:not([size]),
@ -876,8 +876,8 @@ input[type="checkbox"] {
width: 1em; width: 1em;
height: 1em; height: 1em;
} }
.rss-symbol { .rss-symbol {
stroke: none; stroke: none;
fill: white; fill: white;
} }
@ -1005,28 +1005,28 @@ input[type="checkbox"] {
100% { transform: rotate(359deg); } 100% { transform: rotate(359deg); }
} }
@media screen and (min-width: 1200px) { @media screen and (min-width: 1200px) {
.Categories input[name="dir"] { .Categories input[name="dir"] {
max-width: 240px !important; max-width: 240px !important;
} }
} }
@media screen and (min-width: 768px) and (max-width: 1200px) { @media screen and (min-width: 768px) and (max-width: 1200px) {
.navbar-default .navbar-nav>li>a>span, .navbar-default .navbar-nav>li>a>span,
.navbar-default .navbar-nav>li>a:hover>strong, .navbar-default .navbar-nav>li>a:hover>strong,
.navbar-default .navbar-nav>li>a.active>strong { .navbar-default .navbar-nav>li>a.active>strong {
display: inline; display: inline;
} }
.navbar-default .navbar-nav>li>a>svg { .navbar-default .navbar-nav>li>a>svg {
display: inline-block; display: inline-block;
} }
.navbar-default .navbar-nav>li>a>strong, .navbar-default .navbar-nav>li>a>strong,
.navbar-default .navbar-nav:hover>li>a.active>strong { .navbar-default .navbar-nav:hover>li>a.active>strong {
display: none; display: none;
} }
.RSS #content, .RSS #content,
.Categories #content { .Categories #content {
width: 100%; width: 100%;
@ -1038,20 +1038,20 @@ input[type="checkbox"] {
float: right; float: right;
padding: 5px 0px; padding: 5px 0px;
} }
.col1 h5 { .col1 h5 {
margin-left: 20px; margin-left: 20px;
} }
.col2 { .col2 {
width: 100%; width: 100%;
padding: 10px; padding: 10px;
} }
.col2 p { .col2 p {
margin-left: 20px; margin-left: 20px;
} }
.Servers .col2 button:first-of-type { .Servers .col2 button:first-of-type {
margin-bottom: 0; margin-bottom: 0;
} }
@ -1069,10 +1069,10 @@ input[type="checkbox"] {
} }
.navbar-collapse.in .navbar-nav>li>a>span, .navbar-collapse.in .navbar-nav>li>a>span,
.navbar-collapse.collapsing .navbar-nav>li>a>span { .navbar-collapse.collapsing .navbar-nav>li>a>span {
display: inline-block; display: inline-block;
width: 1.5em; width: 1.5em;
} }
.navbar-collapse.in .navbar-nav>li>a>svg, .navbar-collapse.in .navbar-nav>li>a>svg,
.navbar-collapse.collapsing .navbar-nav>li>a>svg { .navbar-collapse.collapsing .navbar-nav>li>a>svg {
display: inline-block; display: inline-block;
@ -1082,24 +1082,24 @@ input[type="checkbox"] {
.navbar .nav>li>a { .navbar .nav>li>a {
height: auto; height: auto;
} }
.section .col2 h3 { .section .col2 h3 {
padding-right: 25px; padding-right: 25px;
} }
.section .col2 h3 a { .section .col2 h3 a {
display: inline-block; display: inline-block;
} }
.main-restarting.in strong { .main-restarting.in strong {
font-size: 2em; font-size: 2em;
font-weight: bold; font-weight: bold;
} }
.main-restarting.in span { .main-restarting.in span {
top: 2px; top: 2px;
} }
.main-restarting.in small { .main-restarting.in small {
font-size: 2rem !important; font-size: 2rem !important;
} }
@ -1109,55 +1109,55 @@ input[type="checkbox"] {
padding: 0 !important; padding: 0 !important;
padding-top: 55px !important; padding-top: 55px !important;
} }
#content fieldset { #content fieldset {
min-width: 0; min-width: 0;
padding: 0 !important; padding: 0 !important;
} }
.colmask { .colmask {
border: none !important; border: none !important;
} }
.col2 { .col2 {
padding: 10px; padding: 10px;
} }
.col2 h3 { .col2 h3 {
margin: -10px -10px 0px; margin: -10px -10px 0px;
padding-left: 10px; padding-left: 10px;
} }
.col2 p { .col2 p {
margin-left: 0px; margin-left: 0px;
margin-bottom: 0; margin-bottom: 0;
} }
.col1 h5 { .col1 h5 {
margin-left: 0px; margin-left: 0px;
} }
label.config { label.config {
margin-left: 0px; margin-left: 0px;
margin-bottom: 2px; margin-bottom: 2px;
width: 100%; width: 100%;
float: none; float: none;
} }
.desc { .desc {
margin: 0; margin: 0;
margin-left: 3px; margin-left: 3px;
margin-top: 2px; margin-top: 2px;
padding: 0 !important; padding: 0 !important;
} }
.col1 input[type="checkbox"] { .col1 input[type="checkbox"] {
position: inherit; position: inherit;
float: left; float: left;
margin-right: 5px; margin-right: 5px;
margin-top: 0px; margin-top: 0px;
} }
div.field-pair{ div.field-pair{
min-width: 0; min-width: 0;
padding: 5px 10px; padding: 5px 10px;
@ -1165,8 +1165,8 @@ input[type="checkbox"] {
.fileBrowserField { .fileBrowserField {
max-width: 65% !important; max-width: 65% !important;
} }
ul.tabs a { ul.tabs a {
padding-left: 5px; padding-left: 5px;
padding-right: 5px; padding-right: 5px;

62
interfaces/Config/templates/staticcfg/js/script.js

File diff suppressed because one or more lines are too long

2
interfaces/Glitter/templates/include_history.tmpl

@ -204,7 +204,7 @@
<span data-bind="text: page"></span> <span data-bind="text: page"></span>
</li> </li>
</ul> </ul>
<div class="multioperations-selector" id="history-options"> <div class="multioperations-selector" id="history-options">
<a href="#" class="hover-button" title="$T('showAllHis') / $T('showFailedHis')" data-tooltip="true" data-placement="left" data-bind="click: history.toggleShowFailed, css: { 'history-options-show-failed': history.showFailed }"><span class="glyphicon glyphicon-exclamation-sign"></span></a> <a href="#" class="hover-button" title="$T('showAllHis') / $T('showFailedHis')" data-tooltip="true" data-placement="left" data-bind="click: history.toggleShowFailed, css: { 'history-options-show-failed': history.showFailed }"><span class="glyphicon glyphicon-exclamation-sign"></span></a>
<a href="#modal-purge-history" class="hover-button" title="$T('purgeHist')" data-toggle="modal" data-tooltip="true" data-placement="left"><span class="glyphicon glyphicon-trash"></span></a> <a href="#modal-purge-history" class="hover-button" title="$T('purgeHist')" data-toggle="modal" data-tooltip="true" data-placement="left"><span class="glyphicon glyphicon-trash"></span></a>

2
interfaces/Glitter/templates/include_messages.tmpl

@ -40,7 +40,7 @@
<td>$T('none')</td> <td>$T('none')</td>
<td></td> <td></td>
</tr> </tr>
<!-- /ko --> <!-- /ko -->
</tbody> </tbody>
</table> </table>
</div> </div>

4
interfaces/Glitter/templates/include_queue.tmpl

@ -203,14 +203,14 @@
</div> </div>
<div class="clearfix"></div> <div class="clearfix"></div>
</form> </form>
<div class="input-group search-box" data-bind="visible: queue.hasQueueSearch" style="display: none;"> <div class="input-group search-box" data-bind="visible: queue.hasQueueSearch" style="display: none;">
<input type="text" class="form-control" placeholder="$T('Glitter-search')" required data-bind="textInput: queue.searchTerm, event: { keydown: queue.clearSearchTerm }" /> <input type="text" class="form-control" placeholder="$T('Glitter-search')" required data-bind="textInput: queue.searchTerm, event: { keydown: queue.clearSearchTerm }" />
<a data-bind="event: { mousedown: queue.clearSearchTerm }"> <a data-bind="event: { mousedown: queue.clearSearchTerm }">
<span class="glyphicon" data-bind="css: { 'glyphicon-search' : !queue.searchTerm(), 'glyphicon-remove' : queue.searchTerm() }"></span> <span class="glyphicon" data-bind="css: { 'glyphicon-search' : !queue.searchTerm(), 'glyphicon-remove' : queue.searchTerm() }"></span>
</a> </a>
</div> </div>
<ul class="pagination" data-bind="foreach: queue.pagination.allpages, visible: queue.pagination.hasPagination" style="display: none;"> <ul class="pagination" data-bind="foreach: queue.pagination.allpages, visible: queue.pagination.hasPagination" style="display: none;">
<li data-bind="css: { active: isCurrent, disabled: isDots }, click: onclick"> <li data-bind="css: { active: isCurrent, disabled: isDots }, click: onclick">
<span data-bind="text: page"></span> <span data-bind="text: page"></span>

10
interfaces/Glitter/templates/main.tmpl

@ -5,7 +5,7 @@
<!-- <!--
Glitter V2 Glitter V2
By Safihre (2016) - safihre@sabnzbd.org By Safihre (2016) - safihre@sabnzbd.org
Code extended from Shiny-template Code extended from Shiny-template
Code examples used from Knockstrap-template Code examples used from Knockstrap-template
@ -24,7 +24,7 @@
<meta name="apple-mobile-web-app-status-bar-style" content="black" /> <meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta name="msapplication-navbutton-color" content="#000000" /> <meta name="msapplication-navbutton-color" content="#000000" />
<meta name="theme-color" content="#000000" /> <meta name="theme-color" content="#000000" />
<link rel="apple-touch-icon" sizes="76x76" href="./staticcfg/ico/apple-touch-icon-76x76-precomposed.png" /> <link rel="apple-touch-icon" sizes="76x76" href="./staticcfg/ico/apple-touch-icon-76x76-precomposed.png" />
<link rel="apple-touch-icon" sizes="120x120" href="./staticcfg/ico/apple-touch-icon-120x120-precomposed.png" /> <link rel="apple-touch-icon" sizes="120x120" href="./staticcfg/ico/apple-touch-icon-120x120-precomposed.png" />
<link rel="apple-touch-icon" sizes="152x152" href="./staticcfg/ico/apple-touch-icon-152x152-precomposed.png" /> <link rel="apple-touch-icon" sizes="152x152" href="./staticcfg/ico/apple-touch-icon-152x152-precomposed.png" />
@ -49,7 +49,7 @@
var glitterIsBeta = ("$version".search(/Alpa|Beta|x/)) > 0; var glitterIsBeta = ("$version".search(/Alpa|Beta|x/)) > 0;
var glitterPreLoadQueue = $preload_queue; var glitterPreLoadQueue = $preload_queue;
var glitterPreLoadHistory = $preload_history; var glitterPreLoadHistory = $preload_history;
var glitterTranslate = new Object(); var glitterTranslate = new Object();
glitterTranslate.paused = "$T('post-Paused')"; glitterTranslate.paused = "$T('post-Paused')";
glitterTranslate.left = "$T('Glitter-left')"; glitterTranslate.left = "$T('Glitter-left')";
@ -82,7 +82,7 @@
glitterTranslate.defaultText = "$T('default')"; glitterTranslate.defaultText = "$T('default')";
glitterTranslate.noneText = "$T('None')"; glitterTranslate.noneText = "$T('None')";
glitterTranslate.moreText = "$T('Glitter-more')"; glitterTranslate.moreText = "$T('Glitter-more')";
glitterTranslate.status = []; glitterTranslate.status = [];
glitterTranslate.status['Completed'] = "$T('post-Completed')"; glitterTranslate.status['Completed'] = "$T('post-Completed')";
glitterTranslate.status['Failed'] = "$T('post-Failed')"; glitterTranslate.status['Failed'] = "$T('post-Failed')";
@ -159,7 +159,7 @@
<!--#include $webdir + "/include_messages.tmpl"#--> <!--#include $webdir + "/include_messages.tmpl"#-->
<!--#include $webdir + "/include_history.tmpl"#--> <!--#include $webdir + "/include_history.tmpl"#-->
</div> </div>
<!--#include $webdir + "/include_overlays.tmpl"#--> <!--#include $webdir + "/include_overlays.tmpl"#-->
</body> </body>
</html> </html>

12
interfaces/Glitter/templates/queue.tmpl

@ -1,35 +1,35 @@
<!--#if $paused#--> <!--#if $paused#-->
<!--#if $pause_int != '0' #--> <!--#if $pause_int != '0' #-->
<!--#from math import floor#--> <!--#from math import floor#-->
<!--#set pauseSplit = $pause_int.split(':')#--> <!--#set pauseSplit = $pause_int.split(':')#-->
<!--#set seconds = int(pauseSplit[0]) * 60 + int(pauseSplit[1])#--> <!--#set seconds = int(pauseSplit[0]) * 60 + int(pauseSplit[1])#-->
<!--#set hours = floor(seconds/3600)#--> <!--#set hours = floor(seconds/3600)#-->
<!--#set minutes = floor((seconds - hours * 3600) / 60)#--> <!--#set minutes = floor((seconds - hours * 3600) / 60)#-->
<!--#set seconds = seconds - minutes * 60 - hours * 3600#--> <!--#set seconds = seconds - minutes * 60 - hours * 3600#-->
<!--#if seconds < 10 #--> <!--#if seconds < 10 #-->
<!--#set seconds = '0' + str(int(seconds)) #--> <!--#set seconds = '0' + str(int(seconds)) #-->
<!--#else#--> <!--#else#-->
<!--#set seconds = str(int(seconds)) #--> <!--#set seconds = str(int(seconds)) #-->
<!--#end if#--> <!--#end if#-->
<!--#if (minutes < 10) & (hours > 0) #--> <!--#if (minutes < 10) & (hours > 0) #-->
<!--#set minutes = '0' + str(int(minutes)) #--> <!--#set minutes = '0' + str(int(minutes)) #-->
<!--#else#--> <!--#else#-->
<!--#set minutes = str(int(minutes)) #--> <!--#set minutes = str(int(minutes)) #-->
<!--#end if#--> <!--#end if#-->
<!--#if hours > 0 #--> <!--#if hours > 0 #-->
<!--#set timeString = str(int(hours)) + ":" + minutes + ":" + seconds#--> <!--#set timeString = str(int(hours)) + ":" + minutes + ":" + seconds#-->
<!--#else#--> <!--#else#-->
<!--#set timeString = minutes + ":" + seconds#--> <!--#set timeString = minutes + ":" + seconds#-->
<!--#end if#--> <!--#end if#-->
<!--#end if#--> <!--#end if#-->
$T('post-Paused') <!--#if $pause_int != '0' #-->($timeString) <!--#end if#--> $T('post-Paused') <!--#if $pause_int != '0' #-->($timeString) <!--#end if#-->
<!--#if float($mbleft) > 0#--> <!--#if float($mbleft) > 0#-->
- $sizeleft $T('Glitter-left') - $sizeleft $T('Glitter-left')
<!--#end if#--> <!--#end if#-->
- SABnzbd - SABnzbd
<!--#else if float($mbleft) < 0.1#--> <!--#else if float($mbleft) < 0.1#-->

2
interfaces/Glitter/templates/static/bootstrap/css/bootstrap.min.css

@ -2,7 +2,7 @@
* Bootstrap v3.3.5 (http://getbootstrap.com) * Bootstrap v3.3.5 (http://getbootstrap.com)
* Copyright 2011-2015 Twitter, Inc. * Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* *
* SABnzbd EDIT: We use the Glyphicons of v3.0.2 because the new ones are not sharp on Firefox and Chrome on Windows (Sep 2015). * SABnzbd EDIT: We use the Glyphicons of v3.0.2 because the new ones are not sharp on Firefox and Chrome on Windows (Sep 2015).
* For example compare the icons in the config (that uses the new ones), with the Glitter icons. * For example compare the icons in the config (that uses the new ones), with the Glitter icons.
* *

2
interfaces/Glitter/templates/static/javascripts/date.min.js

@ -1,4 +1,4 @@
/** /**
* @overview datejs * @overview datejs
* @version 1.0.0-rc3 * @version 1.0.0-rc3
* @author Gregory Wild-Smith <gregory@wild-smith.com> * @author Gregory Wild-Smith <gregory@wild-smith.com>

28
interfaces/Glitter/templates/static/javascripts/glitter.basic.js

@ -9,13 +9,13 @@ var hasLocalStorage = true;
function localStorageSetItem(varToSet, valueToSet) { try { return localStorage.setItem(varToSet, valueToSet); } catch(e) { hasLocalStorage = false; } } function localStorageSetItem(varToSet, valueToSet) { try { return localStorage.setItem(varToSet, valueToSet); } catch(e) { hasLocalStorage = false; } }
function localStorageGetItem(varToGet) { try { return localStorage.getItem(varToGet); } catch(e) { hasLocalStorage = false; } } function localStorageGetItem(varToGet) { try { return localStorage.getItem(varToGet); } catch(e) { hasLocalStorage = false; } }
// For mobile we disable zoom while a modal is being opened // For mobile we disable zoom while a modal is being opened
// so it will not zoom unnecessarily on the modal // so it will not zoom unnecessarily on the modal
if(isMobile) { if(isMobile) {
$('.modal').on('show.bs.modal', function() { $('.modal').on('show.bs.modal', function() {
$('meta[name="viewport"]').attr('content', 'width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no'); $('meta[name="viewport"]').attr('content', 'width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no');
}); });
// Restore on modal-close. Need timeout, otherwise it doesn't work // Restore on modal-close. Need timeout, otherwise it doesn't work
$('.modal').on('hidden.bs.modal', function() { $('.modal').on('hidden.bs.modal', function() {
setTimeout(function() { setTimeout(function() {
@ -58,13 +58,13 @@ function callSpecialAPI(url, data) {
} }
/** /**
Handle visibility changes so we Handle visibility changes so we
do only incremental update when not visible do only incremental update when not visible
**/ **/
var pageIsVisible = true; var pageIsVisible = true;
// Set the name of the hidden property and the change event for visibility // Set the name of the hidden property and the change event for visibility
var hidden, visibilityChange; var hidden, visibilityChange;
if(typeof document.hidden !== "undefined") { // Opera 12.10 and Firefox 18 and later support if(typeof document.hidden !== "undefined") { // Opera 12.10 and Firefox 18 and later support
hidden = "hidden"; hidden = "hidden";
visibilityChange = "visibilitychange"; visibilityChange = "visibilitychange";
} else if(typeof document.mozHidden !== "undefined") { } else if(typeof document.mozHidden !== "undefined") {
@ -78,7 +78,7 @@ if(typeof document.hidden !== "undefined") { // Opera 12.10 and Firefox 18 and l
visibilityChange = "webkitvisibilitychange"; visibilityChange = "webkitvisibilitychange";
} }
// Set the global visibility // Set the global visibility
function handleVisibilityChange() { function handleVisibilityChange() {
if(document[hidden]) { if(document[hidden]) {
pageIsVisible = false; pageIsVisible = false;
@ -89,7 +89,7 @@ function handleVisibilityChange() {
// Add event listener only for supported browsers // Add event listener only for supported browsers
if(typeof document.addEventListener !== "undefined" && typeof document[hidden] !== "undefined") { if(typeof document.addEventListener !== "undefined" && typeof document[hidden] !== "undefined") {
// Handle page visibility change // Handle page visibility change
document.addEventListener(visibilityChange, handleVisibilityChange, false); document.addEventListener(visibilityChange, handleVisibilityChange, false);
} }
@ -183,12 +183,12 @@ function showDetails(thisItem) {
function checkAllFiles(objCheck, onlyCheck) { function checkAllFiles(objCheck, onlyCheck) {
// Get which ones we care about // Get which ones we care about
var allChecks = $($(objCheck).data('checkrange')).filter(':not(:disabled):visible'); var allChecks = $($(objCheck).data('checkrange')).filter(':not(:disabled):visible');
// We need to re-evaltuate the state of this check-all // We need to re-evaltuate the state of this check-all
// Otherwise the 'inderterminate' will be overwritten by the click event! // Otherwise the 'inderterminate' will be overwritten by the click event!
setCheckAllState('#'+objCheck.id, $(objCheck).data('checkrange')) setCheckAllState('#'+objCheck.id, $(objCheck).data('checkrange'))
// Now we can check what happend // Now we can check what happend
if(objCheck.indeterminate) { if(objCheck.indeterminate) {
// Uncheck if we don't need trigger // Uncheck if we don't need trigger
if(onlyCheck) { if(onlyCheck) {
@ -203,7 +203,7 @@ function checkAllFiles(objCheck, onlyCheck) {
} }
// To update the check-all button nicely // To update the check-all button nicely
function setCheckAllState(checkSelector, rangeSelector) { function setCheckAllState(checkSelector, rangeSelector) {
// See how many are checked // See how many are checked
var allChecks = $(rangeSelector).filter(':not(:disabled):visible') var allChecks = $(rangeSelector).filter(':not(:disabled):visible')
var nrChecks = allChecks.filter(":checked"); var nrChecks = allChecks.filter(":checked");
@ -246,7 +246,7 @@ function hideCompletedFiles() {
// Show status modal and switch to orphaned jobs tab // Show status modal and switch to orphaned jobs tab
function showOrphans() { function showOrphans() {
$('a[href="#modal-options"]').click().parent().click(); $('a[href="#modal-options"]').click().parent().click();
$('a[href="#options-orphans"]').click() $('a[href="#options-orphans"]').click()
} }
@ -263,8 +263,8 @@ function showNotification(notiName, notiTimeout, fileCounter) {
// Remove after timeout // Remove after timeout
if(notiTimeout) { if(notiTimeout) {
setTimeout(function() { setTimeout(function() {
hideNotification(true); hideNotification(true);
}, notiTimeout) }, notiTimeout)
} }
} }
@ -277,5 +277,5 @@ function hideNotification(fadeItOut) {
} else { } else {
$('.main-notification-box').hide() $('.main-notification-box').hide()
} }
} }

4
interfaces/Glitter/templates/static/javascripts/glitter.js

@ -1,8 +1,8 @@
/****** /******
Glitter V1 Glitter V1
By Safihre (2015) - safihre@sabnzbd.org By Safihre (2015) - safihre@sabnzbd.org
Code extended from Shiny-template Code extended from Shiny-template
Code examples used from Knockstrap-template Code examples used from Knockstrap-template

84
interfaces/Glitter/templates/static/javascripts/glitter.main.js

@ -74,16 +74,16 @@ function ViewModel() {
self.speedLimitText = ko.pureComputed(function() { self.speedLimitText = ko.pureComputed(function() {
// Set? // Set?
if(!self.bandwithLimit()) return; if(!self.bandwithLimit()) return;
// The text // The text
var bandwithLimitText = self.bandwithLimit().replace(/[^a-zA-Z]+/g, ''); var bandwithLimitText = self.bandwithLimit().replace(/[^a-zA-Z]+/g, '');
// Only the number // Only the number
var speedLimitNumberFull = (parseFloat(self.bandwithLimit()) * (self.speedLimit() / 100)); var speedLimitNumberFull = (parseFloat(self.bandwithLimit()) * (self.speedLimit() / 100));
// Trick to only get decimal-point when needed // Trick to only get decimal-point when needed
var speedLimitNumber = Math.round(speedLimitNumberFull*10)/10; var speedLimitNumber = Math.round(speedLimitNumberFull*10)/10;
// Fix it for lower than 1MB/s // Fix it for lower than 1MB/s
if(bandwithLimitText == 'M' && speedLimitNumber < 1) { if(bandwithLimitText == 'M' && speedLimitNumber < 1) {
bandwithLimitText = 'K'; bandwithLimitText = 'K';
@ -146,7 +146,7 @@ function ViewModel() {
Possible login failure? Possible login failure?
***/ ***/
if(response.hasOwnProperty('error') && response.error == 'Missing authentication') { if(response.hasOwnProperty('error') && response.error == 'Missing authentication') {
// Restart // Restart
document.location = document.location; document.location = document.location;
} }
@ -171,7 +171,7 @@ function ViewModel() {
} else { } else {
self.diskSpaceLeft2('') self.diskSpaceLeft2('')
} }
// Did we exceed the space? // Did we exceed the space?
self.diskSpaceExceeded1(parseInt(response.queue.mbleft)/1024 > parseInt(response.queue.diskspace1)) self.diskSpaceExceeded1(parseInt(response.queue.mbleft)/1024 > parseInt(response.queue.diskspace1))
self.diskSpaceExceeded2(parseInt(response.queue.mbleft)/1024 > parseInt(response.queue.diskspace2)) self.diskSpaceExceeded2(parseInt(response.queue.mbleft)/1024 > parseInt(response.queue.diskspace2))
@ -220,7 +220,7 @@ function ViewModel() {
// Update internally // Update internally
self.speedHistory = sabSpeedHistory; self.speedHistory = sabSpeedHistory;
} }
// Create // Create
$('.sparkline').peity("line", { $('.sparkline').peity("line", {
width: 275, width: 275,
@ -229,7 +229,7 @@ function ViewModel() {
stroke: '#AAFFAA', stroke: '#AAFFAA',
values: sabSpeedHistory values: sabSpeedHistory
}) })
} else { } else {
// Update // Update
$('.sparkline').text(self.speedHistory.join(",")).change() $('.sparkline').text(self.speedHistory.join(",")).change()
@ -272,7 +272,7 @@ function ViewModel() {
seconds -= minutes * 60; seconds -= minutes * 60;
timeString = glitterTranslate.paused + ' (' + rewriteTime(hours + ":" + minutes + ":" + seconds) + ')'; timeString = glitterTranslate.paused + ' (' + rewriteTime(hours + ":" + minutes + ":" + seconds) + ')';
} }
// Add info about amount of download (if actually downloading) // Add info about amount of download (if actually downloading)
if(response.queue.noofslots > 0 && parseInt(self.queueDataLeft()) > 0) { if(response.queue.noofslots > 0 && parseInt(self.queueDataLeft()) > 0) {
self.title(timeString + ' - ' + self.queueDataLeft() + ' ' + glitterTranslate.left + ' - SABnzbd') self.title(timeString + ' - ' + self.queueDataLeft() + ' ' + glitterTranslate.left + ' - SABnzbd')
@ -310,13 +310,13 @@ function ViewModel() {
self.refresh = function(forceFullHistory) { self.refresh = function(forceFullHistory) {
// Clear previous timeout to prevent double-calls // Clear previous timeout to prevent double-calls
clearTimeout(self.interval); clearTimeout(self.interval);
/** /**
Limited refresh Limited refresh
**/ **/
// Only update the title when page not visible // Only update the title when page not visible
if(!pageIsVisible) { if(!pageIsVisible) {
// Request new title // Request new title
callSpecialAPI('./queue/', { limit: 1, start: 0 }).done(function(data) { callSpecialAPI('./queue/', { limit: 1, start: 0 }).done(function(data) {
// Split title & speed // Split title & speed
var dataSplit = data.split('|||'); var dataSplit = data.split('|||');
@ -392,7 +392,7 @@ function ViewModel() {
limit: parseInt(self.history.paginationLimit()), limit: parseInt(self.history.paginationLimit()),
last_history_update: self.history.lastUpdate last_history_update: self.history.lastUpdate
}).done(self.updateHistory); }).done(self.updateHistory);
// We are now done with any loading // We are now done with any loading
// But we wait a few ms so Knockout has time to update // But we wait a few ms so Knockout has time to update
setTimeout(function() { setTimeout(function() {
@ -434,12 +434,12 @@ function ViewModel() {
} }
// Show modal // Show modal
$('#modal_custom_pause').modal('show') $('#modal_custom_pause').modal('show')
// Focus on the input field // Focus on the input field
$('#modal_custom_pause').on('shown.bs.modal', function () { $('#modal_custom_pause').on('shown.bs.modal', function () {
$('#customPauseInput').focus() $('#customPauseInput').focus()
}) })
// Reset on modal close // Reset on modal close
$('#modal_custom_pause').on('hide.bs.modal', function () { $('#modal_custom_pause').on('hide.bs.modal', function () {
self.pauseCustom(''); self.pauseCustom('');
@ -460,10 +460,10 @@ function ViewModel() {
$('#modal_custom_pause .btn-default').addClass('disabled') $('#modal_custom_pause .btn-default').addClass('disabled')
return; return;
} }
// Parse // Parse
var pauseParsed = Date.parse(newValue); var pauseParsed = Date.parse(newValue);
// Did we get it? // Did we get it?
if(pauseParsed) { if(pauseParsed) {
// Is it just now? // Is it just now?
@ -471,7 +471,7 @@ function ViewModel() {
// Try again with the '+' in front, the parser doesn't get 100min // Try again with the '+' in front, the parser doesn't get 100min
pauseParsed = Date.parse('+' + newValue); pauseParsed = Date.parse('+' + newValue);
} }
// Calculate difference in minutes and save // Calculate difference in minutes and save
var pauseDuration = Math.round((pauseParsed - Date.parse('now'))/1000/60); var pauseDuration = Math.round((pauseParsed - Date.parse('now'))/1000/60);
$('#customPauseOutput').html('<span class="glyphicon glyphicon-pause"></span> ' +glitterTranslate.pauseFor + ' ' + pauseDuration + ' ' + glitterTranslate.minutes) $('#customPauseOutput').html('<span class="glyphicon glyphicon-pause"></span> ' +glitterTranslate.pauseFor + ' ' + pauseDuration + ' ' + glitterTranslate.minutes)
@ -488,7 +488,7 @@ function ViewModel() {
self.saveCustomPause = function() { self.saveCustomPause = function() {
// Get duration // Get duration
var pauseDuration = $('#customPauseOutput').data('time'); var pauseDuration = $('#customPauseOutput').data('time');
// If in the future // If in the future
if(pauseDuration > 0) { if(pauseDuration > 0) {
callAPI({ callAPI({
@ -508,7 +508,7 @@ function ViewModel() {
self.nrWarnings.subscribe(function(newValue) { self.nrWarnings.subscribe(function(newValue) {
// Really any change? // Really any change?
if(newValue == self.allWarnings().length) return; if(newValue == self.allWarnings().length) return;
// Get all warnings // Get all warnings
callAPI({ callAPI({
mode: 'warnings' mode: 'warnings'
@ -518,12 +518,12 @@ function ViewModel() {
if(response) { if(response) {
// Newest first // Newest first
response.warnings.reverse() response.warnings.reverse()
// Go over all warnings and add // Go over all warnings and add
$.each(response.warnings, function(index, warning) { $.each(response.warnings, function(index, warning) {
// Split warning into parts // Split warning into parts
var warningSplit = warning.split(/\n/); var warningSplit = warning.split(/\n/);
// Reformat CSS label and date // Reformat CSS label and date
var warningData = { var warningData = {
index: index, index: index,
@ -559,7 +559,7 @@ function ViewModel() {
self.speedLimit.subscribe(function(newValue) { self.speedLimit.subscribe(function(newValue) {
// Only on new load // Only on new load
if(!self.speedLimitInt()) return; if(!self.speedLimitInt()) return;
// Update // Update
if(self.speedLimitInt() != newValue) { if(self.speedLimitInt() != newValue) {
callAPI({ callAPI({
@ -586,7 +586,7 @@ function ViewModel() {
self.onQueueFinish.subscribe(function(newValue) { self.onQueueFinish.subscribe(function(newValue) {
// Ignore updates before the page is done // Ignore updates before the page is done
if(!self.hasStatusInfo()) return; if(!self.hasStatusInfo()) return;
// Something changes // Something changes
callAPI({ callAPI({
mode: 'queue', mode: 'queue',
@ -605,7 +605,7 @@ function ViewModel() {
self.refreshRate.subscribe(function(newValue) { self.refreshRate.subscribe(function(newValue) {
// Refresh now // Refresh now
self.refresh(); self.refresh();
// Save in config if global-settings // Save in config if global-settings
if(self.useGlobalOptions()) { if(self.useGlobalOptions()) {
callAPI({ callAPI({
@ -652,7 +652,7 @@ function ViewModel() {
return false; return false;
} }
// Add // Add
callAPI({ callAPI({
mode: "addurl", mode: "addurl",
name: $(form.nzbURL).val(), name: $(form.nzbURL).val(),
@ -692,7 +692,7 @@ function ViewModel() {
data.append("priority", $('#modal-add-nzb select[name="Priority"]').val() == '' ? -100 : $('#modal-add-nzb select[name="Priority"]').val()); // Default priority data.append("priority", $('#modal-add-nzb select[name="Priority"]').val() == '' ? -100 : $('#modal-add-nzb select[name="Priority"]').val()); // Default priority
data.append("pp", $('#modal-add-nzb select[name="Processing"]').val() == '' ? -1 : $('#modal-add-nzb select[name="Processing"]').val()); // Default post-processing options data.append("pp", $('#modal-add-nzb select[name="Processing"]').val() == '' ? -1 : $('#modal-add-nzb select[name="Processing"]').val()); // Default post-processing options
data.append("apikey", apiKey); data.append("apikey", apiKey);
// Add this one // Add this one
$.ajax({ $.ajax({
url: "./tapi", url: "./tapi",
@ -729,7 +729,7 @@ function ViewModel() {
self.hasStatusInfo(false) self.hasStatusInfo(false)
// Load the custom status info // Load the custom status info
callAPI({ mode: 'fullstatus', skip_dashboard: (!statusFullRefresh)*1 }).then(function(data) { callAPI({ mode: 'fullstatus', skip_dashboard: (!statusFullRefresh)*1 }).then(function(data) {
// Update basic // Update basic
self.statusInfo.loglevel(data.status.loglevel) self.statusInfo.loglevel(data.status.loglevel)
self.statusInfo.cache_art(data.status.cache_art) self.statusInfo.cache_art(data.status.cache_art)
@ -751,7 +751,7 @@ function ViewModel() {
// Loaded disk info // Loaded disk info
self.hasDiskStatusInfo(true) self.hasDiskStatusInfo(true)
} }
// Update the servers // Update the servers
if(self.statusInfo.servers().length == 0) { if(self.statusInfo.servers().length == 0) {
// Initial add // Initial add
@ -791,7 +791,7 @@ function ViewModel() {
// Add tooltips to possible new items // Add tooltips to possible new items
if(!isMobile) $('#modal-options [data-tooltip="true"]').tooltip({ trigger: 'hover', container: 'body' }) if(!isMobile) $('#modal-options [data-tooltip="true"]').tooltip({ trigger: 'hover', container: 'body' })
// Stop it spin // Stop it spin
self.hasStatusInfo(true) self.hasStatusInfo(true)
}); });
@ -900,7 +900,7 @@ function ViewModel() {
hideNotification(true) hideNotification(true)
self.loadStatusInfo(true, true) self.loadStatusInfo(true, true)
}) })
} }
} }
// Orphaned folder adding of all // Orphaned folder adding of all
@ -914,7 +914,7 @@ function ViewModel() {
hideNotification(true) hideNotification(true)
self.loadStatusInfo(true, true) self.loadStatusInfo(true, true)
}) })
} }
} }
// Toggle Glitter's compact layout dynamically // Toggle Glitter's compact layout dynamically
@ -996,7 +996,7 @@ function ViewModel() {
if(localStorageGetItem('displayTabbed') === 'true') { if(localStorageGetItem('displayTabbed') === 'true') {
$('body').addClass('container-tabbed') $('body').addClass('container-tabbed')
} }
// Get the speed-limit, refresh rate and server names // Get the speed-limit, refresh rate and server names
callAPI({ callAPI({
mode: 'get_config' mode: 'get_config'
@ -1006,21 +1006,21 @@ function ViewModel() {
// Set refreshrate (defaults to 1/s) // Set refreshrate (defaults to 1/s)
if(!response.config.misc.refresh_rate) response.config.misc.refresh_rate = 1; if(!response.config.misc.refresh_rate) response.config.misc.refresh_rate = 1;
self.refreshRate(response.config.misc.refresh_rate.toString()); self.refreshRate(response.config.misc.refresh_rate.toString());
// Set history limit // Set history limit
self.history.paginationLimit(response.config.misc.history_limit.toString()) self.history.paginationLimit(response.config.misc.history_limit.toString())
// Set queue limit // Set queue limit
self.queue.paginationLimit(response.config.misc.queue_limit.toString()) self.queue.paginationLimit(response.config.misc.queue_limit.toString())
} }
// Set bandwidth limit // Set bandwidth limit
if(!response.config.misc.bandwidth_max) response.config.misc.bandwidth_max = false; if(!response.config.misc.bandwidth_max) response.config.misc.bandwidth_max = false;
self.bandwithLimit(response.config.misc.bandwidth_max); self.bandwithLimit(response.config.misc.bandwidth_max);
// Save servers (for reporting functionality of OZnzb) // Save servers (for reporting functionality of OZnzb)
self.servers = response.config.servers; self.servers = response.config.servers;
// Update message // Update message
if(newRelease) { if(newRelease) {
self.allMessages.push({ self.allMessages.push({
@ -1049,7 +1049,7 @@ function ViewModel() {
type: glitterTranslate.status['INFO'], type: glitterTranslate.status['INFO'],
text: glitterTranslate.glitterTips + ' <a class="queue-update-sab" href="https://sabnzbd.org/wiki/extra/glitter-tips-and-tricks" target="_blank">Glitter Tips and Tricks <span class="glyphicon glyphicon-new-window"></span></a>', text: glitterTranslate.glitterTips + ' <a class="queue-update-sab" href="https://sabnzbd.org/wiki/extra/glitter-tips-and-tricks" target="_blank">Glitter Tips and Tricks <span class="glyphicon glyphicon-new-window"></span></a>',
css: 'info', css: 'info',
clear: function() { clear: function() {
// Update the config to not show again // Update the config to not show again
callAPI({ callAPI({
mode: 'set_config', mode: 'set_config',
@ -1072,11 +1072,11 @@ function ViewModel() {
setTimeout(self.loadStatusInfo, 200); setTimeout(self.loadStatusInfo, 200);
} }
// On any status load we check Orphaned folders // On any status load we check Orphaned folders
self.hasStatusInfo.subscribe(function(finishedLoading) { self.hasStatusInfo.subscribe(function(finishedLoading) {
// Loaded or just starting? // Loaded or just starting?
if(!finishedLoading) return; if(!finishedLoading) return;
// Orphaned folders? If user clicked away we check again in 5 days // Orphaned folders? If user clicked away we check again in 5 days
if(self.statusInfo.folders().length >= 3 && orphanMsg) { if(self.statusInfo.folders().length >= 3 && orphanMsg) {
// Check if not already there // Check if not already there
@ -1117,7 +1117,7 @@ function ViewModel() {
$('[name="general-date-format"] option').each(function() { $('[name="general-date-format"] option').each(function() {
$(this).text(displayDateTime('', $(this).val()), '') $(this).text(displayDateTime('', $(this).val()), '')
}) })
// Update the date every minute // Update the date every minute
setInterval(function() { setInterval(function() {
$('[data-timestamp]').each(function() { $('[data-timestamp]').each(function() {

84
interfaces/Glitter/templates/static/javascripts/glitter.queue.js

@ -10,7 +10,7 @@ function QueueListModel(parent) {
self.rawScriptList = []; self.rawScriptList = [];
// Because SABNZB returns the name // Because SABNZB returns the name
// But when you want to set Priority you need the number.. // But when you want to set Priority you need the number..
self.priorityName = []; self.priorityName = [];
self.priorityName["Force"] = 2; self.priorityName["Force"] = 2;
self.priorityName["High"] = 1; self.priorityName["High"] = 1;
@ -58,15 +58,15 @@ function QueueListModel(parent) {
self.dragging = false; self.dragging = false;
}, 500) }, 500)
} }
// Update slots from API data // Update slots from API data
self.updateFromData = function(data) { self.updateFromData = function(data) {
// Get all ID's // Get all ID's
var itemIds = $.map(self.queueItems(), function(i) { var itemIds = $.map(self.queueItems(), function(i) {
return i.id; return i.id;
}); });
// Did the category-list change? // Did the category-list change?
// Otherwise KO will send updates to all <select> for every refresh() // Otherwise KO will send updates to all <select> for every refresh()
if(self.rawCatList != data.categories.toString()) { if(self.rawCatList != data.categories.toString()) {
// Reformat categories // Reformat categories
@ -78,8 +78,8 @@ function QueueListModel(parent) {
// Update // Update
self.rawCatList = data.categories.toString(); self.rawCatList = data.categories.toString();
} }
// Did the script-list change? // Did the script-list change?
if(self.rawScriptList != data.scripts.toString()) { if(self.rawScriptList != data.scripts.toString()) {
// Reformat script-list // Reformat script-list
self.scriptsList($.map(data.scripts, function(script) { self.scriptsList($.map(data.scripts, function(script) {
@ -93,7 +93,7 @@ function QueueListModel(parent) {
// Set limit // Set limit
self.totalItems(data.noofslots); self.totalItems(data.noofslots);
// Container for new models // Container for new models
var newItems = []; var newItems = [];
@ -112,7 +112,7 @@ function QueueListModel(parent) {
newItems.push(new QueueModel(self, item)) newItems.push(new QueueModel(self, item))
} }
}); });
// Remove all items if there's any // Remove all items if there's any
if(itemIds.length == self.paginationLimit()) { if(itemIds.length == self.paginationLimit()) {
// Replace it, so only 1 Knockout DOM-update! // Replace it, so only 1 Knockout DOM-update!
@ -127,13 +127,13 @@ function QueueListModel(parent) {
})); }));
}); });
} }
// New items, then add! // New items, then add!
if(newItems.length > 0) { if(newItems.length > 0) {
ko.utils.arrayPushAll(self.queueItems, newItems); ko.utils.arrayPushAll(self.queueItems, newItems);
self.queueItems.valueHasMutated(); self.queueItems.valueHasMutated();
} }
// Sort every time (takes just few msec) // Sort every time (takes just few msec)
self.queueItems.sort(function(a, b) { self.queueItems.sort(function(a, b) {
return a.index() < b.index() ? -1 : 1; return a.index() < b.index() ? -1 : 1;
@ -142,9 +142,9 @@ function QueueListModel(parent) {
// Move in sortable // Move in sortable
self.move = function(event) { self.move = function(event) {
var itemMoved = event.item; var itemMoved = event.item;
// Up or down? // Up or down?
var corTerm = event.targetIndex > event.sourceIndex ? -1 : 1; var corTerm = event.targetIndex > event.sourceIndex ? -1 : 1;
// See what the actual index is of the queue-object // See what the actual index is of the queue-object
// This way we can see how we move up and down independent of pagination // This way we can see how we move up and down independent of pagination
var itemReplaced = self.queueItems()[event.targetIndex+corTerm]; var itemReplaced = self.queueItems()[event.targetIndex+corTerm];
@ -157,8 +157,8 @@ function QueueListModel(parent) {
}; };
// Save pagination state // Save pagination state
self.paginationLimit.subscribe(function(newValue) { self.paginationLimit.subscribe(function(newValue) {
// Save in config if global // Save in config if global
if(self.parent.useGlobalOptions()) { if(self.parent.useGlobalOptions()) {
callAPI({ callAPI({
mode: "set_config", mode: "set_config",
@ -168,12 +168,12 @@ function QueueListModel(parent) {
}) })
} }
}); });
// Do we show search box. So it doesn't dissapear when nothing is found // Do we show search box. So it doesn't dissapear when nothing is found
self.hasQueueSearch = ko.pureComputed(function() { self.hasQueueSearch = ko.pureComputed(function() {
return (self.pagination.hasPagination() || self.searchTerm()) return (self.pagination.hasPagination() || self.searchTerm())
}) })
// Searching in queue (rate-limited in decleration) // Searching in queue (rate-limited in decleration)
self.searchTerm.subscribe(function() { self.searchTerm.subscribe(function() {
// Refresh now // Refresh now
@ -183,7 +183,7 @@ function QueueListModel(parent) {
self.pagination.moveToPage(1); self.pagination.moveToPage(1);
} }
}) })
// Clear searchterm // Clear searchterm
self.clearSearchTerm = function(data, event) { self.clearSearchTerm = function(data, event) {
// Was it escape key or click? // Was it escape key or click?
@ -233,7 +233,7 @@ function QueueListModel(parent) {
dir = 'desc'; dir = 'desc';
break; break;
} }
// Show notification // Show notification
showNotification('.main-notification-box-sorting', 2000) showNotification('.main-notification-box-sorting', 2000)
@ -252,12 +252,12 @@ function QueueListModel(parent) {
self.isMultiEditing(!self.isMultiEditing()) self.isMultiEditing(!self.isMultiEditing())
// Form // Form
var $form = $('form.multioperations-selector') var $form = $('form.multioperations-selector')
// Reset form and remove all checked ones // Reset form and remove all checked ones
$form[0].reset(); $form[0].reset();
self.multiEditItems.removeAll(); self.multiEditItems.removeAll();
$('.delete input[name="multiedit"], #multiedit-checkall').prop({'checked': false, 'indeterminate': false}) $('.delete input[name="multiedit"], #multiedit-checkall').prop({'checked': false, 'indeterminate': false})
// Is the multi-edit in view? // Is the multi-edit in view?
if(($form.offset().top + $form.outerHeight(true)) > ($(window).scrollTop()+$(window).height())) { if(($form.offset().top + $form.outerHeight(true)) > ($(window).scrollTop()+$(window).height())) {
// Scroll to form // Scroll to form
@ -281,24 +281,24 @@ function QueueListModel(parent) {
// Update them all // Update them all
self.doMultiEditUpdate(); self.doMultiEditUpdate();
} else { } else {
// Go over them all to know which one to remove // Go over them all to know which one to remove
self.multiEditItems.remove(function(inList) { return inList.id == item.id; }) self.multiEditItems.remove(function(inList) { return inList.id == item.id; })
} }
// Update check-all buton state // Update check-all buton state
setCheckAllState('#multiedit-checkall', '.queue-table input[name="multiedit"]') setCheckAllState('#multiedit-checkall', '.queue-table input[name="multiedit"]')
return true; return true;
} }
// Check all // Check all
self.checkAllJobs = function(item, event) { self.checkAllJobs = function(item, event) {
// Get which ones we care about // Get which ones we care about
var allChecks = $('.queue-table input[name="multiedit"]').filter(':not(:disabled):visible'); var allChecks = $('.queue-table input[name="multiedit"]').filter(':not(:disabled):visible');
// We need to re-evaltuate the state of this check-all // We need to re-evaltuate the state of this check-all
// Otherwise the 'inderterminate' will be overwritten by the click event! // Otherwise the 'inderterminate' will be overwritten by the click event!
setCheckAllState('#multiedit-checkall', '.queue-table input[name="multiedit"]') setCheckAllState('#multiedit-checkall', '.queue-table input[name="multiedit"]')
// Now we can check what happend // Now we can check what happend
// For when some are checked, or all are checked (but not partly) // For when some are checked, or all are checked (but not partly)
if(event.target.indeterminate || (event.target.checked && !event.target.indeterminate)) { if(event.target.indeterminate || (event.target.checked && !event.target.indeterminate)) {
@ -312,7 +312,7 @@ function QueueListModel(parent) {
} else { } else {
// Remove them seperate // Remove them seperate
allActive.each(function() { allActive.each(function() {
// Go over them all to know which one to remove // Go over them all to know which one to remove
var item = ko.dataFor(this) var item = ko.dataFor(this)
self.multiEditItems.remove(function(inList) { return inList.id == item.id; }) self.multiEditItems.remove(function(inList) { return inList.id == item.id; })
// Remove the check of this one // Remove the check of this one
@ -324,7 +324,7 @@ function QueueListModel(parent) {
allChecks.prop('checked', true) allChecks.prop('checked', true)
allChecks.each(function() { self.multiEditItems.push(ko.dataFor(this)) }) allChecks.each(function() { self.multiEditItems.push(ko.dataFor(this)) })
event.target.checked = true event.target.checked = true
// Now we fire the update // Now we fire the update
self.doMultiEditUpdate() self.doMultiEditUpdate()
} }
@ -337,7 +337,7 @@ function QueueListModel(parent) {
self.doMultiEditUpdate = function() { self.doMultiEditUpdate = function() {
// Anything selected? // Anything selected?
if(self.multiEditItems().length < 1) return; if(self.multiEditItems().length < 1) return;
// Retrieve the current settings // Retrieve the current settings
var newCat = $('.multioperations-selector select[name="Category"]').val() var newCat = $('.multioperations-selector select[name="Category"]').val()
var newScript = $('.multioperations-selector select[name="Post-processing"]').val() var newScript = $('.multioperations-selector select[name="Post-processing"]').val()
@ -400,7 +400,7 @@ function QueueListModel(parent) {
self.doMultiDelete = function() { self.doMultiDelete = function() {
// Anything selected? // Anything selected?
if(self.multiEditItems().length < 1) return; if(self.multiEditItems().length < 1) return;
// Need confirm // Need confirm
if(!self.parent.confirmDeleteQueue() || confirm(glitterTranslate.removeDown)) { if(!self.parent.confirmDeleteQueue() || confirm(glitterTranslate.removeDown)) {
// List all the ID's // List all the ID's
@ -440,7 +440,7 @@ function QueueListModel(parent) {
$.each(self.multiEditItems(), function(index) { $.each(self.multiEditItems(), function(index) {
$('#multiedit_' + this.id).prop('checked', true); $('#multiedit_' + this.id).prop('checked', true);
}) })
// Update check-all buton state // Update check-all buton state
setCheckAllState('#multiedit-checkall', '.queue-table input[name="multiedit"]') setCheckAllState('#multiedit-checkall', '.queue-table input[name="multiedit"]')
}, 100) }, 100)
@ -471,14 +471,14 @@ function QueueModel(parent, data) {
self.unpackopts = ko.observable(parseInt(data.unpackopts)) // UnpackOpts fails if not parseInt'd! self.unpackopts = ko.observable(parseInt(data.unpackopts)) // UnpackOpts fails if not parseInt'd!
self.pausedStatus = ko.observable(data.status == 'Paused'); self.pausedStatus = ko.observable(data.status == 'Paused');
self.timeLeft = ko.observable(data.timeleft); self.timeLeft = ko.observable(data.timeleft);
// Initially empty // Initially empty
self.nameForEdit = ko.observable(); self.nameForEdit = ko.observable();
self.editingName = ko.observable(false); self.editingName = ko.observable(false);
self.hasDropdown = ko.observable(false); self.hasDropdown = ko.observable(false);
self.rating_avg_video = ko.observable(false) self.rating_avg_video = ko.observable(false)
self.rating_avg_audio = ko.observable(false) self.rating_avg_audio = ko.observable(false)
// Color of the progress bar // Color of the progress bar
self.progressColor = ko.computed(function() { self.progressColor = ko.computed(function() {
// Checking // Checking
@ -496,7 +496,7 @@ function QueueModel(parent, data) {
// Nothing // Nothing
return ''; return '';
}); });
// MB's and percentages // MB's and percentages
self.downloadedMB = ko.computed(function() { self.downloadedMB = ko.computed(function() {
return(self.totalMB() - self.remainingMB()).toFixed(0); return(self.totalMB() - self.remainingMB()).toFixed(0);
@ -507,7 +507,7 @@ function QueueModel(parent, data) {
self.progressText = ko.pureComputed(function() { self.progressText = ko.pureComputed(function() {
return self.downloadedMB() + " MB / " + (self.totalMB() * 1).toFixed(0) + " MB"; return self.downloadedMB() + " MB / " + (self.totalMB() * 1).toFixed(0) + " MB";
}) })
// Texts // Texts
self.missingText= ko.pureComputed(function() { self.missingText= ko.pureComputed(function() {
// Check for missing data, the value is arbitrary! // Check for missing data, the value is arbitrary!
@ -528,15 +528,15 @@ function QueueModel(parent, data) {
// Just the time // Just the time
return rewriteTime(self.timeLeft()); return rewriteTime(self.timeLeft());
}); });
// Extra queue column // Extra queue column
self.extraText = ko.pureComputed(function() { self.extraText = ko.pureComputed(function() {
// Picked anything? // Picked anything?
switch(self.parent.parent.extraQueueColumn()) { switch(self.parent.parent.extraQueueColumn()) {
case 'category': case 'category':
// Exception for * // Exception for *
if(self.category() == "*") if(self.category() == "*")
return glitterTranslate.defaultText return glitterTranslate.defaultText
return self.category(); return self.category();
case 'priority': case 'priority':
// Onload-exception // Onload-exception
@ -593,11 +593,11 @@ function QueueModel(parent, data) {
self.editName = function(data, event) { self.editName = function(data, event) {
// Not when still grabbing // Not when still grabbing
if(self.isGrabbing()) return false; if(self.isGrabbing()) return false;
// Change status and fill // Change status and fill
self.editingName(true) self.editingName(true)
self.nameForEdit(self.name()) self.nameForEdit(self.name())
// Select // Select
$(event.target).parents('.name').find('input').select() $(event.target).parents('.name').find('input').select()
} }
@ -617,7 +617,7 @@ function QueueModel(parent, data) {
mode: 'queue', mode: 'queue',
name: 'rename', name: 'rename',
value: self.id, value: self.id,
value2: newName value2: newName
}).then(self.parent.parent.refresh) }).then(self.parent.parent.refresh)
}) })
@ -628,7 +628,7 @@ function QueueModel(parent, data) {
// Trigger update // Trigger update
parent.parent.filelist.loadFiles(self) parent.parent.filelist.loadFiles(self)
} }
// Toggle calculation of dropdown // Toggle calculation of dropdown
// Turns out that the <select> in the dropdown are a hugggeeee slowdown on initial load! // Turns out that the <select> in the dropdown are a hugggeeee slowdown on initial load!
// Only loading on click cuts half the speed (especially on large queues) // Only loading on click cuts half the speed (especially on large queues)
@ -689,7 +689,7 @@ function QueueModel(parent, data) {
// Show notification // Show notification
showNotification('.main-notification-box-removing') showNotification('.main-notification-box-removing')
callAPI({ callAPI({
mode: 'queue', mode: 'queue',
name: 'delete', name: 'delete',

6
interfaces/Glitter/templates/static/javascripts/knockout-extensions.js

@ -37,7 +37,7 @@ ko.bindingHandlers.longText = {
if(allBindingsAccessor.get('longTextType') != "Script") { if(allBindingsAccessor.get('longTextType') != "Script") {
value = value.map(convertHTMLtoText) value = value.map(convertHTMLtoText)
} }
// Any <br>'s? // Any <br>'s?
var outputText = ''; var outputText = '';
if(value.length > 4) { if(value.length > 4) {
@ -69,7 +69,7 @@ ko.bindingHandlers.filedrop = {
return; return;
} }
// EDITED to prevent drag-and-drop from inside own screen // EDITED to prevent drag-and-drop from inside own screen
$(element).bind("dragstart", function(e) { $(element).bind("dragstart", function(e) {
$(element).data('internal-drag', true) $(element).data('internal-drag', true)
// Remove after timeout // Remove after timeout
setTimeout(function() { setTimeout(function() {
@ -110,7 +110,7 @@ $(document).bind('dragover', function(e) {
/*! Knockout Persist - v0.1.0 - 2015-12-28 /*! Knockout Persist - v0.1.0 - 2015-12-28
* https://github.com/spoike/knockout.persist * https://github.com/spoike/knockout.persist
* Copyright (c) 2013 Mikael Brassman; Licensed MIT * Copyright (c) 2013 Mikael Brassman; Licensed MIT
* Safihre edited to better detect if localStorage is possible */ * Safihre edited to better detect if localStorage is possible */
(function(ko) { (function(ko) {
// Don't crash on browsers that are missing localStorage // Don't crash on browsers that are missing localStorage

28
interfaces/Glitter/templates/static/stylesheets/colorschemes/Night.css

@ -25,19 +25,19 @@ a, a:active, a:hover, a:focus,
.hover-button.glyphicon-play, .hover-button.glyphicon-play,
.hover-button.glyphicon-stop, .hover-button.glyphicon-stop,
.dropdown-menu>li>a, .dropdown-menu>li>a,
legend, legend,
#modal-options legend label, #modal-options legend label,
#modal-options legend a, #modal-options legend a,
#modal-item-files .item-files-table .progress small, #modal-item-files .item-files-table .progress small,
#modal-options .options-switch label, #modal-options .options-switch label,
#modal-options #options-orphans .process-all-orphaned, #modal-options #options-orphans .process-all-orphaned,
.text-muted { .text-muted {
color: #EBEBEB; color: #EBEBEB;
} }
.dropdown-menu>li>a:hover, .dropdown-menu>li>a:hover,
.dropdown-menu>li>a:focus, .dropdown-menu>li>a:focus,
.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover, .navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover,
.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus, .navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,
#feedback-slider { #feedback-slider {
background-color: #555555; background-color: #555555;
@ -85,8 +85,8 @@ legend,
color: black; color: black;
} }
.nav-tabs>li.active>a, .nav-tabs>li.active>a,
.nav-tabs>li.active>a:focus, .nav-tabs>li.active>a:focus,
.nav-tabs>li.active>a:hover, .nav-tabs>li.active>a:hover,
.nav-tabs>li>a:hover { .nav-tabs>li>a:hover {
background-color: #ddd; background-color: #ddd;
@ -182,7 +182,7 @@ pre {
opacity: 1 !important; opacity: 1 !important;
} }
legend, legend,
hr { hr {
border-color: #C6C6C6 !important; border-color: #C6C6C6 !important;
} }
@ -207,8 +207,8 @@ hr {
margin-bottom: 1px; margin-bottom: 1px;
} }
.queue-item .dropdown-menu:after, .queue-item .dropdown-menu:after,
.history-item .dropdown-menu:after, .history-item .dropdown-menu:after,
.info-container-box-sorting .dropdown-menu:after { .info-container-box-sorting .dropdown-menu:after {
border-bottom-color: #666; border-bottom-color: #666;
} }
@ -223,11 +223,11 @@ hr {
color: #EBEBEB !important; color: #EBEBEB !important;
} }
::-moz-placeholder { ::-moz-placeholder {
color: #EBEBEB !important; color: #EBEBEB !important;
opacity: 1 !important; opacity: 1 !important;
} }
:-ms-input-placeholder { :-ms-input-placeholder {
color: #EBEBEB !important; color: #EBEBEB !important;
} }

52
interfaces/Glitter/templates/static/stylesheets/glitter.css

@ -238,8 +238,8 @@ li.dropdown {
fill: transparent; fill: transparent;
} }
.rss-symbol { .rss-symbol {
stroke: none; stroke: none;
fill: white; fill: white;
} }
@ -1508,7 +1508,7 @@ tr.queue-item>td:first-child>a {
max-width: 100px; max-width: 100px;
} }
.btn-file, .btn-file,
input[name="nzbURL"] { input[name="nzbURL"] {
transition : border 500ms ease-out; transition : border 500ms ease-out;
} }
@ -1768,16 +1768,16 @@ input[name="nzbURL"] {
margin-top: 0.5em; margin-top: 0.5em;
} }
.container-compact .pagination>li>a, .container-compact .pagination>li>a,
.container-compact .pagination>li>span, .container-compact .pagination>li>span,
.container-compact #history-options .hover-button { .container-compact #history-options .hover-button {
padding: 4px 10px; padding: 4px 10px;
} }
.container-compact .info-container, .container-compact .info-container,
.container-compact .progress>span, .container-compact .progress>span,
.container-compact .progress-bar>span, .container-compact .progress-bar>span,
.container-compact .progress strong, .container-compact .progress strong,
.container-compact .progress i { .container-compact .progress i {
font-size: 12px; font-size: 12px;
} }
@ -1798,12 +1798,12 @@ input[name="nzbURL"] {
.history-table .table-extra-header-visible { .history-table .table-extra-header-visible {
width: 10%; width: 10%;
} }
.queue-table .table-header-progress-smaller, .queue-table .table-header-progress-smaller,
.history-table .table-header-progress-smaller { .history-table .table-header-progress-smaller {
width: 35%; width: 35%;
} }
#options-interface .label { #options-interface .label {
display: none; display: none;
} }
@ -1815,11 +1815,11 @@ input[name="nzbURL"] {
margin-right: -5px; margin-right: -5px;
display: block; display: block;
} }
td.name .row-wrap-text { td.name .row-wrap-text {
margin-right: 4px; margin-right: 4px;
} }
/* Need to reduce sparkline width when RSS button is added */ /* Need to reduce sparkline width when RSS button is added */
.navbar-have-rss .sparkline-container svg { .navbar-have-rss .sparkline-container svg {
width: 220px !important; width: 220px !important;
@ -1852,8 +1852,8 @@ input[name="nzbURL"] {
.queue .multioperations-selector { .queue .multioperations-selector {
min-width: 715px; min-width: 715px;
} }
.queue .sortable-placeholder td { .queue .sortable-placeholder td {
padding: 9px 0px 8px !important; padding: 9px 0px 8px !important;
} }
@ -1868,7 +1868,7 @@ input[name="nzbURL"] {
#modal-retry-job .modal-dialog { #modal-retry-job .modal-dialog {
margin-top: 80px; margin-top: 80px;
} }
#history-script-log .modal-dialog { #history-script-log .modal-dialog {
margin-top: 30px; margin-top: 30px;
} }
@ -1891,11 +1891,11 @@ input[name="nzbURL"] {
.history-table .table-status-header { .history-table .table-status-header {
width: 25% !important; width: 25% !important;
} }
#feedback-slider { #feedback-slider {
display: none; display: none;
} }
.glyphicon-facetime-video { .glyphicon-facetime-video {
top: 2px; top: 2px;
} }
@ -1933,33 +1933,33 @@ input[name="nzbURL"] {
animation: none !important; animation: none !important;
transition: none !important; transition: none !important;
} }
@keyframes stretchdelay { @keyframes stretchdelay {
0%, 60% { 0%, 60% {
transform: scaleY(0.4); transform: scaleY(0.4);
} }
61%, 100% { 61%, 100% {
transform: scaleY(1.0); transform: scaleY(1.0);
} }
} }
.processing-download > div { .processing-download > div {
animation: stretchdelay 2s infinite linear; animation: stretchdelay 2s infinite linear;
} }
.processing-download .loader-bar-two { .processing-download .loader-bar-two {
animation-delay: 0.2s; animation-delay: 0.2s;
} }
.processing-download .loader-bar-three { .processing-download .loader-bar-three {
animation-delay: 0.4s; animation-delay: 0.4s;
} }
.processing-download .loader-bar-four { .processing-download .loader-bar-four {
animation-delay: 0.6s; animation-delay: 0.6s;
} }
.queue-table td.name input { .queue-table td.name input {
margin-left: -2px; margin-left: -2px;
} }
@ -2016,11 +2016,11 @@ a:focus {
visibility: hidden; visibility: hidden;
opacity: 0; opacity: 0;
transform-origin: top; transform-origin: top;
animation-fill-mode: forwards; animation-fill-mode: forwards;
transform: scale(1, 0.8); transform: scale(1, 0.8);
transition: all 0.15s ease; transition: all 0.15s ease;
-webkit-transform-origin: top; -webkit-transform-origin: top;
-webkit-animation-fill-mode: forwards; -webkit-animation-fill-mode: forwards;
-webkit-transform: scale(1, 0.8); -webkit-transform: scale(1, 0.8);
} }
@ -2098,7 +2098,7 @@ legend {
opacity: 0.7; opacity: 0.7;
} }
.nav-tabs>li.active>a, .nav-tabs>li.active>a,
.nav-tabs>li.active>a:hover { .nav-tabs>li.active>a:hover {
box-shadow: 0px -1px 1px 0px rgba(0,0,0,0.08); box-shadow: 0px -1px 1px 0px rgba(0,0,0,0.08);
color: black; color: black;
@ -2126,7 +2126,7 @@ legend {
border: 1px solid #8F8F8F; border: 1px solid #8F8F8F;
} }
.pagination>li>a, .pagination>li>a,
.pagination>li>span, .pagination>li>span,
.pagination>li>span:hover { .pagination>li>span:hover {
color: #333; color: #333;

2
interfaces/Glitter/templates/static/stylesheets/glitter.mobile.css

@ -223,7 +223,7 @@ tr.queue-item>td:first-child>a {
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
.modal-dialog .modal-content { .modal-dialog .modal-content {
border-left: 0; border-left: 0;
border-right: 0; border-right: 0;

6
interfaces/wizard/one.html

@ -12,9 +12,9 @@
</script> </script>
<h3>$T('wizard-server')</h3> <h3>$T('wizard-server')</h3>
$T('wizard-explain-server')<br /> $T('wizard-explain-server')<br />
<br /><br /> <br /><br />
<div class="row"> <div class="row">
<div class="col-md-7 form-horizontal"> <div class="col-md-7 form-horizontal">
<div class="form-group"> <div class="form-group">
@ -75,7 +75,7 @@
<div id="serverQuote" class="btn btn-default disabled"><span id="serverResponse">$T('wizard-server-text')</span></div> <div id="serverQuote" class="btn btn-default disabled"><span id="serverResponse">$T('wizard-server-text')</span></div>
</div> </div>
</div> </div>
</div> </div>
<div class="col-md-5"> <div class="col-md-5">
<div class="clearfix"></div> <div class="clearfix"></div>

14
interfaces/wizard/static/javascript/checkserver.js

@ -11,7 +11,7 @@ function checkRequired() {
$(document).ready(function() { $(document).ready(function() {
// Add tooltips // Add tooltips
$('[data-toggle="tooltip"]').tooltip() $('[data-toggle="tooltip"]').tooltip()
// On form-submit // On form-submit
$("#serverTest").click(function() { $("#serverTest").click(function() {
$('#serverResponse').html(txtChecking); $('#serverResponse').html(txtChecking);
@ -24,7 +24,7 @@ $(document).ready(function() {
} else { } else {
r = '<span class="failed"><span class="glyphicon glyphicon-minus-sign"></span> ' + result.value.message + '</span>'; r = '<span class="failed"><span class="glyphicon glyphicon-minus-sign"></span> ' + result.value.message + '</span>';
} }
$('#serverResponse').html(r); $('#serverResponse').html(r);
} }
); );
@ -52,7 +52,7 @@ $(document).ready(function() {
} }
checkRequired(); checkRequired();
}); });
$('#ssl').click(function() { $('#ssl').click(function() {
if(this.checked) { if(this.checked) {
// Enabled SSL change port when not already a custom port // Enabled SSL change port when not already a custom port
@ -66,13 +66,13 @@ $(document).ready(function() {
} }
} }
}) })
checkRequired() checkRequired()
$('form').submit(function(event) { $('form').submit(function(event) {
// Double check // Double check
if(!checkRequired()) { if(!checkRequired()) {
event.preventDefault(); event.preventDefault();
} }
}) })
}); });

6
interfaces/wizard/static/style.css

@ -196,9 +196,9 @@ label {
* { * {
border-radius: 0 !important; border-radius: 0 !important;
} }
#content a, #content a,
#content a:hover, #content a:hover,
#content a:active, #content a:active,
#content a:visited { #content a:visited {
color: #555; color: #555;
} }

2
sabnzbd/postproc.py

@ -503,7 +503,7 @@ def process_job(nzo):
script_ret = '' script_ret = ''
if len(script_log.rstrip().split('\n')) > 1: if len(script_log.rstrip().split('\n')) > 1:
nzo.set_unpack_info('Script', nzo.set_unpack_info('Script',
u'%s%s <a href="./scriptlog?name=%s">(%s)</a>' % (script_ret, xml.sax.saxutils.escape(script_line), u'%s%s <a href="./scriptlog?name=%s">(%s)</a>' % (script_ret, xml.sax.saxutils.escape(script_line),
xml.sax.saxutils.escape(script_output), T('More')), unique=True) xml.sax.saxutils.escape(script_output), T('More')), unique=True)
else: else:
# No '(more)' button needed # No '(more)' button needed

Loading…
Cancel
Save