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
Bootstrap v3.3.6 (http://getbootstrap.com)
* Licensed under the MIT license
* Licensed under the MIT license
Changed by Safihre, Nov 2015
We include the icon-file directly into the CSS,
this way we avoid errors when HTTPS is enabled

2
interfaces/Config/templates/_inc_footer_uc.tmpl

@ -1,6 +1,6 @@
<!-- Content end -->
<div class="clearfix"></div>
<!-- Filebrowser modal -->
<div class="modal fade" id="filebrowser_modal">
<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 == "RSS" then $T('cmenu-rss') else ""#
</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<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="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="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="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="shortcut icon" href="${root}staticcfg/ico/favicon.ico?v=1.1.0" />
@ -39,12 +39,12 @@
// Keeping track of the form state
var formHasChanged = false;
var formWasSubmitted = false;
// Information we need
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 '/'#'
// Translations
var configTranslate = new Object();
configTranslate.browseText = "$T('browse-folder')";

6
interfaces/Config/templates/config.tmpl

@ -34,7 +34,7 @@
<tr>
<th scope="row">OpenSSL:</th>
<td>
<!--#if $have_ssl#-->
<!--#if $have_ssl#-->
$ssl_version &nbsp; [$ssl_protocols]
<!--#else#-->
<span class="label label-danger">$T('notAvailable')</span>
@ -42,7 +42,7 @@
<!--#end if#-->
</td>
</tr>
<!--#if not $have_ssl_context#-->
<!--#if not $have_ssl_context#-->
<tr>
<th scope="row"></th>
<td>
@ -53,7 +53,7 @@
<tr>
<th scope="row">yEnc:</th>
<td>
<!--#if $have_yenc#-->
<!--#if $have_yenc#-->
<span class="glyphicon glyphicon-ok"></span>
<!--#else#-->
<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>
<p> $T('explain-catTags') $T('explain-catTags2')<br/> </p>
<h5 class="darkred"><strong>$T('explain-relFolder'):</strong> <span class="path">$defdir</span></h5>
<!--#set $odd = False#-->
<!--#set $cur = 0#-->
<!--#for $slot in $slotinfo#-->
@ -72,10 +72,10 @@
</td>
<!--#end if#-->
<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>
<input type="text" name="newzbin" value="$slot.newzbin" size="20" />
<input type="text" name="newzbin" value="$slot.newzbin" size="20" />
</td>
<td class="nowrap">
<button class="btn btn-default">
@ -100,7 +100,7 @@
var theForm = \$(this).closest("form");
theForm.attr("action", "delete").submit();
});
// Add autocomplete and file-browser
\$('.fileBrowserSmall').typeahead().fileBrowser();
});

2
interfaces/Config/templates/config_folders.tmpl

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

10
interfaces/Config/templates/config_general.tmpl

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

4
interfaces/Config/templates/config_notify.tmpl

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

44
interfaces/Config/templates/config_rss.tmpl

@ -4,7 +4,7 @@
<div class="colmask">
<!--#if not $active_feed#-->
<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>
<p>$T('explain-RSS')</p>
<form action="add_rss_feed" method="post" autocomplete="off" novalidate>
@ -47,11 +47,11 @@
<!--#set $odd = not $odd#-->
<tr class="data-row <!--#if $odd then " alt " else " "#-->">
<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 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'#-->">
<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>
</td>
<td class="controls">
@ -89,9 +89,9 @@
<div class="field-pair">
<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" />
<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="desc narrow">$T('explain-rss_rate')</span>
<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="desc narrow">$T('explain-rss_rate')</span>
</div>
</fieldset>
</div>
@ -105,7 +105,7 @@
<div class="padTable">
<a class="main-helplink" href="$helpuri$help_uri" target="_blank"><span class="glyphicon glyphicon-question-sign"></span></a>
<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>
</h2>
<!--#if $error#-->
@ -140,10 +140,10 @@
<tbody>
<tr class="default">
<td>
<input type="checkbox" disabled="disabled" class="hidden" />
<input type="checkbox" disabled="disabled" class="hidden" />
</td>
<td>
<input type="text" disabled="disabled" size="1" class="hidden" />
<input type="text" disabled="disabled" size="1" class="hidden" />
</td>
<td>
<select name="filter_type" disabled="disabled" class="hidden">
@ -157,7 +157,7 @@
</select>
</td>
<td>
<input type="text" disabled="disabled" value="" class="hidden" />
<input type="text" disabled="disabled" value="" class="hidden" />
</td>
<!--#if $rss[$feed]['pick_cat']#-->
<td>
@ -212,10 +212,10 @@
<tbody>
<tr>
<td>
<input type="checkbox" name="enabled" value="1" checked="checked" />
<input type="checkbox" name="enabled" value="1" checked="checked" />
</td>
<td>
<input type="text" name="new_index" size="1" />
<input type="text" name="new_index" size="1" />
</td>
<td>
<select name="filter_type">
@ -229,7 +229,7 @@
</select>
</td>
<td>
<input type="text" name="filter_text" value="" />
<input type="text" name="filter_text" value="" />
</td>
<!--#if $rss[$feed]['pick_cat']#-->
<td>
@ -287,10 +287,10 @@
<tbody>
<tr class="<!--#if $odd then " alt " else " "#-->">
<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>
<input type="text" name="new_index" value="$fnum" size="1" />
<input type="text" name="new_index" value="$fnum" size="1" />
</td>
<td>
<select name="filter_type">
@ -304,7 +304,7 @@
</select>
</td>
<td>
<input type="text" name="filter_text" value="$filter[4]" />
<input type="text" name="filter_text" value="$filter[4]" />
</td>
<!--#if $rss[$feed]['pick_cat']#-->
<td>
@ -468,7 +468,7 @@
</div>
<!--#end if#-->
</div>
</div>
<!-- /colmask -->
@ -490,7 +490,7 @@ function urlencode(str) {
\$(theContainer).append('<span class="glyphicon glyphicon-list"></span>')
}
})
\$('.tabs a').click(function (e) {
e.preventDefault()
\$(this).tab('show')
@ -525,7 +525,7 @@ function urlencode(str) {
}).done(function( msg ) {
// Let us leave!
formWasSubmitted = true;
formHasChanged = false;
formHasChanged = false;
location.reload();
});
}
@ -541,7 +541,7 @@ function urlencode(str) {
}).done(function( msg ) {
// Let us leave!
formWasSubmitted = true;
formHasChanged = false;
formHasChanged = false;
location = '?feed=' + urlencode(whichFeed);
});
});
@ -555,7 +555,7 @@ function urlencode(str) {
}).done(function() {
// Let us leave!
formWasSubmitted = true;
formHasChanged = false;
formHasChanged = false;
location.reload();
});
});
@ -564,7 +564,7 @@ function urlencode(str) {
var theForm = \$(this).closest("form");
theForm.attr("action", "clean_rss_jobs").submit();
});
\$('.delFilter').click(function(){
var theForm = \$(this).closest("form");
theForm.attr("action", "del_rss_filter").submit();

4
interfaces/Config/templates/config_scheduling.tmpl

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

30
interfaces/Config/templates/config_sorting.tmpl

@ -9,7 +9,7 @@
<div class="section">
<div class="col2">
<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/>
<select name="tv_cat" multiple="multiple" class="multiple_cats">
<!--#for $ct in $cat_list#-->
@ -22,11 +22,11 @@
<div class="col1">
<fieldset>
<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 class="field-pair">
<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 class="field-pair">
<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')" />
<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/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 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>
</div>
<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 class="field-pair">
@ -162,7 +162,7 @@
<div class="section">
<div class="col2">
<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/>
<select name="movie_cat" multiple="multiple" class="multiple_cats">
<!--#for $ct in $cat_list#-->
@ -175,7 +175,7 @@
<div class="col1">
<fieldset>
<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 class="field-pair">
<label class="config wide" for="enable_movie_sorting">$T('opt-movieSort')</label>
@ -183,7 +183,7 @@
</div>
<div class="field-pair">
<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 class="field-pair">
<label class="config" for="moviefoldername">$T('sortString')</label>
@ -198,7 +198,7 @@
<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).%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 id="previewmovie" class="example">
@ -313,11 +313,11 @@
<div class="col1">
<fieldset>
<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 class="field-pair">
<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 class="field-pair">
<label class="config" for="datefoldername">$T('sortString')</label>
@ -328,7 +328,7 @@
<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('%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 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>
</div>
<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 class="field-pair">
@ -519,12 +519,12 @@
else
\$('#previewdate').hide();
}
\$(document).ready(function(){
new_previewtv();
new_previewmovie();
new_previewdate();
\$('#tvfoldername, #tvsamplename').bind("keyup focus", new_previewtv);
\$('#moviefoldername, #movieextra, #moviesamplename').bind("keyup focus", new_previewmovie);
\$('#datefoldername, #datesamplename').bind("keyup focus", new_previewdate);

2
interfaces/Config/templates/config_special.tmpl

@ -17,7 +17,7 @@
<!--#for $option in $switches#-->
<div class="field-pair">
<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 ''#-->
</label>
<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 ""#--> />
<span class="desc">$T('explain-max_art_opt')</span>
</div>
<div class="field-pair">
<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 ""#--> />
@ -228,7 +228,7 @@
<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>
</div>
<div class="field-pair">
<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 ""#--> />
@ -386,7 +386,7 @@
<p>
<label for="rating_filter_abort_video">$T('opt-rating_filter_video')</label>
<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#-->
</select>
</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 ""#--> />
<label for="rating_filter_abort_encrypted_confirm">$T('opt-rating_filter_confirmed')</label>
</span>
</p>
</p>
<p>
<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 ""#--> />
@ -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 ""#--> />
<label for="rating_filter_abort_spam_confirm">$T('opt-rating_filter_confirmed')</label>
</span>
</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 ""#--> />
<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 ""#--> />
<label for="rating_filter_pause_encrypted_confirm">$T('opt-rating_filter_confirmed')</label>
</span>
</p>
</p>
<p>
<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 ""#--> />
@ -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 ""#--> />
<label for="rating_filter_pause_spam_confirm">$T('opt-rating_filter_confirmed')</label>
</span>
</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 ""#--> />
<label for="rating_filter_pause_downvoted">$T('opt-rating_filter_downvoted')</label>
@ -488,16 +488,16 @@
<script type="text/javascript">
\$(document).ready(function() {
if (!\$('#rating_filter_enable').is(":checked")) {
\$("#rating_filter_abort").hide();
\$("#rating_filter_pause").hide();
\$("#rating_filter_abort").hide();
\$("#rating_filter_pause").hide();
}
\$('#rating_filter_enable').change(function () {
if (\$(this).is(":checked")) {
\$("#rating_filter_abort").show();
\$("#rating_filter_pause").show();
}
\$("#rating_filter_abort").show();
\$("#rating_filter_pause").show();
}
else {
\$("#rating_filter_abort").hide();
\$("#rating_filter_abort").hide();
\$("#rating_filter_pause").hide();
}
});

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

@ -1,19 +1,19 @@
<html lang="$active_lang">
<head>
<title>SABnzbd</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<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="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="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="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" />
<script type="text/javascript" src="../staticcfg/js/jquery-1.11.2.min.js"></script>
@ -32,10 +32,10 @@
<!--#if $error#-->
<div class="alert alert-danger" role="alert">$error</div>
<!--#end if#-->
<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>
<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')">

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

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

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

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

4
interfaces/Glitter/templates/include_queue.tmpl

@ -203,14 +203,14 @@
</div>
<div class="clearfix"></div>
</form>
<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 }" />
<a data-bind="event: { mousedown: queue.clearSearchTerm }">
<span class="glyphicon" data-bind="css: { 'glyphicon-search' : !queue.searchTerm(), 'glyphicon-remove' : queue.searchTerm() }"></span>
</a>
</div>
<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">
<span data-bind="text: page"></span>

10
interfaces/Glitter/templates/main.tmpl

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

12
interfaces/Glitter/templates/queue.tmpl

@ -1,35 +1,35 @@
<!--#if $paused#-->
<!--#if $pause_int != '0' #-->
<!--#from math import floor#-->
<!--#set pauseSplit = $pause_int.split(':')#-->
<!--#set seconds = int(pauseSplit[0]) * 60 + int(pauseSplit[1])#-->
<!--#set hours = floor(seconds/3600)#-->
<!--#set minutes = floor((seconds - hours * 3600) / 60)#-->
<!--#set seconds = seconds - minutes * 60 - hours * 3600#-->
<!--#if seconds < 10 #-->
<!--#set seconds = '0' + str(int(seconds)) #-->
<!--#else#-->
<!--#set seconds = str(int(seconds)) #-->
<!--#end if#-->
<!--#if (minutes < 10) & (hours > 0) #-->
<!--#set minutes = '0' + str(int(minutes)) #-->
<!--#else#-->
<!--#set minutes = str(int(minutes)) #-->
<!--#end if#-->
<!--#if hours > 0 #-->
<!--#set timeString = str(int(hours)) + ":" + minutes + ":" + seconds#-->
<!--#else#-->
<!--#set timeString = minutes + ":" + seconds#-->
<!--#end if#-->
<!--#end if#-->
$T('post-Paused') <!--#if $pause_int != '0' #-->($timeString) <!--#end if#-->
<!--#if float($mbleft) > 0#-->
- $sizeleft $T('Glitter-left')
- $sizeleft $T('Glitter-left')
<!--#end if#-->
- SABnzbd
<!--#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)
* Copyright 2011-2015 Twitter, Inc.
* 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).
* 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
* @version 1.0.0-rc3
* @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 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
if(isMobile) {
$('.modal').on('show.bs.modal', function() {
$('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
$('.modal').on('hidden.bs.modal', 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
**/
var pageIsVisible = true;
// Set the name of the hidden property and the change event for visibility
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";
visibilityChange = "visibilitychange";
} 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";
}
// Set the global visibility
// Set the global visibility
function handleVisibilityChange() {
if(document[hidden]) {
pageIsVisible = false;
@ -89,7 +89,7 @@ function handleVisibilityChange() {
// Add event listener only for supported browsers
if(typeof document.addEventListener !== "undefined" && typeof document[hidden] !== "undefined") {
// Handle page visibility change
// Handle page visibility change
document.addEventListener(visibilityChange, handleVisibilityChange, false);
}
@ -183,12 +183,12 @@ function showDetails(thisItem) {
function checkAllFiles(objCheck, onlyCheck) {
// Get which ones we care about
var allChecks = $($(objCheck).data('checkrange')).filter(':not(:disabled):visible');
// We need to re-evaltuate the state of this check-all
// Otherwise the 'inderterminate' will be overwritten by the click event!
setCheckAllState('#'+objCheck.id, $(objCheck).data('checkrange'))
// Now we can check what happend
// Now we can check what happend
if(objCheck.indeterminate) {
// Uncheck if we don't need trigger
if(onlyCheck) {
@ -203,7 +203,7 @@ function checkAllFiles(objCheck, onlyCheck) {
}
// To update the check-all button nicely
function setCheckAllState(checkSelector, rangeSelector) {
function setCheckAllState(checkSelector, rangeSelector) {
// See how many are checked
var allChecks = $(rangeSelector).filter(':not(:disabled):visible')
var nrChecks = allChecks.filter(":checked");
@ -246,7 +246,7 @@ function hideCompletedFiles() {
// Show status modal and switch to orphaned jobs tab
function showOrphans() {
$('a[href="#modal-options"]').click().parent().click();
$('a[href="#modal-options"]').click().parent().click();
$('a[href="#options-orphans"]').click()
}
@ -263,8 +263,8 @@ function showNotification(notiName, notiTimeout, fileCounter) {
// Remove after timeout
if(notiTimeout) {
setTimeout(function() {
hideNotification(true);
setTimeout(function() {
hideNotification(true);
}, notiTimeout)
}
}
@ -277,5 +277,5 @@ function hideNotification(fadeItOut) {
} else {
$('.main-notification-box').hide()
}
}

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

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

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

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

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

@ -37,7 +37,7 @@ ko.bindingHandlers.longText = {
if(allBindingsAccessor.get('longTextType') != "Script") {
value = value.map(convertHTMLtoText)
}
// Any <br>'s?
var outputText = '';
if(value.length > 4) {
@ -69,7 +69,7 @@ ko.bindingHandlers.filedrop = {
return;
}
// 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)
// Remove after timeout
setTimeout(function() {
@ -110,7 +110,7 @@ $(document).bind('dragover', function(e) {
/*! Knockout Persist - v0.1.0 - 2015-12-28
* 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 */
(function(ko) {
// 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-stop,
.dropdown-menu>li>a,
legend,
#modal-options legend label,
legend,
#modal-options legend label,
#modal-options legend a,
#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,
.text-muted {
color: #EBEBEB;
}
.dropdown-menu>li>a:hover,
.dropdown-menu>li>a:hover,
.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,
#feedback-slider {
background-color: #555555;
@ -85,8 +85,8 @@ legend,
color: black;
}
.nav-tabs>li.active>a,
.nav-tabs>li.active>a:focus,
.nav-tabs>li.active>a,
.nav-tabs>li.active>a:focus,
.nav-tabs>li.active>a:hover,
.nav-tabs>li>a:hover {
background-color: #ddd;
@ -182,7 +182,7 @@ pre {
opacity: 1 !important;
}
legend,
legend,
hr {
border-color: #C6C6C6 !important;
}
@ -207,8 +207,8 @@ hr {
margin-bottom: 1px;
}
.queue-item .dropdown-menu:after,
.history-item .dropdown-menu:after,
.queue-item .dropdown-menu:after,
.history-item .dropdown-menu:after,
.info-container-box-sorting .dropdown-menu:after {
border-bottom-color: #666;
}
@ -223,11 +223,11 @@ hr {
color: #EBEBEB !important;
}
::-moz-placeholder {
color: #EBEBEB !important;
::-moz-placeholder {
color: #EBEBEB !important;
opacity: 1 !important;
}
:-ms-input-placeholder {
color: #EBEBEB !important;
:-ms-input-placeholder {
color: #EBEBEB !important;
}

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

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

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

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

6
interfaces/wizard/one.html

@ -12,9 +12,9 @@
</script>
<h3>$T('wizard-server')</h3>
$T('wizard-explain-server')<br />
<br /><br />
<div class="row">
<div class="col-md-7 form-horizontal">
<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>
</div>
</div>
<div class="col-md-5">
<div class="clearfix"></div>

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

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

6
interfaces/wizard/static/style.css

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

2
sabnzbd/postproc.py

@ -503,7 +503,7 @@ def process_job(nzo):
script_ret = ''
if len(script_log.rstrip().split('\n')) > 1:
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)
else:
# No '(more)' button needed

Loading…
Cancel
Save