Browse Source

Merge in Plush improvements.

tags/0.6.0
ShyPike 14 years ago
parent
commit
f7a853ccb8
  1. 2
      interfaces/Plush/README.txt
  2. 8
      interfaces/Plush/templates/_inc_footer.tmpl
  3. 42
      interfaces/Plush/templates/_inc_header.tmpl
  4. 14
      interfaces/Plush/templates/_inc_modals.tmpl
  5. 30
      interfaces/Plush/templates/config_cat.tmpl
  6. 84
      interfaces/Plush/templates/config_rss.tmpl
  7. 57
      interfaces/Plush/templates/history.tmpl
  8. 450
      interfaces/Plush/templates/main.tmpl
  9. 53
      interfaces/Plush/templates/static/javascripts/config.js
  10. 198
      interfaces/Plush/templates/static/javascripts/plush.js
  11. 30
      interfaces/Plush/templates/static/stylesheets/colorschemes/gold/gold.css

2
interfaces/Plush/README.txt

@ -1,5 +1,5 @@
Plush for SABnzbd+ 0.6.x | Dec 22 2010
Plush for SABnzbd+ 0.6.x | Feb. 21 2010
assembled by pairofdimes - see LICENSE-CC.txt
http://forums.sabnzbd.org contributions welcome

8
interfaces/Plush/templates/_inc_footer.tmpl

@ -1,4 +1,9 @@
#if $pane!="Main"#
#if $pane=="Main"#
<!-- start Main footer-->
#else if $pane=="Nzo"
<!-- start Nzo footer -->
#else#
<!-- start other footer -->
#if $pane!="Connections" and $pane !="RSS"#</div>#end if#
</div>
<div class="clearfix"></div>
@ -8,5 +13,6 @@
#include $webdir + "/_inc_modals.tmpl"#
</div> <!-- close for the master-width div -->
</body>
</html>

42
interfaces/Plush/templates/_inc_header.tmpl

@ -26,36 +26,60 @@
#if $pane=="Main"#
<script type="text/javascript" src="${path}static/javascripts/plush.js?$version"></script>
<script type="text/javascript">
<script type="text/javascript">
jQuery(function($){
$.plush.apikey = "$session";
$.plush.Tprev = "$T('Plush-prev')"; // translations for pagination
$.plush.Tnext = "$T('Plush-next')";
$.plush.Tconfirmation = "$T('Plush-confirm')";
$.plush.TconfirmPurgeH = "$T('Plush-confirmPurgeH')";
$.plush.Init(); // Initialize Plush UI
$.plush.Refresh(); // Initiate Plush refresh cycle
});
$.plush.Init(); // Initialize Plush UI
$.plush.Refresh(); // Initiate Plush refresh cycle
});
</script>
#else if $pane=="Nzo"#
<script type="text/javascript" src="${path}static/javascripts/config.js?$version"></script>
<script type="text/javascript">
<script type="text/javascript">
var config_pane = "NZO"; // re-uses config's js/css
var confirmWithoutSavingPrompt = "$T('Plush-confirmWithoutSavingPrompt')";
var confirmWithoutSavingPrompt = "$T('Plush-confirmWithoutSavingPrompt')";
</script>
<script type="text/javascript" src="${path}static/javascripts/plush.js?$version"></script>
<script type="text/javascript">
jQuery(function($){
$.plush.apikey = "$session";
$.plush.Tprev = "$T('Plush-prev')"; // translations for pagination
$.plush.Tnext = "$T('Plush-next')";
$.plush.Tconfirmation = "$T('Plush-confirm')";
$.plush.TconfirmPurgeH = "$T('Plush-confirmPurgeH')";
$.plush.Init(); // Initialize Plush UI
$.plush.Refresh(); // Initiate Plush refresh cycle
});
</script>
#else#
<script type="text/javascript" src="${path}static/javascripts/config.js?$version"></script>
<script type="text/javascript">
<script type="text/javascript">
var config_pane = "$pane";
var help_uri = "$help_uri";
var apikey = "$session";
var confirmWithoutSavingPrompt = "$T('Plush-confirmWithoutSavingPrompt')";
var confirmWithoutSavingPrompt = "$T('Plush-confirmWithoutSavingPrompt')";
</script>
<script type="text/javascript" src="${path}static/javascripts/plush.js?$version"></script>
<script type="text/javascript">
jQuery(function($){
$.plush.apikey = "$session";
$.plush.Tprev = "$T('Plush-prev')"; // translations for pagination
$.plush.Tnext = "$T('Plush-next')";
$.plush.Tconfirmation = "$T('Plush-confirm')";
$.plush.TconfirmPurgeH = "$T('Plush-confirmPurgeH')";
$.plush.Init(); // Initialize Plush UI
$.plush.Refresh(); // Initiate Plush refresh cycle
});
</script>
#end if#
</head>
<body#if $pane=="Nzo"# class="nzo"#else if $pane!="Main"# class="config_body"#end if#>
<div id="master-width">
<div class="wrapper">
<div class="navigation">
<ul class="menu" id="navigation_menu_right">

14
interfaces/Plush/templates/_inc_modals.tmpl

@ -14,7 +14,6 @@
<p><small>$T('yourRights')</small></p>
</div>
#if $pane=="Main"#
<div id="plush_options_modal">
<p><a href="connections/disconnect?session=$session" class="juiButton">$T('link-forceDisc')</a></p>
@ -51,10 +50,12 @@
<span id="explain-blockRefresh" title="$T("Plush-explain-blockRefresh")"><input type="checkbox" id="blockRefresh" checked="checked" /> $T("Plush-blockRefresh")</span>
</div>
#if $pane=="Main"#
<div id="add_nzb_modal">
<input type="text" id="addID_input" size="31" />
<input type="submit" id="addID" value="$T('Plush-fetch')" class="juiButton" />
<br/><br/>
<div id="add_nzb_hr"><hr></div>
<form action="tapi" id="uploadNZBForm" method="post" enctype="multipart/form-data">
<input type="hidden" name="apikey" value="$session" />
<input type="hidden" name="mode" value="addfile" />
@ -62,9 +63,9 @@
<input type="submit" value="Upload" class="juiButton" />
<span id="uploadingSpinner" class="loading" style="display:none">&nbsp;</span>
<br/><i>$T('Plush-uploadTip')</i>
<br/><br/>
<div id="add_nzb_hr"><hr></div>
<i>$T('pp'):</i>
<table>
<table id="add_nzb_pp">
#if $cat_list#
<tr><td style="text-align:right">$T('category'):</td>
<td><select id="addID_cat" name="cat">
@ -102,8 +103,7 @@
</td></tr>
#end if#
</table>
<br/>
<div id="add_nzb_hr"><hr></div>
<i>$T('Plush-addnzb-filename'):</i><br/>
<input type="text" name="nzbname" id="addID_nzbname" size="38" />
@ -142,7 +142,7 @@
<input type="submit" id="delete_nzb_modal_remove_files" value="$T('removeNZB-Files')" class="juiButton" />
</div>
#end if#
#end if#
</div>

30
interfaces/Plush/templates/config_cat.tmpl

@ -24,8 +24,8 @@
<!--#if $cur == 1#-->
<tr>
<th align="center">$T('category')</th>
<th align="center">$T('mode')</th>
<th align="center">$T('priority')</th>
<th align="center">$T('mode')</th>
<!--#if $script_list#--><th align="center">$T('script')</th><!--#end if#-->
<th align="center">$T('catFolderPath')</th>
<th align="center">$T('catTags')</th>
@ -47,18 +47,6 @@
</td>
<td>
<select name="pp">
<!--#if $slot.name != '*'#-->
<option value="" <!--#if $slot.pp == "" then "selected" else ""#-->>$T('default')</option>
<!--#end if#-->
<option value="0" <!--#if $slot.pp == "0" then "selected" else ""#-->>$T('pp-none')</option>
<option value="1" <!--#if $slot.pp == "1" then "selected" else ""#-->>$T('pp-repair')</option>
<option value="2" <!--#if $slot.pp == "2" then "selected" else ""#-->>$T('pp-unpack')</option>
<option value="3" <!--#if $slot.pp == "3" then "selected" else ""#-->>$T('pp-delete')</option>
</select>
</td>
<td>
<select name="priority">
<!--#if $slot.name != '*'#-->
<option value="-100" <!--#if $slot.priority == -100 then 'selected' else ''#-->>$T('default')</option>
@ -70,13 +58,23 @@
</select>
</td>
<td>
<select name="pp">
<!--#if $slot.name != '*'#-->
<option value="" <!--#if $slot.pp == "" then "selected" else ""#-->>$T('default')</option>
<!--#end if#-->
<option value="0" <!--#if $slot.pp == "0" then "selected" else ""#-->>$T('pp-none')</option>
<option value="1" <!--#if $slot.pp == "1" then "selected" else ""#-->>$T('pp-repair')</option>
<option value="2" <!--#if $slot.pp == "2" then "selected" else ""#-->>$T('pp-unpack')</option>
<option value="3" <!--#if $slot.pp == "3" then "selected" else ""#-->>$T('pp-delete')</option>
</select>
</td>
<!--#if $script_list#-->
<td>
<select name="script">
<!--#for $sc in $script_list#-->
<!--#if not ($sc == 'Default' and $slot.name == '*')#-->
<option value="$sc" <!--#if $slot.script.lower() == $sc.lower() then "selected" else ""#-->>$sc</option>
<!--#end if#-->
<option value="$sc" <!--#if $cur == 1 and $sc.lower() != "none"#-->disabled<!--#else if $cur == 1 or $slot.script.lower() == $sc.lower()#-->selected<!--#end if#-->>$sc</option>
<!--#end for#-->
</select>
</td>

84
interfaces/Plush/templates/config_rss.tmpl

@ -36,7 +36,7 @@
<input type="hidden" name="session" value="$session">
<input type="hidden" value="$feed_item" name="feed">
<input type="hidden" value="1" name="table">
<input type="checkbox" onclick="this.form.action='toggle_rss_feed?session=$session'; this.form.submit(); return false;" name="enable" <!--#if $rss[$feed_item]['enable'] then "CHECKED" else "" #-->/>
<input type="checkbox" class="toggleFeedCheckbox" name="enable" <!--#if $rss[$feed_item]['enable'] then "CHECKED" else "" #-->/>
</form>
</td>
<td><strong><a class="juiButton" href="?feed=$rss[$feed_item]['link']#tabs-settings" <!--#if $active_feed == $feed_item#-->id="activeFeedLink"<!--#end if#-->>$feed_item</a></strong></td>
@ -49,19 +49,18 @@
</td>
</tr>
<!--#end for#-->
<tfoot><tr><th colspan="4">
<input type="submit" class="juiButton" value="$T('addFeed')" onclick="jQuery('#pane-rss-details').hide(); jQuery('#pane-add-feed').toggle();"/>
</th></tr></tfoot>
</table>
<!--#else#-->
<p>$T('none')</p>
<h2><strong>$T('addFeed'):</strong></h2>
<!--#end if#-->
<p>
<br/>
<input type="submit" class="juiButton" value="$T('addFeed')" onclick="jQuery('#pane-rss-details').hide(); jQuery('#pane-add-feed').toggle();"/>
<input type="submit" class="juiButton" value="RSS Details" onclick="jQuery('#pane-add-feed').hide(); jQuery('#pane-rss-details').toggle();"/>
</p>
<br/>
<div id="pane-add-feed" style="display:none">
<div id="pane-add-feed" <!--#if $feeds#-->style="display:none"<!--#end if#-->>
<form action="add_rss_feed" method="post">
<table>
<tr><td>$T('name')</td><td><input type="text" size="10" name="feed" value="$feed"/></td></tr>
@ -70,18 +69,17 @@
</table>
<input type="hidden" name="session" value="$session">
</form>
<br/><hr/>&nbsp;
</div>
<div id="pane-rss-details" style="display:none">
<p>$T('explain-RSS')</p>
<form action="save_rss_rate" method="post">
<strong>$T('opt-rss_rate'):</strong><br/>
<small>$T('explain-rss_rate')</small><br/>
<input type="text" name="rss_rate" value="$rss_rate" size=8 />
<input type="hidden" name="session" value="$session"/>
<input type="submit" class="juiButton" value="$T('button-save')"/>
</form>
</div>
<p>$T('explain-RSS')</p>
<form action="save_rss_rate" method="post">
<strong>$T('opt-rss_rate'):</strong><br/>
<small>$T('explain-rss_rate')</small><br/>
<input type="text" name="rss_rate" value="$rss_rate" size=8 />
<input type="hidden" name="session" value="$session"/>
<input type="submit" class="juiButton" value="$T('button-save')"/>
</form>
</div>
@ -94,7 +92,7 @@
<table>
<tr><td></td><td><input type="checkbox" onclick="this.form.action='toggle_rss_feed?session=$session'; this.form.submit(); return false;" name="enable" <!--#if $rss[$feed]['enable'] then "CHECKED" else "" #-->/>$T('enabled').capitalize()</td></tr>
<tr><td></td><td><input type="checkbox" class="toggleFeedCheckbox" name="enable" <!--#if $rss[$feed]['enable'] then "CHECKED" else "" #-->/>$T('enabled').capitalize()</td></tr>
<tr><td>$T('feed')</td><td><textarea rows="3" cols="80" name="uri">$rss[$feed]['uri']</textarea></td></tr>
@ -173,9 +171,9 @@
<th>$T('rss-type')</th>
<th>$T('rss-filter')</th>
<!--#if $rss[$feed]['pick_cat']#--><th>$T('category')</th><!--#end if#-->
<th>$T('priority')</th>
<th>Mode</th>
<!--#if $rss[$feed]['pick_script']#--><th>$T('script')</th><!--#end if#-->
<th>$T('priority')</th>
<th></th>
</tr>
@ -196,12 +194,22 @@
<td>
<select name="cat">
<!--#for $ct in $cat_list#-->
<option value="$ct" <!--#if $ct == "Default" then "selected" else ""#-->>$Tspec($ct)</option>
<option value="$ct" <!--#if $ct == 'Default' then "selected" else ""#-->>$Tspec($ct)</option>
<!--#end for#-->
</select>
</td>
<!--#end if#-->
<td>
<select name="priority">
<option value="-100" selected>$T('default')</option>
<option value="2" >$T('pr-force')</option>
<option value="1" >$T('pr-high')</option>
<option value="0" >$T('pr-normal')</option>
<option value="-1">$T('pr-low')</option>
<option value="-2">$T('pr-paused')</option>
</select>
</td>
<td>
<select name="pp">
<option value="" selected>$T('default')</option>
<option value="0">$T('pp-none')</option>
@ -219,20 +227,10 @@
</select>
</td>
<!--#end if#-->
<td>
<select name="priority">
<option value="-100" selected'>$T('default')</option>
<option value="2" >$T('pr-force')</option>
<option value="1" >$T('pr-high')</option>
<option value="0" >$T('pr-normal')</option>
<option value="-1">$T('pr-low')</option>
<option value="-2">$T('pr-paused')</option>
</select>
</td>
<input type="hidden" value="$rss[$feed]['filtercount']" name="index">
<input type="hidden" value="$feed" name="feed">
<input type="hidden" name="session" value="$session">
<td><input type="submit" class="juiButton" value="$T('button-save')"></td>
<td><input type="submit" class="juiButton" value="$T('button-add')"></td>
</tr>
</form>
@ -249,7 +247,7 @@
<input type="submit" class="juiButton" value="$T('rss-delFilter')"></form>
</td>
<td><form><select onchange="location = this.options[this.selectedIndex].value;">
<td><form><select class="rssOrderSelect">
<!--#for $i in xrange($rss[$feed]['filtercount'])#-->
<option value="pos_rss_filter?session=$session&feed=$feed&current=$fnum&new=$i" <!--#if int($i) == int($fnum) then "selected" else ""#-->>$i</option>
<!--#end for#-->
@ -277,6 +275,16 @@
</select>
</td>
<!--#end if#-->
<td>
<select name="priority">
<option value="-100" <!--#if $filter[5] == "-100" then 'selected' else ''#-->>$T('default')</option>
<option value="2" <!--#if $filter[5] == "2" then "selected" else ""#-->>$T('pr-force')</option>
<option value="1" <!--#if $filter[5] == "1" then "selected" else ""#-->>$T('pr-high')</option>
<option value="0" <!--#if $filter[5] == "0" then "selected" else ""#-->>$T('pr-normal')</option>
<option value="-1" <!--#if $filter[5] == "-1" then "selected" else ""#-->>$T('pr-low')</option>
<option value="-2" <!--#if $filter[5] == "-2" then "selected" else ""#-->>$T('pr-paused')</option>
</select>
</td>
<td>
<select name="pp">
<option value="" <!--#if $filter[1] == "0" then 'selected' else ''#-->>$T('default')</option>
@ -295,16 +303,6 @@
</select>
</td>
<!--#end if#-->
<td>
<select name="priority">
<option value="-100" <!--#if $filter[5] == "-100" then 'selected' else ''#-->>$T('default')</option>
<option value="2" <!--#if $filter[5] == "2" then "selected" else ""#-->>$T('pr-force')</option>
<option value="1" <!--#if $filter[5] == "1" then "selected" else ""#-->>$T('pr-high')</option>
<option value="0" <!--#if $filter[5] == "0" then "selected" else ""#-->>$T('pr-normal')</option>
<option value="-1" <!--#if $filter[5] == "-1" then "selected" else ""#-->>$T('pr-low')</option>
<option value="-2" <!--#if $filter[5] == "-2" then "selected" else ""#-->>$T('pr-paused')</option>
</select>
</td>
<td>
<input type="hidden" name="index" value="$fnum"/>
<input type="hidden" name="feed" value="$feed"/>

57
interfaces/Plush/templates/history.tmpl

@ -29,39 +29,32 @@
<div style="display:none">
<div id="details-$line.nzo_id">
<table width="100%">
<tr><th>$T('completed')</th><th>$T('name')</th><th>$T('size')</th><th>$T('status')</th></tr>
<%
compl = datetime.datetime.fromtimestamp(float(line['completed'])).strftime(time_format('%Y-%m-%d %H:%M:%S'))
%>
<tr>
<td>$compl</td>
<td>$line.name<!--#if $line.action_line#--> - $line.action_line<!--#else if $line.fail_message#--> - <span class="fail_message">$line.fail_message</span><!--#end if#--></td>
<td>$line.size</td><td>$Tx('post-'+$line.status)</td>
</tr>
</table>
<br/><br/>
<table width="100%" class="rssTable">
<% compl = datetime.datetime.fromtimestamp(float(line['completed'])).strftime(time_format('%Y-%m-%d %H:%M:%S')) %>
<tr><td><strong>$T('completed')</strong></td><td>$compl</td></tr>
<tr class="odd"><td><strong>$T('name')</strong></td><td>$line.name<!--#if $line.action_line#--> - $line.action_line<!--#else if $line.fail_message#--> - <span class="fail_message">$line.fail_message</span><!--#end if#--></td></tr>
<tr><td><strong>$T('size')</strong></td><td>$line.size</td></tr>
<tr class="odd"><td><strong>$T('status')</strong></td><td>$Tx('post-'+$line.status)</td></tr>
<!--#set $oddLine = not False#-->
<!--#for $stage in $line.stage_log#-->
<!--#set $oddLine = not $oddLine#-->
<dt><b>$Tx('stage-'+$stage.name.title.lower())</b></dt>
<!--#for $action in $stage.actions#-->
<dd>$action</dd>
<!--#end for#-->
<br />
<!--#end for#-->
<!--#if $line.category#-->
<dt><b>$T('category')</b></dt>
<dd>$line.category</dd>
<br />
<!--#end if#-->
<!--#if $line.storage#-->
<dt><b>$T('msg-path')</b></dt>
<dd>$line.storage</dd>
<br />
<!--#end if#-->
<!--#set $oddLine = not False#-->
<!--#if $line.category#-->
<!--#set $oddLine = not $oddLine#-->
<tr <!--#if $oddLine#-->class="odd"<!--#end if#-->><td><b>$T('category')</b></td><td>$line.category</td></tr>
<!--#end if#-->
<!--#if $line.storage#-->
<!--#set $oddLine = not $oddLine#-->
<tr <!--#if $oddLine#-->class="odd"<!--#end if#-->><td><b>$T('msg-path')</b></td><td>$line.storage</td></tr>
<!--#end if#-->
<!--#for $stage in $line.stage_log#-->
<!--#set $oddLine = not $oddLine#-->
<tr <!--#if $oddLine#-->class="odd"<!--#end if#-->><td><b>$Tx('stage-'+$stage.name.title.lower())</b></td><td>
<!--#for $action in $stage.actions#-->
$action<br/>
<!--#end for#-->
</td></tr>
<!--#end for#-->
</table>
</div>
</div>
@ -82,7 +75,7 @@
<div class="icon_history_verbose main_sprite_container sprite_hv_star hvFaded">&nbsp;</div>
<!--#end if#-->
<!--#if $line.size or $line.category or $line.path or $line.storage#-->
<div class="icon_history_verbose main_sprite_container sprite_hv_stats" title='<!--#if $line.size#-->$T('size'): $line.size<br><br><!--#end if#--><!--#if $line.category#-->$T('category'): $line.category<br><br><!--#end if#--><!--#if $line.path#-->$T('Plush-path'):<br><!--#echo $line.path.replace("'","&rsquo;") #--><br><br><!--#end if#--><!--#if $line.storage#-->$T('Plush-storage'):<br><!--#echo $line.storage.replace("'","&rsquo;") #--><!--#end if#-->'>&nbsp;</div>
<div class="icon_history_verbose main_sprite_container sprite_hv_stats" title='<!--#if $line.size#-->$T('size'): $line.size<!--#end if#--><!--#if $line.category#--><br>$T('category'): $line.category<!--#end if#-->'>&nbsp;</div>
<!--#else#-->
<div class="icon_history_verbose main_sprite_container sprite_hv_stats hvFaded">&nbsp;</div>
<!--#end if#-->

450
interfaces/Plush/templates/main.tmpl

@ -1,225 +1,225 @@
<!--#set global $pane="Main"#-->
<!--#set global $help_uri=""#-->
<!--#include $webdir + "/_inc_header.tmpl"#-->
<div id="page-wrap" class="tiley_sprite_container sprite_tile_queue_wrap">
<div id="hdr-queue" class="tilex_sprite_container sprite_tile_qh">
<div class="logo main_sprite_container sprite_topleft_queue"><h1>$T('menu-queue').upper()</h1></div>
<div class="queue-buttons queue-buttons-pause lang-$active_lang main_sprite_container sprite_topright_queue">
<ul>
<li class="main_sprite_container <!--#if $paused then 'sprite_q_pause_on' else 'sprite_q_pause'#-->" title="$T('link-pause') &frasl; $T('link-resume')" id="pause_resume"></li>
<li class="main_sprite_container sprite_q_menu_pausefor">
<a href="#"></a>
<ul id="set_pause_list">
<li><a href="javascript:void(0)" class="set_pause pointer" rel="5">$T('Plush-pause5m')</a></li>
<li><a href="javascript:void(0)" class="set_pause pointer" rel="15">$T('Plush-pause15m')</a></li>
<li><a href="javascript:void(0)" class="set_pause pointer" rel="30">$T('Plush-pause30m')</a></li>
<li><a href="javascript:void(0)" class="set_pause pointer" rel="60">$T('Plush-pause1h')</a></li>
<li><a href="javascript:void(0)" class="set_pause pointer" rel="180">$T('Plush-pause3h')</a></li>
<li><a href="javascript:void(0)" class="set_pause pointer" rel="360">$T('Plush-pause6h')</a></li>
<li><a href="javascript:void(0)" class="set_pause pointer" rel="custom" id="pauseForPrompt" title="$T('Plush-pauseForPrompt')">$T('Plush-pauseFor')</a></li>
</ul>
</li>
<li id="pause_int"></li>
<li class="main_sprite_container sprite_q_queue">
<a class="sf-with-ul">$T('menu-queue')</a>
<ul>
<li><a id="multiops_toggle" class="pointer">$T('Plush-multiOperations')</a></li>
<li>
<a class="sf-with-ul">$T('Plush-onQueueFinish'):
<br/>
<select id="onQueueFinish-option">
<option value=""></option>
<optgroup label="$T('eoq-actions')">
<option value="shutdown_program" <!--#if $finishaction == 'shutdown_program' then 'selected' else ''#-->>$T('shutdownSab')</option>
<!--#if $power_options#-->
<option value="shutdown_pc" <!--#if $finishaction == 'shutdown_pc' then 'selected' else ''#-->>$T('shutdownPc')</option>
<option value="standby_pc" <!--#if $finishaction == 'standby_pc' then 'selected' else ''#-->>$T('standbyPc')</option>
<option value="hibernate_pc" <!--#if $finishaction == 'hibernate_pc' then 'selected' else ''#-->>$T('hibernatePc')</option>
<!--#end if#-->
</optgroup>
<!--#if $script_list#-->
<optgroup label="$T('eoq-scripts')">
<!--#for $sc in $script_list#-->
<!--#if $sc != 'None'#-->
<option value="script_$sc" <!--#if $finishaction == 'script_'+$sc then 'selected' else ''#-->>$sc</option>
<!--#end if#-->
<!--#end for#-->
</optgroup>
<!--#end if#-->
</select>
</a>
</li>
<li><a id="queue_purge" class="pointer" rel="$T('Plush-confirmPurgeQ')">$T('Plush-purge')</a></li>
<li>
<a class="sf-with-ul">$T('Plush-sort')</a>
<ul id="queue_sort_list">
<li class="queue_sort pointer" id="sortAgeAsc"><a>$T('Plush-sortAgeAsc')</a></li>
<li class="queue_sort pointer" id="sortAgeDesc"><a>$T('Plush-sortAgeDesc')</a></li>
<li class="queue_sort pointer" id="sortNameAsc"><a>$T('Plush-sortNameAsc')</a></li>
<li class="queue_sort pointer" id="sortNameDesc"><a>$T('Plush-sortNameDesc')</a></li>
<li class="queue_sort pointer" id="sortSizeAsc"><a>$T('Plush-sortSizeAsc')</a></li>
<li class="queue_sort pointer" id="sortSizeDesc"><a>$T('Plush-sortSizeDesc')</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="centerpiece">
<div class="main_sprite_container sprite_rounded_area_bg" id="time-left"><p><span id="stats_eta">&sdot;</span>&nbsp;$T('Plush-left')</p></div>
<div class="sabnzbd_logo main_sprite_container sprite_sabnzbdplus_logo"></div>
<div class="main_sprite_container sprite_rounded_area_bg_edged" id="speed"><p><span id="stats_speed">&sdot;</span></p></div>
<div class="queue-buttons" id="speed-wrapper">
<ul>
<li class="main_sprite_container sprite_q_menu_pausefor">
<ul>
<li><a>$T('Plush-maxSpeed'):&nbsp;&nbsp;<input type="text" id="maxSpeed-option" size="8" />&nbsp;&nbsp;$T('KBs')</a></li>
<li><a>
<input type="button" value="$T('Plush-reset')" id="maxSpeed-disable" class="float-right" />
<input type="button" value="$T('button-save')" id="maxSpeed-enable" class="float-right" />
</a></li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<div id="queue-wrap" class="tiley_sprite_container sprite_tile_page_wrap">
<div class="box_banner_hr main_sprite_container sprite_tile_qh_seperator"></div>
<!-- multi-operations for queue processing -->
<div id="multiops_bar" class="tilex_sprite_container sprite_tile_qhistory" style="display:none">
<div id="multiops_inputs">
<div class="left">
<div id="multiops_title">$T('Plush-multiOperations')</div>
</div>
<div class="right">
<input type="button" id="multi_reset" value="$T('Plush-reset')" />
<input type="button" id="multi_apply" value="$T('Plush-applySelected')" />
</div>
<br class="clear"/>
<div class="left">
$T('nzo-selection'):&nbsp;
<a id="multiops_select_all">$T('nzo-all').capitalize()</a> &sdot;
<a id="multiops_select_range">$T('Plush-nzo-range').capitalize()</a> &sdot;
<a id="multiops_select_invert">$T('nzo-invert').capitalize()</a> &sdot;
<a id="multiops_select_none">$T('nzo-none').capitalize()</a>
</div>
<div class="right">
<select id="multi_status"><optgroup label="$T('status')">
<option value="">$T('status')</option>
<option value="pause">$T('sch-pause')</option>
<option value="resume">$T('sch-resume')</option>
</optgroup></select>
<!--#if $cat_list#-->
<select id="multi_cat"><optgroup label="$T('category')">
<option value="">$T('category')</option>
<!--#for $ct in $cat_list#-->
<!--#if $ct != "Default"#--><option value="$ct">$Tspec($ct)</option><!--#end if#-->
<!--#end for#-->
</optgroup></select>
<!--#end if#-->
<select id="multi_priority"><optgroup label="$T('priority')">
<option value="">$T('priority')</option>
<option value="2">$T('pr-force')</option>
<option value="1">$T('pr-high')</option>
<option value="0">$T('pr-normal')</option>
<option value="-1">$T('pr-low')</option>
</optgroup></select>
<select id="multi_pp"><optgroup label="$T('pp')">
<option value="">$T('pp')</option>
<option value="0">$T('pp-none')</option>
<option value="1">$T('pp-repair')</option>
<option value="2">$T('pp-unpack')</option>
<option value="3">$T('pp-delete')</option>
</optgroup></select>
<!--#if $script_list#-->
<select id="multi_script"><optgroup label="$T('script')">
<option value="">$T('script')</option>
<!--#for $sc in $script_list#-->
<!--#if $sc != "Default"#--><option value="$sc">$Tspec($sc)</option><!--#end if#-->
<!--#end for#-->
</optgroup></select>
<!--#end if#-->
<div id="multi_delete" class="main_sprite_container icon_nzb_remove sprite_ql_cross_on" title="$T('nzo-delete')">&nbsp;</div>
</div>
</div>
</div>
<!-- Queue ( queue.tmpl )-->
<div id="queue"></div>
<div class="box_fatbottom tilex_sprite_container sprite_tile_qh_bottom" id="box_fatbottom_queue">
<div class="right_stats nowrap" id="queue_stats"></div>
<div class="left_stats">
<select id="queue-pagination-perpage" class="pagination-perpage">
<option value="5">5 / $T('Plush-page')</option>
<option value="10">10 / $T('Plush-page')</option>
<option value="20">20 / $T('Plush-page')</option>
<option value="30">30 / $T('Plush-page')</option>
<option value="40">40 / $T('Plush-page')</option>
<option value="50">50 / $T('Plush-page')</option>
<option value="9999999">$T('Plush-everything')</option>
</select>
<div class="initial-loading">&nbsp;</div>
<div id="queue-pagination" class="pagination"></div>
</div>
</div>
<!-- History Menu/Banner -->
<div id="hdr-history" class="box_banner_history tilex_sprite_container sprite_tile_qhistory">
<h1>$T('menu-history').upper() </h1>
<div class="box_banner_r">
<ul class="box_banner_menu">
<li class="main_sprite_container sprite_h_purge show" id="hist_purge" title="$T('purgeHist')"></li>
<li><select id="failed_only" style="margin-top:8px;">
<option value="0">$T('showAllHis')</option>
<option value="1">$T('showFailedHis')</option>
</select></li>
<li><form id="historySearchForm" action="#"><input id="historySearchBox" type="text" size="8" class="main_sprite_container sprite_h_search" /></form></li>
</ul>
</div>
</div>
<div class="box_banner_hr main_sprite_container sprite_tile_qh_seperator"></div>
<!-- History ( history.tmpl ) -->
<div id="history"></div>
<div class="box_fatbottom history_stats tilex_sprite_container sprite_tile_qh_bottom">
<div class="right_stats nowrap" id="history_stats"></div>
<div class="left_stats">
<select id="history-pagination-perpage" class="pagination-perpage">
<option value="5">5 / $T('Plush-page')</option>
<option value="10">10 / $T('Plush-page')</option>
<option value="20">20 / $T('Plush-page')</option>
<option value="30">30 / $T('Plush-page')</option>
<option value="40">40 / $T('Plush-page')</option>
<option value="50">50 / $T('Plush-page')</option>
<option value="9999999">$T('Plush-everything')</option>
<option value="1">$T('Plush-disabled')</option>
</select>
<div class="initial-loading">&nbsp;</div>
<div id="history-pagination" class="pagination"></div>
</div>
<div class="plush_wrapper"><div class="main_sprite_container sprite_sabnzbdplus_plush">&nbsp;</div></div>
</div>
</div>
<div id="btm-wrapper" class="tilex_sprite_container sprite_tile_bottom_wrap">
<div class="main_sprite_container sprite_btm_corner_right"></div>
<div class="main_sprite_container sprite_btm_corner_left"></div>
</div>
</div><!--#page_wrap-->
<!--#include $webdir + "/_inc_footer.tmpl"#-->
<!--#set global $pane="Main"#-->
<!--#set global $help_uri=""#-->
<!--#include $webdir + "/_inc_header.tmpl"#-->
<div id="page-wrap" class="tiley_sprite_container sprite_tile_queue_wrap">
<div id="hdr-queue" class="tilex_sprite_container sprite_tile_qh">
<div class="logo main_sprite_container sprite_topleft_queue"><h1>$T('menu-queue').upper()</h1></div>
<div class="queue-buttons queue-buttons-pause lang-$active_lang main_sprite_container sprite_topright_queue">
<ul>
<li class="main_sprite_container <!--#if $paused then 'sprite_q_pause_on' else 'sprite_q_pause'#-->" title="$T('link-pause') &frasl; $T('link-resume')" id="pause_resume"></li>
<li class="main_sprite_container sprite_q_menu_pausefor">
<a href="#"></a>
<ul id="set_pause_list">
<li><a href="javascript:void(0)" class="set_pause pointer" rel="5">$T('Plush-pause5m')</a></li>
<li><a href="javascript:void(0)" class="set_pause pointer" rel="15">$T('Plush-pause15m')</a></li>
<li><a href="javascript:void(0)" class="set_pause pointer" rel="30">$T('Plush-pause30m')</a></li>
<li><a href="javascript:void(0)" class="set_pause pointer" rel="60">$T('Plush-pause1h')</a></li>
<li><a href="javascript:void(0)" class="set_pause pointer" rel="180">$T('Plush-pause3h')</a></li>
<li><a href="javascript:void(0)" class="set_pause pointer" rel="360">$T('Plush-pause6h')</a></li>
<li><a href="javascript:void(0)" class="set_pause pointer" rel="custom" id="pauseForPrompt" title="$T('Plush-pauseForPrompt')">$T('Plush-pauseFor')</a></li>
</ul>
</li>
<li id="pause_int"></li>
<li class="main_sprite_container sprite_q_queue">
<a class="sf-with-ul">$T('menu-queue')</a>
<ul>
<li><a id="multiops_toggle" class="pointer">$T('Plush-multiOperations')</a></li>
<li>
<a class="sf-with-ul">$T('Plush-onQueueFinish'):
<br/>
<select id="onQueueFinish-option">
<option value=""></option>
<optgroup label="$T('eoq-actions')">
<option value="shutdown_program" <!--#if $finishaction == 'shutdown_program' then 'selected' else ''#-->>$T('shutdownSab')</option>
<!--#if $power_options#-->
<option value="shutdown_pc" <!--#if $finishaction == 'shutdown_pc' then 'selected' else ''#-->>$T('shutdownPc')</option>
<option value="standby_pc" <!--#if $finishaction == 'standby_pc' then 'selected' else ''#-->>$T('standbyPc')</option>
<option value="hibernate_pc" <!--#if $finishaction == 'hibernate_pc' then 'selected' else ''#-->>$T('hibernatePc')</option>
<!--#end if#-->
</optgroup>
<!--#if $script_list#-->
<optgroup label="$T('eoq-scripts')">
<!--#for $sc in $script_list#-->
<!--#if $sc != 'None'#-->
<option value="script_$sc" <!--#if $finishaction == 'script_'+$sc then 'selected' else ''#-->>$sc</option>
<!--#end if#-->
<!--#end for#-->
</optgroup>
<!--#end if#-->
</select>
</a>
</li>
<li><a id="queue_purge" class="pointer" rel="$T('Plush-confirmPurgeQ')">$T('Plush-purge')</a></li>
<li>
<a class="sf-with-ul">$T('Plush-sort')</a>
<ul id="queue_sort_list">
<li class="queue_sort pointer" id="sortAgeAsc"><a>$T('Plush-sortAgeAsc')</a></li>
<li class="queue_sort pointer" id="sortAgeDesc"><a>$T('Plush-sortAgeDesc')</a></li>
<li class="queue_sort pointer" id="sortNameAsc"><a>$T('Plush-sortNameAsc')</a></li>
<li class="queue_sort pointer" id="sortNameDesc"><a>$T('Plush-sortNameDesc')</a></li>
<li class="queue_sort pointer" id="sortSizeAsc"><a>$T('Plush-sortSizeAsc')</a></li>
<li class="queue_sort pointer" id="sortSizeDesc"><a>$T('Plush-sortSizeDesc')</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="centerpiece">
<div class="main_sprite_container sprite_rounded_area_bg" id="time-left"><p><span id="stats_eta">&sdot;</span>&nbsp;$T('Plush-left')</p></div>
<div class="sabnzbd_logo main_sprite_container sprite_sabnzbdplus_logo"></div>
<div class="main_sprite_container sprite_rounded_area_bg_edged" id="speed"><p><span id="stats_speed">&sdot;</span></p></div>
<div class="queue-buttons" id="speed-wrapper">
<ul>
<li class="main_sprite_container sprite_q_menu_pausefor">
<ul>
<li><a>$T('Plush-maxSpeed'):&nbsp;&nbsp;<input type="text" id="maxSpeed-option" size="8" />&nbsp;&nbsp;$T('KBs')</a></li>
<li><a>
<input type="button" value="$T('Plush-reset')" id="maxSpeed-disable" class="float-right" />
<input type="button" value="$T('button-save')" id="maxSpeed-enable" class="float-right" />
</a></li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<div id="queue-wrap" class="tiley_sprite_container sprite_tile_page_wrap">
<div class="box_banner_hr main_sprite_container sprite_tile_qh_seperator"></div>
<!-- multi-operations for queue processing -->
<div id="multiops_bar" class="tilex_sprite_container sprite_tile_qhistory" style="display:none">
<div id="multiops_inputs">
<div class="left">
<div id="multiops_title">$T('Plush-multiOperations')</div>
</div>
<div class="right">
<input type="button" id="multi_reset" value="$T('Plush-reset')" />
<input type="button" id="multi_apply" value="$T('Plush-applySelected')" />
</div>
<br class="clear"/>
<div class="left">
$T('nzo-selection'):&nbsp;
<a id="multiops_select_all">$T('nzo-all').capitalize()</a> &sdot;
<a id="multiops_select_range">$T('Plush-nzo-range').capitalize()</a> &sdot;
<a id="multiops_select_invert">$T('nzo-invert').capitalize()</a> &sdot;
<a id="multiops_select_none">$T('nzo-none').capitalize()</a>
</div>
<div class="right">
<select id="multi_status"><optgroup label="$T('status')">
<option value="">$T('status')</option>
<option value="pause">$T('sch-pause')</option>
<option value="resume">$T('sch-resume')</option>
</optgroup></select>
<!--#if $cat_list#-->
<select id="multi_cat"><optgroup label="$T('category')">
<option value="">$T('category')</option>
<!--#for $ct in $cat_list#-->
<!--#if $ct != "Default"#--><option value="$ct">$Tspec($ct)</option><!--#end if#-->
<!--#end for#-->
</optgroup></select>
<!--#end if#-->
<select id="multi_priority"><optgroup label="$T('priority')">
<option value="">$T('priority')</option>
<option value="2">$T('pr-force')</option>
<option value="1">$T('pr-high')</option>
<option value="0">$T('pr-normal')</option>
<option value="-1">$T('pr-low')</option>
</optgroup></select>
<select id="multi_pp"><optgroup label="$T('pp')">
<option value="">$T('pp')</option>
<option value="0">$T('pp-none')</option>
<option value="1">$T('pp-repair')</option>
<option value="2">$T('pp-unpack')</option>
<option value="3">$T('pp-delete')</option>
</optgroup></select>
<!--#if $script_list#-->
<select id="multi_script"><optgroup label="$T('script')">
<option value="">$T('script')</option>
<!--#for $sc in $script_list#-->
<!--#if $sc != "Default"#--><option value="$sc">$Tspec($sc)</option><!--#end if#-->
<!--#end for#-->
</optgroup></select>
<!--#end if#-->
<div id="multi_delete" class="main_sprite_container icon_nzb_remove sprite_ql_cross_on" title="$T('nzo-delete')">&nbsp;</div>
</div>
</div>
</div>
<!-- Queue ( queue.tmpl )-->
<div id="queue"></div>
<div class="box_fatbottom tilex_sprite_container sprite_tile_qh_bottom" id="box_fatbottom_queue">
<div class="right_stats nowrap" id="queue_stats"></div>
<div class="left_stats">
<select id="queue-pagination-perpage" class="pagination-perpage">
<option value="5">5 / $T('Plush-page')</option>
<option value="10">10 / $T('Plush-page')</option>
<option value="20">20 / $T('Plush-page')</option>
<option value="30">30 / $T('Plush-page')</option>
<option value="40">40 / $T('Plush-page')</option>
<option value="50">50 / $T('Plush-page')</option>
<option value="9999999">$T('Plush-everything')</option>
</select>
<div class="initial-loading">&nbsp;</div>
<div id="queue-pagination" class="pagination"></div>
</div>
</div>
<!-- History Menu/Banner -->
<div id="hdr-history" class="box_banner_history tilex_sprite_container sprite_tile_qhistory">
<h1>$T('menu-history').upper() </h1>
<div class="box_banner_r">
<ul class="box_banner_menu">
<li class="main_sprite_container sprite_h_purge show" id="hist_purge" title="$T('purgeHist')"></li>
<li><select id="failed_only" style="margin-top:8px;">
<option value="0">$T('showAllHis')</option>
<option value="1">$T('showFailedHis')</option>
</select></li>
<li><form id="historySearchForm" action="#"><input id="historySearchBox" type="text" size="8" class="main_sprite_container sprite_h_search" /></form></li>
</ul>
</div>
</div>
<div class="box_banner_hr main_sprite_container sprite_tile_qh_seperator"></div>
<!-- History ( history.tmpl ) -->
<div id="history"></div>
<div class="box_fatbottom history_stats tilex_sprite_container sprite_tile_qh_bottom">
<div class="right_stats nowrap" id="history_stats"></div>
<div class="left_stats">
<select id="history-pagination-perpage" class="pagination-perpage">
<option value="5">5 / $T('Plush-page')</option>
<option value="10">10 / $T('Plush-page')</option>
<option value="20">20 / $T('Plush-page')</option>
<option value="30">30 / $T('Plush-page')</option>
<option value="40">40 / $T('Plush-page')</option>
<option value="50">50 / $T('Plush-page')</option>
<option value="9999999">$T('Plush-everything')</option>
<option value="1">$T('Plush-disabled')</option>
</select>
<div class="initial-loading">&nbsp;</div>
<div id="history-pagination" class="pagination"></div>
</div>
<div class="plush_wrapper"><div class="main_sprite_container sprite_sabnzbdplus_plush">&nbsp;</div></div>
</div>
</div>
<div id="btm-wrapper" class="tilex_sprite_container sprite_tile_bottom_wrap">
<div class="main_sprite_container sprite_btm_corner_right"></div>
<div class="main_sprite_container sprite_btm_corner_left"></div>
</div>
</div><!--#page_wrap-->
<!--#include $webdir + "/_inc_footer.tmpl"#-->

53
interfaces/Plush/templates/static/javascripts/config.js

@ -179,48 +179,17 @@ jQuery(document).ready(function($){
break;
case 'RSS':
/*
$(':checkbox').click(function(event){ // toggle feed
$(event.target).parents('form:first').attr('action','toggle_rss_feed').submit();
return false;
});
$('#config_content .EntryFieldSet .preview_feed').click(function(event){
$.fn.colorbox({
href:'test_rss_feed?'+$(event.target).parents('form:first').serialize(),
innerWidth:"80%", innerHeight:"80%", initialWidth:"80%", initialHeight:"80%", speed:0, opacity:0.7
});
return false;
});
$(document).bind('cbox_complete', function(){
$('#cboxTitle').text( $('#cboxLoadedContent h3').text() );
$('#cboxLoadedContent input, #cboxLoadedContent h3').hide(); // hide back button, title
$('#cboxLoadedContent a').click(function(event){
if( $(event.target).attr('target') != '_blank' ) {
$.ajax({ url: $(event.target).attr('href') }); // ajax downloads
$(event.target).replaceWith('Download');
return false;
}
});
});
$('#config_content .EntryFieldSet .download_feed').click(function(event){
if(confirm($(event.target).attr('rel'))) {
$.fn.colorbox({
href:'download_rss_feed?'+$(event.target).parents('form:first').serialize(),
innerWidth:"80%", innerHeight:"80%", initialWidth:"80%", initialHeight:"80%", speed:0, opacity:0.7
});
}
return false;
});
$('#config_content .EntryFieldSet .delete_feed').click(function(event){
if(confirm($(event.target).attr('rel')))
$(event.target).parents('form:first').attr('action','del_rss_feed').submit();
return false;
});
$('#config_content .EntryFieldSet .filter_order').change(function(event){ // update filter order
window.onbeforeunload = null;
window.location = $(event.target).val()+'&session='+apikey;
});
*/
$('.toggleFeedCheckbox').click(function(){ // enable/disable feed
window.onbeforeunload = null; // lose data?
this.form.action='toggle_rss_feed?session=$session';
this.form.submit();
return false;
});
$('.rssOrderSelect').change(function(){ // change filter order
window.onbeforeunload = null; // lose data?
location = this.options[this.selectedIndex].value;
});
break;
case 'Email':

198
interfaces/Plush/templates/static/javascripts/plush.js

@ -4,12 +4,12 @@
jQuery(function($){
$.plush = {
// ***************************************************************
// Plush defaults
refreshRate: $.cookie('refreshRate') ? $.cookie('refreshRate') : 30, // refresh rate in seconds
containerWidth: $.cookie('containerWidth') ? $.cookie('containerWidth') : '90%', // refresh rate in seconds
containerWidth: $.cookie('containerWidth') ? $.cookie('containerWidth') : '90%', // width of all elements on page
queuePerPage: $.cookie('queuePerPage') ? $.cookie('queuePerPage') : 5, // pagination - nzbs per page
histPerPage: $.cookie('histPerPage') ? $.cookie('histPerPage') : 5, // pagination - nzbs per page
confirmDeleteQueue: $.cookie('confirmDeleteQueue') == 0 ? false : true, // confirm queue nzb removal
@ -18,7 +18,7 @@ jQuery(function($){
failedOnly: $.cookie('failedOnly') == 1 ? 1 : 0, // prevent refreshing when hovering queue
multiOps: $.cookie('multiOps') == 1 ? true : false, // is multi-operations menu visible in queue
multiOpsChecks: null,
// ***************************************************************
// $.plush.Init() -- initialize all the UI events
@ -33,7 +33,7 @@ jQuery(function($){
// ***************************************************************
// $.plush.InitAddNZB() -- "Add NZB" Methods
InitAddNZB : function() {
// Fetch NZB by URL/Newzbin Report ID
$('#addID').click(function(){ // also works when hitting enter because of <form>
@ -54,7 +54,7 @@ jQuery(function($){
success: $.plush.RefreshQueue
});
$("#addID_input").val('');
$('#nzbname').val('');
$('#nzbname').val('');
}
return false; // aborts <form> submission
});
@ -87,10 +87,10 @@ jQuery(function($){
}, // end $.plush.InitAddNZB()
// ***************************************************************
// $.plush.InitMainMenu() -- Main Menu Events
InitMainMenu : function() {
$('.juiButton').button();
@ -114,18 +114,18 @@ jQuery(function($){
function(){ $(this).addClass('sprite_q_queuesfHover'); },
function(){ $(this).removeClass('sprite_q_queuesfHover'); }
);
// modals
$("#help").colorbox({ inline:true, href:"#help_modal", title:$("#help").text(),
innerWidth:"375px", innerHeight:"350px", initialWidth:"375px", initialHeight:"350px", speed:0, opacity:0.7
});
$("#add_nzb").colorbox({ inline:true, href:"#add_nzb_modal", title:$("#add_nzb").text(),
innerWidth:"375px", innerHeight:"350px", initialWidth:"375px", initialHeight:"350px", speed:0, opacity:0.7
innerWidth:"375px", innerHeight:"370px", initialWidth:"375px", initialHeight:"370px", speed:0, opacity:0.7
});
$("#plush_options").colorbox({ inline:true, href:"#plush_options_modal", title:$("#plush_options").text(),
innerWidth:"375px", innerHeight:"350px", initialWidth:"375px", initialHeight:"350px", speed:0, opacity:0.7
});
// Max Speed main menu input -- don't change value on refresh when focused
$("#maxSpeed-option").focus(function(){ $.plush.focusedOnSpeedChanger = true; })
.blur(function(){ $.plush.focusedOnSpeedChanger = false; })
@ -144,49 +144,49 @@ jQuery(function($){
data: {mode:'config', name:'set_speedlimit', value: str, apikey: $.plush.apikey}
});
});
// Refresh rate
$("#refreshRate-option").val($.plush.refreshRate).change( function() {
$.plush.refreshRate = $("#refreshRate-option").val();
$.cookie('refreshRate', $.plush.refreshRate, { expires: 365 });
$.cookie('refreshRate', $.plush.refreshRate, { expires: 365, path: '/' });
$.plush.Refresh();
});
// Refresh rate
// Container width
$("#containerWidth-option").val($.plush.containerWidth).change( function() {
$.plush.containerWidth = $("#containerWidth-option").val();
$.cookie('containerWidth', $.plush.containerWidth, { expires: 365 });
$('#page-wrap').css('width',$.plush.containerWidth);
$.cookie('containerWidth', $.plush.containerWidth, { expires: 365, path: '/' });
$('#master-width').css('width',$.plush.containerWidth);
}).trigger('change');
// Confirm Queue Deletions toggle
$("#confirmDeleteQueue").attr('checked', $.plush.confirmDeleteQueue ).change( function() {
$.plush.confirmDeleteQueue = $("#confirmDeleteQueue").attr('checked');
$.cookie('confirmDeleteQueue', $.plush.confirmDeleteQueue ? 1 : 0, { expires: 365 });
$.cookie('confirmDeleteQueue', $.plush.confirmDeleteQueue ? 1 : 0, { expires: 365, path: '/' });
});
// Confirm History Deletions toggle
$("#confirmDeleteHistory").attr('checked', $.plush.confirmDeleteHistory ).change( function() {
$.plush.confirmDeleteHistory = $("#confirmDeleteHistory").attr('checked');
$.cookie('confirmDeleteHistory', $.plush.confirmDeleteHistory ? 1 : 0, { expires: 365 });
$.cookie('confirmDeleteHistory', $.plush.confirmDeleteHistory ? 1 : 0, { expires: 365, path: '/' });
});
// Block Refreshes on Hover toggle
$("#blockRefresh").attr('checked', $.plush.blockRefresh ).change( function() {
$.plush.blockRefresh = $("#blockRefresh").attr('checked');
$.cookie('blockRefresh', $.plush.blockRefresh ? 1 : 0, { expires: 365 });
$.cookie('blockRefresh', $.plush.blockRefresh ? 1 : 0, { expires: 365, path: '/' });
});
// Sabnzbd restart
$('#sabnzbd_restart').click( function(){
return confirm($(this).attr('rel'));
});
// Sabnzbd shutdown
$('#sabnzbd_shutdown').click( function(){
return confirm($(this).attr('rel'));
});
// Queue "Upon Completion" script
$("#onQueueFinish-option").change( function() {
if ($(this).val() && $(this).val()!="")
@ -199,7 +199,7 @@ jQuery(function($){
data: {mode:'queue', name:'change_complete_action', value: $(this).val(), apikey: $.plush.apikey}
});
});
// Queue Purge
$('#queue_purge').click(function(event) {
$.colorbox({ inline:true, href:"#queue_purge_modal", title:'',
@ -226,7 +226,7 @@ jQuery(function($){
});
});
// Queue sort (6-in-1)
$('#queue_sort_list .queue_sort').click(function(event) {
var sort, dir;
@ -245,7 +245,7 @@ jQuery(function($){
success: $.plush.RefreshQueue
});
});
// Queue pause intervals
$('#set_pause_list .set_pause').click(function(event) {
var minutes = $(event.target).attr('rel');
@ -259,7 +259,7 @@ jQuery(function($){
success: $.plush.RefreshQueue
});
});
$('#multiops_toggle').click(function(){
if( $('#multiops_bar').is(':visible') ) { // hide
$('#multiops_bar').hide();
@ -272,11 +272,11 @@ jQuery(function($){
$.plush.multiOpsChecks = new Array();
$('<input type="checkbox" class="multiops" />').appendTo('#queue tr td.nzb_status_col');
}
$.cookie('multiOps', $.plush.multiOps ? 1 : 0, { expires: 365 });
$.cookie('multiOps', $.plush.multiOps ? 1 : 0, { expires: 365, path: '/' });
});
if ($.plush.multiOps)
$('#multiops_toggle').trigger('click');
// Manual refresh
$('#manual_refresh_wrapper').click(function(e){
// prevent button text highlighting
@ -290,8 +290,8 @@ jQuery(function($){
});
}, // end $.plush.InitMainMenu()
// ***************************************************************
// $.plush.InitTooltips() -- title tootlips on hover
@ -311,7 +311,7 @@ jQuery(function($){
* http://www.gnu.org/licenses/gpl.html
*
*/
var $liveTip = $('<div id="livetip"></div>').hide().appendTo('body'),
$win = $(window),
showTip;
@ -386,7 +386,7 @@ jQuery(function($){
if (event.type == 'mousemove' && $link.data('tipActive')) {
tip.position(event);
}
});
},
@ -395,7 +395,7 @@ jQuery(function($){
// $.plush.InitQueue() - Queue Events
InitQueue : function() {
// Pause/resume toggle (queue)
$('#pause_resume').click(function(event) {
$('.queue-buttons-pause .sprite_q_menu_pausefor').removeClass('sprite_q_menu_pausefor_on');
@ -426,11 +426,11 @@ jQuery(function($){
$("#queue-pagination-perpage").change(function(event){
$.plush.queuecurpage = Math.floor($.plush.queuecurpage * $.plush.queuePerPage / $(event.target).val() );
$.plush.queuePerPage = $(event.target).val();
$.cookie('queuePerPage', $.plush.queuePerPage, { expires: 365 });
$.cookie('queuePerPage', $.plush.queuePerPage, { expires: 365, path: '/' });
$.plush.queueforcerepagination = true;
$.plush.RefreshQueue();
});
// Skip queue refresh on mouseover
$('#queue').hover(
function(){ $.plush.skipRefresh=true; }, // over
@ -447,7 +447,7 @@ jQuery(function($){
}
}
);
// NZB pause/resume individual toggle
$('#queue').delegate('.nzb_status','click',function(event){
var pid = $(this).parent().parent().attr('id');
@ -467,7 +467,7 @@ jQuery(function($){
});
}
});
// NZB individual deletion
$('#queue').delegate('.sprite_ql_cross','click', function(event) {
$('#delete_nzb_modal_title').text( $(this).parent().prev().prev().prev().children('a:first').text() );
@ -479,7 +479,7 @@ jQuery(function($){
});
return false;
});
// if (!$.plush.confirmDeleteQueue || confirm($.plush.Tconfirmation)){
/* delid = $(event.target).parent().parent().attr('id');
@ -521,7 +521,7 @@ jQuery(function($){
}
});
});
// 3-in-1 change nzb [category + processing + script]
$('#queue .change_cat, #queue .change_opts, #queue .change_script').live('change',function(e){
var val = $(this).parent().parent().attr('id');
@ -539,7 +539,7 @@ jQuery(function($){
}
});
});
// NZB icon hover states -- done here rather than in CSS:hover due to sprites
$('#queueTable tr').live('mouseover mouseout', function(event) {
if (event.type == 'mouseover') {
@ -570,16 +570,16 @@ jQuery(function($){
}
});
}
// Sustained binding of events for elements added to DOM
// Same idea as jQuery live(), but use jQuery livequery() plugin for functions/events not supported by live()
$('#queueTable').livequery(function() {
// Build pagination only when needed
if ( ( $.plush.queueforcerepagination && $.plush.queuenoofslots > $.plush.queuePerPage) || $.plush.queuenoofslots > $.plush.queuePerPage &&
Math.ceil($.plush.queueprevslots/$.plush.queuePerPage) !=
if ( ( $.plush.queueforcerepagination && $.plush.queuenoofslots > $.plush.queuePerPage) || $.plush.queuenoofslots > $.plush.queuePerPage &&
Math.ceil($.plush.queueprevslots/$.plush.queuePerPage) !=
Math.ceil($.plush.queuenoofslots/$.plush.queuePerPage) ) {
$.plush.queueforcerepagination = false;
if ( $("#queueTable tr:visible").length - 1 < 1 ) // don't leave stranded on non-page
$.plush.queuecurpage--;
@ -597,17 +597,17 @@ jQuery(function($){
$("#queue-pagination").html(''); // remove pages if history empty
}
$.plush.queueprevslots = $.plush.queuenoofslots; // for the next refresh
// Drag and drop sorting
$("#queueTable").tableDnD({
onDrop: function(table, row) {
if (table.tBodies[0].rows.length < 2)
return false;
// adjust odd row background coloring
$("tr:odd", '#queueTable').removeClass("alt");
$("tr:even", '#queueTable').addClass("alt");
$("tr:odd", '#queueTable').removeClass("alt");
$("tr:even", '#queueTable').addClass("alt");
// determine which position the repositioned row is at now
var val2;
@ -631,9 +631,9 @@ jQuery(function($){
}
}
});
}); // end livequery
$.plush.InitQueueMultiOperations();
}, // end $.plush.InitQueue()
@ -643,7 +643,7 @@ jQuery(function($){
// $.plush.InitQueueMultiOperations() - Queue Multi-Operation Events
InitQueueMultiOperations : function() {
// selections
$("#multiops_select_all").click(function(){
$("INPUT[type='checkbox']","#queueTable").attr('checked', true).trigger('change');
@ -680,7 +680,7 @@ jQuery(function($){
e.target.unselectable = "on";
e.target.style.MozUserSelect = "none";
});
// reset ui options
$('#multi_reset').click(function(){
$('#multi_status, #multi_cat, #multi_priority, #multi_pp, #multi_script').val('');
@ -688,7 +688,7 @@ jQuery(function($){
// apply options - cat/priority/pp/script
$('#multi_apply').click(function(){
var nzo_ids = "";
$("INPUT[type='checkbox']:checked","#queueTable").each( function() {
nzo_ids += "," + $(this).parent().parent().attr('id');
@ -770,19 +770,19 @@ jQuery(function($){
}, // end $.plush.InitQueueMultiOperations()
// ***************************************************************
// $.plush.InitHistory() -- History Events
InitHistory : function() {
// Search
$('#historySearchForm').submit(function(){
$.plush.histcurpage = 0;
$.plush.RefreshHistory();
return false;
});
// Purge
$('#hist_purge').click(function(event) {
$.colorbox({ inline:true, href:"#history_purge_modal", title:$(this).text(),
@ -837,18 +837,18 @@ jQuery(function($){
// Set history per-page preference
$("#history-pagination-perpage").val($.plush.histPerPage);
$.plush.histcurpage = 0; // default 1st page
// Pagination per-page selection
$("#history-pagination-perpage").change(function(event){
$.plush.histcurpage = Math.floor($.plush.histcurpage * $.plush.histPerPage / $(event.target).val() );
$.plush.histPerPage = $(event.target).val();
$.cookie('histPerPage', $.plush.histPerPage, { expires: 365 });
$.cookie('histPerPage', $.plush.histPerPage, { expires: 365, path: '/' });
$.plush.histforcerepagination = true;
if ($.plush.histPerPage=="1")
$("#history-pagination").html(''); // pagination rebuild not triggered on blank history (disabled)
$.plush.RefreshHistory();
});
// nzb retry, click 'add nzb' link to show upload form
$('#history .retry-nzbfile').live('click',function(){
$('#retry_modal_title').text( $(this).parent().parent().prev().children('a:first').text() );
@ -858,7 +858,7 @@ jQuery(function($){
});
return false;
});
// NZB individual removal
$('#history').delegate('.sprite_ql_cross','click', function(event) {
$('#delete_nzb_modal_title').text( $(this).parent().prev().prev().children('a:first').text() );
@ -875,12 +875,12 @@ jQuery(function($){
});
// if (!$.plush.confirmDeleteHistory || confirm($.plush.Tconfirmation)){
$('#delete_nzb_modal_remove_nzb, #delete_nzb_modal_remove_files','#delete_nzb_modal').click(function(e){
var del_files=0;
if ($(this).attr('id')=="delete_nzb_modal_remove_files")
del_files=1;
delid = $('#delete_nzb_modal_job').val();
mode = $('#delete_nzb_modal_mode').val();
$('#'+delid).fadeTo('normal',0.25);
@ -906,7 +906,7 @@ jQuery(function($){
});
return false;
});
// Remove NZB hover states -- done here rather than in CSS:hover due to sprites
$('#historyTable tr').live('mouseover mouseout', function(event) {
if (event.type == 'mouseover') {
@ -926,27 +926,27 @@ jQuery(function($){
// show all / show failed
$('#failed_only').change(function(){
$.plush.failedOnly = $("#failed_only").val();
$.cookie('failedOnly', $.plush.failedOnly, { expires: 365 });
$.cookie('failedOnly', $.plush.failedOnly, { expires: 365, path: '/' });
$.plush.RefreshHistory();
}).val($.plush.failedOnly);
// Sustained binding of events for elements added to DOM
$('#historyTable').livequery(function() {
// modal for viewing script logs
$('#historyTable .modal').colorbox({ innerWidth:"80%", innerHeight:"80%", initialWidth:"80%", initialHeight:"80%", speed:0, opacity:0.7 });
$("#historyTable .modal-detail").colorbox({ inline:true,
href: function(){return "#details-"+$(this).parent().parent().attr('id');},
title:function(){return $(this).text();},
innerWidth:"80%", innerHeight:"80%", initialWidth:"80%", initialHeight:"80%", speed:0, opacity:0.7 });
innerWidth:"80%", innerHeight:"300px", initialWidth:"80%", initialHeight:"300px", speed:0, opacity:0.7 });
// Build pagination only when needed
if ($.plush.histPerPage=="1") // disabled history
$("#history-pagination").html(''); // remove pages if history empty
else if ( ( $.plush.histforcerepagination && $.plush.histnoofslots > $.plush.histPerPage) || $.plush.histnoofslots > $.plush.histPerPage &&
Math.ceil($.plush.histprevslots/$.plush.histPerPage) !=
else if ( ( $.plush.histforcerepagination && $.plush.histnoofslots > $.plush.histPerPage) || $.plush.histnoofslots > $.plush.histPerPage &&
Math.ceil($.plush.histprevslots/$.plush.histPerPage) !=
Math.ceil($.plush.histnoofslots/$.plush.histPerPage) ) {
$.plush.histforcerepagination = false;
if ( $("#historyTable tr:visible").length - 1 < 1 ) // don't leave stranded on non-page
$.plush.histcurpage--;
@ -965,7 +965,7 @@ jQuery(function($){
$.plush.histprevslots = $.plush.histnoofslots; // for the next refresh
}); // end livequery
}, // end $.plush.InitHistory()
@ -973,9 +973,9 @@ jQuery(function($){
// $.plush.Refresh()
Refresh : function(force) {
clearTimeout($.plush.timeout); // prevent back-to-back refreshes
if (force || $.plush.refreshRate > 0) {
$.plush.RefreshQueue();
$.plush.RefreshHistory();
@ -990,9 +990,9 @@ jQuery(function($){
// ***************************************************************
// $.plush.RefreshQueue() -- fetch HTML data from queue.tmpl (AHAH)
RefreshQueue : function(page) {
// Skip refresh if cursor hovers queue, to prevent UI annoyance
if ($.plush.blockRefresh && $.plush.skipRefresh) {
$.plush.pendingQueueRefresh = true;
@ -1010,7 +1010,7 @@ jQuery(function($){
// Refresh state notification
$('#manual_refresh_wrapper').removeClass('refresh_skipped').addClass('refreshing');
// Fetch updated content from queue.tmpl
$.ajax({
type: "POST",
@ -1021,7 +1021,7 @@ jQuery(function($){
$('#manual_refresh_wrapper').addClass('refresh_skipped'); // Failed refresh notification
return;
}
$('.left_stats .initial-loading').hide();
$('#queue').html(result); // Replace queue contents with queue.tmpl
@ -1036,10 +1036,10 @@ jQuery(function($){
$('#manual_refresh_wrapper').removeClass('refreshing'); // Refresh state notification
}
});
}, // end $.plush.RefreshQueue()
// ***************************************************************
// $.plush.RefreshHistory() -- fetch HTML data from history.tmpl (AHAH)
@ -1048,25 +1048,25 @@ jQuery(function($){
// Skip refreshing when modal is open, which destroys colorbox rel prev/next
if ($.plush.modalOpen)
return;
// no longer a need for a pending history refresh (associated with nzb deletions)
$.plush.pendingHistoryRefresh = false;
// Deal with pagination for start/limit
if (typeof( page ) == 'undefined')
page = $.plush.histcurpage;
else if (page != $.plush.histcurpage)
$.plush.histcurpage = page;
if ($('#historySearchBox').val() && $.plush.histPerPage == "1") // history disabled
var data = {failed_only: $.plush.failedOnly, start: 0, limit: 0, search: $('#historySearchBox').val() };
else if ($('#historySearchBox').val())
var data = {failed_only: $.plush.failedOnly, start: ( page * $.plush.histPerPage ), limit: $.plush.histPerPage, search: $('#historySearchBox').val() };
else
var data = {failed_only: $.plush.failedOnly, start: ( page * $.plush.histPerPage ), limit: $.plush.histPerPage};
$.ajax({
type: "POST",
url: "history/",
@ -1081,16 +1081,16 @@ jQuery(function($){
$('#history-pagination span').removeClass('loading'); // Remove spinner graphic from pagination
}
});
}, // end $.plush.RefreshHistory()
// ***************************************************************
// $.plush.SetQueueStats(str) -- called from queue.tmpl
SetQueueStats : function(str) {
$('#queue_stats').html(str);
},
// ***************************************************************
// $.plush.SetQueueSpeedLimit(str) -- called from queue.tmpl
@ -1103,7 +1103,7 @@ jQuery(function($){
else
$('#speed-wrapper .sprite_q_menu_pausefor').removeClass('sprite_q_menu_pausefor_on');
},
// ***************************************************************
// $.plush.SetQueueFinishAction(str) -- called from queue.tmpl
@ -1115,13 +1115,13 @@ jQuery(function($){
else
$('.sprite_q_queue').removeClass('sprite_q_queue_on');
},
// ***************************************************************
// $.plush.SetQueuePauseInfo(paused,str) -- called from queue.tmpl
SetQueuePauseInfo : function(paused,str) {
$.plush.paused = paused;
// Pause/resume button state
if ( paused && !$('#pause_resume').hasClass('sprite_q_pause_on') )
$('#pause_resume').removeClass('sprite_q_pause').addClass('sprite_q_pause_on');
@ -1137,7 +1137,7 @@ jQuery(function($){
$('.queue-buttons-pause .sprite_q_menu_pausefor').removeClass('sprite_q_menu_pausefor_on');
}
},
// ***************************************************************
// $.plush.SetQueueETAStats(speed,kbpersec,timeleft,eta) -- called from queue.tmpl
@ -1151,7 +1151,7 @@ jQuery(function($){
$('#stats_speed').html(speed+"B/s");
$('#time-left').attr('title',eta); // Tooltip on "time left"
},
// ***************************************************************
// $.plush.SetWarnings(have_warnings,last_warning) -- called from queue.tmpl

30
interfaces/Plush/templates/static/stylesheets/colorschemes/gold/gold.css

@ -219,8 +219,24 @@ body {
width:190px;
}
#add_nzb_pp td{
padding: 5px;
}
#add_nzb_hr {
margin-top: 15px;
margin-bottom: 15px;
}
#add_nzb_hr hr {
height: 1px;
border: 0;
color: #B1B1B1;
background-color: #B1B1B1;
width: 95%;
text-align: left;
margin: 0 auto 0 0;
}
/* ---------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------
@ -249,11 +265,11 @@ body {
height: 30px;
}
.navigation ul#navigation_menu_left {
margin-left:110px;
margin-left:108px;
float:left;
}
.navigation ul#navigation_menu_right {
margin-right:110px;
margin-right:108px;
float:right;
}
@ -488,10 +504,16 @@ body {
#page-wrap {
clear:both;
margin-left: 98px;
margin-right: 98px;
}
#master-width {
clear:both;
margin: 0px auto;
width: 90%;
}
.box_banner_hr {
background-repeat: repeat-x;
height: 4px;
@ -1837,4 +1859,4 @@ padding: 5px 10px;
}
.apikey {
width:220px;
}
}

Loading…
Cancel
Save