summaryrefslogtreecommitdiffstats
path: root/module/web/templates
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-01-20 19:41:43 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-01-20 19:41:43 +0100
commit07f280a220ab5bc5c3fb510ea00aecedfcec7564 (patch)
tree0a902013984fa8aee01ce162e437ee2dfd988e84 /module/web/templates
parentwebinterface - status icons (diff)
downloadpyload-07f280a220ab5bc5c3fb510ea00aecedfcec7564.tar.xz
queue page fully functional, some fixes
Diffstat (limited to 'module/web/templates')
-rw-r--r--module/web/templates/default/base.html8
-rw-r--r--module/web/templates/default/home.html4
-rw-r--r--module/web/templates/default/queue.html106
-rw-r--r--module/web/templates/default/window.html2
4 files changed, 104 insertions, 16 deletions
diff --git a/module/web/templates/default/base.html b/module/web/templates/default/base.html
index 692a951bc..2a2490088 100644
--- a/module/web/templates/default/base.html
+++ b/module/web/templates/default/base.html
@@ -36,7 +36,7 @@ document.addEvent("domready", function(){
});
var jsonStatus = new Request.JSON({
- url: "json/status",
+ url: "/json/status",
onSuccess: LoadJsonToContent,
secure: false,
async: true,
@@ -46,17 +46,17 @@ document.addEvent("domready", function(){
})
$('action_play').addEvent('click', function(){
- new Request({method: 'get', url: 'json/unpause'}).send();
+ new Request({method: 'get', url: '/json/unpause'}).send();
});
$('action_cancel').addEvent('click', function(){
- new Request({method: 'get', url: 'json/cancel'}).send();
+ new Request({method: 'get', url: '/json/cancel'}).send();
});
$('action_stop').addEvent('click', function(){
- new Request({method: 'get', url: 'json/pause'}).send();
+ new Request({method: 'get', url: '/json/pause'}).send();
});
jsonStatus.startTimer();
diff --git a/module/web/templates/default/home.html b/module/web/templates/default/home.html
index 4d499f6fe..ab2135800 100644
--- a/module/web/templates/default/home.html
+++ b/module/web/templates/default/home.html
@@ -168,7 +168,7 @@ var LinkEntry = new Class({
this.fadeBar = new Fx.Tween(this.elements.pgbTr);
this.elements.remove.addEvent('click', function(){
- new Request({method: 'get', url: 'json/remove_link/'+this.id}).send();
+ new Request({method: 'get', url: '/json/abort_link/'+this.id}).send();
}.bind(this));
},
@@ -222,7 +222,7 @@ Active Downloads
</td>
</tr>
<tr id="link_{{ link.id }}_pgb_tr">
- <td span="5">
+ <td colspan="5">
<div id="link_{{ link.id }}_pgb" class="progressBar" style="background-color: green; height:4px; width: {{ link.percent }}%;">&nbsp;</div>
</td>
</tr>
diff --git a/module/web/templates/default/queue.html b/module/web/templates/default/queue.html
index 7c78ac45b..aa21390a0 100644
--- a/module/web/templates/default/queue.html
+++ b/module/web/templates/default/queue.html
@@ -1,5 +1,76 @@
{% extends 'default/base.html' %}
+{% block head %}
+<script type="text/javascript">
+
+document.addEvent("domready", function(){
+ $$('.package').each(function(item){
+ id = item.get('id').match(/[0-9]+/)
+
+ imgs = item.getElements('img');
+ imgs[0].addEvent('click', function(e){
+ new Request({
+ method: 'get',
+ url: '/json/remove_package/'+this,
+ onSuccess: function(){
+ $('package_'+this).nix()
+ }.bind(this)
+ }).send();
+ e.stop();
+ }.bind(id));
+
+ imgs[1].addEvent('click', function(e){
+ new Request({
+ method: 'get',
+ url: '/json/restart_package/'+this,
+ onSuccess: function(){
+ $('package_'+this).nix()
+ }.bind(this)
+ }).send();
+ e.stop();
+ }.bind(id));
+
+
+ item.getElement('.packagename').addEvent('click', function(){
+
+ child = item.getElement('.children')
+ if (child.getStyle('display') == "block"){
+ child.dissolve();
+ }else{
+ child.reveal();
+ }
+ }.bind(item));
+
+
+ item.getElements('.child').each(function(child){
+ id = child.get('id').match(/[0-9]+/)
+ imgs = child.getElements('.child_secrow img')
+ imgs[0].addEvent('click', function(e){
+ new Request({
+ method: 'get',
+ url: '/json/remove_link/'+this,
+ onSuccess: function(){
+ $('file_'+this).nix()
+ }.bind(this)
+ }).send();
+ }.bind(id));
+
+ imgs[1].addEvent('click', function(e){
+ new Request({
+ method: 'get',
+ url: '/json/restart_link/'+this,
+ onSuccess: function(){
+ $('file_'+this).nix()
+ }.bind(this)
+ }).send();
+ }.bind(id));
+ });
+
+ })
+});
+</script>
+{% endblock %}
+
{% block title %}Queue - {{block.super}} {% endblock %}
{% block menu %}
@@ -11,17 +82,34 @@
{% block content %}
{% for package in content %}
-<div class="package"><div class="packagename" onclick="javascript: PackegeShower();">{{ package.package_name }}&nbsp;&nbsp;<a href=""><img width="10px" height="10px" src="{{ MEDIA_URL }}img/delete.png" /></a>&nbsp;&nbsp;<a href=""><img width="10px" height="10px" src="{{ MEDIA_URL }}img/arrow_refresh.png" /></a></div>
- <div class="children">
+<div id="package_{{package.id}}" class="package">
+ <div class="packagename" style="cursor: pointer;">
+ {{ package.package_name }}
+ &nbsp;&nbsp;
+ <img width="12px" height="12px" src="{{ MEDIA_URL }}img/delete.png" />
+ &nbsp;&nbsp;
+ <img style="margin-left: -10px" height="12px" src="{{ MEDIA_URL }}img/arrow_refresh.png" />
+ </div>
+ <div id="children_{{package.id}}" style="display: none;" class="children">
{% for child in package.children %}
- <div class="child"><span class="child_status">hierkommteinicondasaufdenstatusabgestimmtist</span>{{ child.filename }}<br />
- <div class="child_secrow"><span class="child_status">Downloaded</span>&nbsp;&nbsp;<span class="child_status">100 MB</span>&nbsp;&nbsp;<a href=""><img width="10px" height="10px" src="{{ MEDIA_URL }}img/delete.png" /></a>&nbsp;&nbsp;<a href=""><img width="10px" height="10px" src="{{ MEDIA_URL }}img/arrow_refresh.png" /></a></div></div>
- <div class="child"><span class="child_status">hierkommteinicondasaufdenstatusabgestimmtist</span>{{ child.filename }}<br />
- <div class="child_secrow"><span class="child_status">Downloaded</span>&nbsp;&nbsp;<span class="child_status">100 MB</span>&nbsp;&nbsp;<a href=""><img width="10px" height="10px" src="{{ MEDIA_URL }}img/delete.png" /></a>&nbsp;&nbsp;<a href=""><img width="10px" height="10px" src="{{ MEDIA_URL }}img/arrow_refresh.png" /></a></div></div>
- <div class="child"><span class="child_status">hierkommteinicondasaufdenstatusabgestimmtist</span>{{ child.filename }}<br />
- <div class="child_secrow"><span class="child_status">Downloaded</span>&nbsp;&nbsp;<span class="child_status">100 MB</span>&nbsp;&nbsp;<a href=""><img width="10px" height="10px" src="{{ MEDIA_URL }}img/delete.png" /></a>&nbsp;&nbsp;<a href=""><img width="10px" height="10px" src="{{ MEDIA_URL }}img/arrow_refresh.png" /></a></div></div>
+ <div class="child" id="file_{{child.id}}">
+ <span class="child_status">
+ <img src="/media/default/img/status_{{child.status_type}}.png" style="width: 12px; height:12px;"/>
+ </span>
+ <span style="font-size: 15px">{{ child.filename }}</span><br />
+ <div class="child_secrow">
+ <span class="child_status">{{ child.status_type }}</span>{{child.status_error}}&nbsp;
+ <span class="child_status">{{ child.size }} KB</span>
+ <span class="child_status">{{ child.plugin }}</span>
+ <span class="child_status">Folder: {{child.folder}}</span>
+ &nbsp;&nbsp;
+ <img style="cursor: pointer;" width="10px" height="10px" src="{{ MEDIA_URL }}img/delete.png" />
+ &nbsp;&nbsp;
+ <img style="cursor: pointer;margin-left: -4px" width="10px" height="10px" src="{{ MEDIA_URL }}img/arrow_refresh.png" />
+ </div>
+ </div>
{% endfor %}
- </div>
+ </div>
</div>
{% endfor %}
<!--table >
diff --git a/module/web/templates/default/window.html b/module/web/templates/default/window.html
index 5f2dc594a..7e5c249e6 100644
--- a/module/web/templates/default/window.html
+++ b/module/web/templates/default/window.html
@@ -4,7 +4,7 @@
<!--<div style="width: 900px; text-align: right;"><b onclick="AddBox();">[Close]</b></div>-->
<div id="add_box" class="myform">
-<form id="add_form" action="json/add_package" method="POST" enctype="multipart/form-data">
+<form id="add_form" action="/json/add_package" method="POST" enctype="multipart/form-data">
<h1>Add Package</h1>
<p>Paste your links or upload a container.</p>
<label>Name