diff options
Diffstat (limited to 'module/web/templates/default/base.html')
-rw-r--r-- | module/web/templates/default/base.html | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/module/web/templates/default/base.html b/module/web/templates/default/base.html index 0cebeb5d8..692a951bc 100644 --- a/module/web/templates/default/base.html +++ b/module/web/templates/default/base.html @@ -45,6 +45,20 @@ document.addEvent("domready", function(){ limit: 30000
})
+ $('action_play').addEvent('click', function(){
+ new Request({method: 'get', url: 'json/unpause'}).send();
+ });
+
+
+ $('action_cancel').addEvent('click', function(){
+ new Request({method: 'get', url: 'json/cancel'}).send();
+ });
+
+
+ $('action_stop').addEvent('click', function(){
+ new Request({method: 'get', url: 'json/pause'}).send();
+ });
+
jsonStatus.startTimer();
});
@@ -58,8 +72,8 @@ document.addEvent("domready", function(){ function LoadJsonToContent(data)
{
$("speed").set('text', Math.round(data.speed*100)/100);
- $("aktiv").set('text', data.queue);
- $("queue").set('text', data.total);
+ $("aktiv").set('text', data.activ);
+ $("aktiv_from").set('text', data.queue);
}
function show(){
add_bg.set('opacity', 0);
@@ -147,9 +161,9 @@ function AddBox() {% if perms.pyload.can_change_status %}
<ul id="page-actions2">
- <li id="action_play"><a href="/json/unpause" class="action play" accesskey="o" rel="nofollow">Play</a></li>
- <li id="action_stop"><a href="" class="action cancel" accesskey="o" rel="nofollow">Cancel</a></li>
- <li id="action_stop"><a href="/json/pause" class="action stop" accesskey="o" rel="nofollow">Stop</a></li>
+ <li id="action_play"><a href="#" class="action play" accesskey="o" rel="nofollow">Play</a></li>
+ <li id="action_cancel"><a href="#" class="action cancel" accesskey="o" rel="nofollow">Cancel</a></li>
+ <li id="action_stop"><a href="#" class="action stop" accesskey="o" rel="nofollow">Stop</a></li>
<li id="action_add"><a href="javascript:AddBox();" class="action stop" accesskey="o" rel="nofollow" >Add</a></li>
</ul>
{% endif %}
@@ -157,7 +171,7 @@ function AddBox() {% if perms.pyload.can_see_dl %}
<ul id="page-actions">
<li><a class="action backlink">Speed: <b id="speed">{{ status.speed }}</b> kb/s</a></li>
- <li><a class="action cog">Active: <b id="aktiv">{{ status.queue }}</b> / <b id="aktiv_from">{{ status.total }}</b></a></li>
+ <li><a class="action cog">Active: <b id="aktiv">{{ status.activ }}</b> / <b id="aktiv_from">{{ status.queue }}</b></a></li>
<li><a href="" class="action revisions" accesskey="o" rel="nofollow">Reload page</a></li>
</ul><br />
{% endif %}
|