summaryrefslogtreecommitdiffstats
path: root/module/web/templates/default
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-08-02 15:17:24 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-08-02 15:17:24 +0200
commit58f38f399387b44b956e785e1d578d0f621354e6 (patch)
tree8e9a6bb9f659db8f58d73b0c416572a8212abfcf /module/web/templates/default
parentyoutube, new file format (diff)
downloadpyload-58f38f399387b44b956e785e1d578d0f621354e6.tar.xz
fixes, cleanup, summary for each package
Diffstat (limited to 'module/web/templates/default')
-rw-r--r--module/web/templates/default/collector.html58
-rw-r--r--module/web/templates/default/edit_package.html13
-rw-r--r--module/web/templates/default/package_ui.js12
-rw-r--r--module/web/templates/default/queue.html30
4 files changed, 23 insertions, 90 deletions
diff --git a/module/web/templates/default/collector.html b/module/web/templates/default/collector.html
deleted file mode 100644
index 20221b899..000000000
--- a/module/web/templates/default/collector.html
+++ /dev/null
@@ -1,58 +0,0 @@
-{% extends 'default/base.html' %}
-{% block head %}
-
-<script type="text/javascript" src="/package_ui.js"></script>
-
-<script type="text/javascript">
-
-document.addEvent("domready", function(){
- var pUI = new PackageUI("url", 0);
-});
-</script>
-{% endblock %}
-
-{% block title %}{{_("Collector")}} - {{super()}} {% endblock %}
-{% block subtitle %}{{_("Collector")}}{% endblock %}
-
-{% block pageactions %}
-<ul id="page-actions-more">
- <li id="del_finished"><a style="padding: 0; font-weight: bold;" href="#">{{_("Delete Finished")}}</a></li>
- <li id="restart_failed"><a style="padding: 0; font-weight: bold;" href="#">{{_("Restart Failed")}}</a></li>
-</ul>
-{% endblock %}
-
-{% block content %}
-
-<ul id="package-list" style="list-style: none; padding-left: 0; margin-top: -10px;">
-{% for package in content %}
- <li>
-<div id="package_{{package.pid}}" class="package">
- <div class="order" style="display: none;">{{ package.order }}</div>
-
- <div class="packagename" style="cursor: pointer;">
- <img class="package_drag" src="/media/default/img/folder.png" style="cursor: move; margin-bottom: -2px">
- <span class="name">{{package.name}}</span>
- &nbsp;&nbsp;
- <span class="buttons" style="opacity:0">
- <img title="{{_("Delete Package")}}" style="cursor: pointer" width="12px" height="12px" src="/media/default/img/delete.png" />
- &nbsp;&nbsp;
- <img title="{{_("Restart Package")}}" style="margin-left: -10px; cursor: pointer" height="12px" src="/media/default/img/arrow_refresh.png" />
- &nbsp;&nbsp;
- <img title="{{_("Edit Package")}}" style="margin-left: -10px; cursor: pointer" height="12px" src="/media/default/img/pencil.png" />
- &nbsp;&nbsp;
- <img title="{{_("Move Package to Queue")}}" style="margin-left: -10px; cursor: pointer" height="12px" src="/media/default/img/package_go.png" />
- </span>
- </div>
- <div id="children_{{package.pid}}" style="display: none;" class="children">
- <span class="child_secrow">{{_("Folder:")}} <span class="folder">{{package.folder}}</span> | {{_("Password:")}} <span class="password">{{package.password}}</span> | {{_("Priority:")}} <span class="prio">{{package.priority}}</span></span>
- <ul id="sort_children_{{package.pid}}" style="list-style: none; padding-left: 0">
- </ul>
- </div>
-</div>
- </li>
-{% endfor %}
-</ul>
-
-{% include "default/edit_package.html" %}
-
-{% endblock %}
diff --git a/module/web/templates/default/edit_package.html b/module/web/templates/default/edit_package.html
index 0c9dcff42..f02540aaa 100644
--- a/module/web/templates/default/edit_package.html
+++ b/module/web/templates/default/edit_package.html
@@ -13,19 +13,6 @@
</label>
<input id="pack_folder" name="pack_folder" type="text" size="20" />
-<label for="pack_prio">{{_("Priority")}}
-<span class="small">{{_("Priority of the package.")}}</span>
-</label>
- <select name="pack_prio" id="pack_prio">
- <option value="3">{{_("highest")}}</option>
- <option value="2">{{_("higher")}}</option>
- <option value="1">{{_("high")}}</option>
- <option value="0" selected="selected">{{_("normal")}}</option>
- <option value="-1">{{_("low")}}</option>
- <option value="-2">{{_("lower")}}</option>
- <option value="-3">{{_("lowest")}}</option>
- </select>
-
<label for="pack_pws">{{_("Password")}}
<span class="small">{{_("List of passwords used for unrar.")}}</span>
</label>
diff --git a/module/web/templates/default/package_ui.js b/module/web/templates/default/package_ui.js
index 0b938910a..1d0e25dd6 100644
--- a/module/web/templates/default/package_ui.js
+++ b/module/web/templates/default/package_ui.js
@@ -176,7 +176,6 @@ var Package = new Class({
this.name = this.ele.getElements('.name')[0];
this.folder = this.ele.getElements('.folder')[0];
this.password = this.ele.getElements('.password')[0];
- this.prio = this.ele.getElements('.prio')[0];
imgs[1].addEvent('click', this.deletePackage.bind(this));
@@ -352,16 +351,6 @@ var Package = new Class({
$("pack_folder").set("value", this.folder.get("text"));
$("pack_pws").set("value", this.password.get("text"));
- var prio = 3;
- $("pack_prio").getChildren("option").each(function(item, index) {
- item.erase("selected");
- if (prio.toString() == this.prio.get("text")) {
- item.set("selected", "selected");
- }
- prio--;
- }.bind(this));
-
-
show_pack();
event.stop();
},
@@ -371,7 +360,6 @@ var Package = new Class({
this.name.set("text", $("pack_name").get("value"));
this.folder.set("text", $("pack_folder").get("value"));
this.password.set("text", $("pack_pws").get("value"));
- this.prio.set("text", $("pack_prio").get("value"));
hide_pack();
event.stop();
},
diff --git a/module/web/templates/default/queue.html b/module/web/templates/default/queue.html
index b9ec525a1..e1535a12e 100644
--- a/module/web/templates/default/queue.html
+++ b/module/web/templates/default/queue.html
@@ -6,13 +6,19 @@
<script type="text/javascript">
document.addEvent("domready", function(){
- var pUI = new PackageUI("url",1);
+ var pUI = new PackageUI("url", {{ target }});
});
</script>
{% endblock %}
-{% block title %}{{_("Queue")}} - {{super()}} {% endblock %}
-{% block subtitle %}{{_("Queue")}}{% endblock %}
+{% if target %}
+ {% set name = _("Queue") %}
+{% else %}
+ {% set name = _("Collector") %}
+{% endif %}
+
+{% block title %}{{name}} - {{super()}} {% endblock %}
+{% block subtitle %}{{name}}{% endblock %}
{% block pageactions %}
<ul id="page-actions-more">
@@ -23,14 +29,13 @@ document.addEvent("domready", function(){
{% block content %}
-
<ul id="package-list" style="list-style: none; padding-left: 0; margin-top: -10px;">
{% for package in content %}
<li>
<div id="package_{{package.pid}}" class="package">
<div class="order" style="display: none;">{{ package.order }}</div>
- <div class="packagename" style="cursor: pointer;">
+ <div class="packagename" style="cursor: pointer">
<img class="package_drag" src="/media/default/img/folder.png" style="cursor: move; margin-bottom: -2px">
<span class="name">{{package.name}}</span>
&nbsp;&nbsp;
@@ -41,11 +46,22 @@ document.addEvent("domready", function(){
&nbsp;&nbsp;
<img title="{{_("Edit Package")}}" style="margin-left: -10px; cursor: pointer" height="12px" src="/media/default/img/pencil.png" />
&nbsp;&nbsp;
- <img title="{{_("Move Package to Collector")}}" style="margin-left: -10px; cursor: pointer" height="12px" src="/media/default/img/package_go.png" />
+ <img title="{{_("Move Package")}}" style="margin-left: -10px; cursor: pointer" height="12px" src="/media/default/img/package_go.png" />
</span>
</div>
+ {% set progress = (package.linksdone * 100) / package.linkstotal %}
+
+ <div id="progress" style="border-radius: 4px; border: 1px solid #AAAAAA; width: 50%; height: 1em">
+ <div style="width: {{ progress }}%; height: 100%; background-color: #add8e6;"></div>
+ <label style="font-size: 0.8em; font-weight: bold; padding-left: 5px; position: relative; top: -17px">
+ {{ package.sizedone|formatsize }} / {{ package.sizetotal|formatsize }}</label>
+ <label style="font-size: 0.8em; font-weight: bold; padding-right: 5px ;float: right; position: relative; top: -17px">
+ {{ package.linksdone }} / {{ package.linkstotal }}</label>
+ </div>
+ <div style="clear: both; margin-bottom: -10px"></div>
+
<div id="children_{{package.pid}}" style="display: none;" class="children">
- <span class="child_secrow">{{_("Folder:")}} <span class="folder">{{package.folder}}</span> | {{_("Password:")}} <span class="password">{{package.password}}</span> | {{_("Priority:")}} <span class="prio">{{package.priority}}</span></span>
+ <span class="child_secrow">{{_("Folder:")}} <span class="folder">{{package.folder}}</span> | {{_("Password:")}} <span class="password">{{package.password}}</span></span>
<ul id="sort_children_{{package.pid}}" style="list-style: none; padding-left: 0">
</ul>
</div>