summaryrefslogtreecommitdiffstats
path: root/module/web/templates
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-07-12 23:42:11 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-07-12 23:42:11 +0200
commitc52ee8392501ee916d85fd9da75aa08a8f014493 (patch)
tree1cd802f64a1ffe0173473fd1f044e014bee59fff /module/web/templates
parentchanged version strings (diff)
downloadpyload-c52ee8392501ee916d85fd9da75aa08a8f014493.tar.xz
removed server_methods, please test everything entirely
Diffstat (limited to 'module/web/templates')
-rw-r--r--module/web/templates/default/base.html4
-rw-r--r--module/web/templates/default/collector.html8
-rw-r--r--module/web/templates/default/home.html27
-rw-r--r--module/web/templates/default/info.html11
-rw-r--r--module/web/templates/default/package_ui.js1
-rw-r--r--module/web/templates/default/queue.html8
-rw-r--r--module/web/templates/default/settings.html10
-rw-r--r--module/web/templates/default/settings_item.html84
8 files changed, 78 insertions, 75 deletions
diff --git a/module/web/templates/default/base.html b/module/web/templates/default/base.html
index 6eb71f737..13538cf08 100644
--- a/module/web/templates/default/base.html
+++ b/module/web/templates/default/base.html
@@ -86,7 +86,7 @@ document.addEvent("domready", function(){
function LoadJsonToContent(data)
{
$("speed").set('text', Math.round(data.speed*100)/100);
- $("aktiv").set('text', data.activ);
+ $("aktiv").set('text', data.active);
$("aktiv_from").set('text', data.queue);
$("aktiv_total").set('text', data.total);
@@ -257,7 +257,7 @@ function AddBox(){
<li><span class="time">{{_("Download:")}}</span><a id="time" style=" background-color: {% if status.download %}#8ffc25{% else %} #fc6e26{% endif %}; padding-left: 0cm; padding-right: 0.1cm; "> {% if status.download %}{{_("on")}}{% else %}{{_("off")}}{% endif %}</a></li>
<li><span class="reconnect">{{_("Reconnect:")}}</span><a id="reconnect" style=" background-color: {% if status.reconnect %}#8ffc25{% else %} #fc6e26{% endif %}; padding-left: 0cm; padding-right: 0.1cm; "> {% if status.reconnect %}{{_("on")}}{% else %}{{_("off")}}{% endif %}</a></li>
<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.activ }}</b> / <b id="aktiv_from">{{ status.queue }}</b> / <b id="aktiv_total">{{ status.total }}</b></a></li>
+ <li><a class="action cog">{{_("Active:")}} <b id="aktiv">{{ status.active }}</b> / <b id="aktiv_from">{{ status.queue }}</b> / <b id="aktiv_total">{{ status.total }}</b></a></li>
<li><a href="" class="action revisions" accesskey="o" rel="nofollow">{{_("Reload page")}}</a></li>
</ul>
{% endif %}
diff --git a/module/web/templates/default/collector.html b/module/web/templates/default/collector.html
index 2683d8ee5..20221b899 100644
--- a/module/web/templates/default/collector.html
+++ b/module/web/templates/default/collector.html
@@ -24,9 +24,9 @@ document.addEvent("domready", function(){
{% block content %}
<ul id="package-list" style="list-style: none; padding-left: 0; margin-top: -10px;">
-{% for id, package in content %}
+{% for package in content %}
<li>
-<div id="package_{{id}}" class="package">
+<div id="package_{{package.pid}}" class="package">
<div class="order" style="display: none;">{{ package.order }}</div>
<div class="packagename" style="cursor: pointer;">
@@ -43,9 +43,9 @@ document.addEvent("domready", function(){
<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_{{id}}" style="display: none;" class="children">
+ <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_{{id}}" style="list-style: none; padding-left: 0">
+ <ul id="sort_children_{{package.pid}}" style="list-style: none; padding-left: 0">
</ul>
</div>
</div>
diff --git a/module/web/templates/default/home.html b/module/web/templates/default/home.html
index 1239d381d..0efb1bcf8 100644
--- a/module/web/templates/default/home.html
+++ b/module/web/templates/default/home.html
@@ -48,7 +48,7 @@ var EntryManager = new Class({
try{
this.ids = this.entries.map(function(item){
- return item.id
+ return item.fid
});
this.ids.filter(function(id){
@@ -56,21 +56,21 @@ var EntryManager = new Class({
},data).each(function(id){
var index = this.ids.indexOf(id);
this.entries[index].remove();
- this.entries = this.entries.filter(function(item){return item.id != this},id);
+ this.entries = this.entries.filter(function(item){return item.fid != this},id);
this.ids = this.ids.erase(id)
}, this);
data.links.each(function(link, i){
- if (this.ids.contains(link.id)){
+ if (this.ids.contains(link.fid)){
- var index = this.ids.indexOf(link.id);
+ var index = this.ids.indexOf(link.fid);
this.entries[index].update(link)
}else{
- var entry = new LinkEntry(link.id);
+ var entry = new LinkEntry(link.fid);
entry.insert(link);
this.entries.push(entry);
- this.ids.push(link.id);
+ this.ids.push(link.fid);
this.container.adopt(entry.elements.tr,entry.elements.pgbTr);
entry.fade.start('opacity', 1);
entry.fadeBar.start('opacity', 1);
@@ -86,7 +86,8 @@ var EntryManager = new Class({
var LinkEntry = new Class({
initialize: function(id){
- this.id = id
+ this.fid = id;
+ this.id = id;
},
parse: function(){
this.elements = {
@@ -94,7 +95,7 @@ var LinkEntry = new Class({
name: $("link_{id}_name".substitute({id: this.id})),
status: $("link_{id}_status".substitute({id: this.id})),
info: $("link_{id}_info".substitute({id: this.id})),
- bleft: $("link_{id}_kbleft".substitute({id: this.id})),
+ bleft: $("link_{id}_bleft".substitute({id: this.id})),
percent: $("link_{id}_percent".substitute({id: this.id})),
remove: $("link_{id}_remove".substitute({id: this.id})),
pgbTr: $("link_{id}_pgb_tr".substitute({id: this.id})),
@@ -122,10 +123,10 @@ var LinkEntry = new Class({
'html': item.info
}),
bleft: new Element('td', {
- 'html': HumanFileSize(item.size)
+ 'html': humanFileSize(item.size)
}),
percent: new Element('span', {
- 'html': item.percent+ '% / '+ HumanFileSize(item.size-item.bleft)
+ 'html': item.percent+ '% / '+ humanFileSize(item.size-item.bleft)
}),
remove: new Element('img',{
'src': 'media/default/img/control_cancel.png',
@@ -173,7 +174,7 @@ var LinkEntry = new Class({
this.elements.status.set('text', item.statusmsg);
this.elements.info.set('text', item.info);
this.elements.bleft.set('text', item.format_size);
- this.elements.percent.set('text', item.percent+ '% / '+ HumanFileSize(item.size-item.bleft));
+ this.elements.percent.set('text', item.percent+ '% / '+ humanFileSize(item.size-item.bleft));
if(!operafix)
{
this.bar.start({
@@ -247,9 +248,9 @@ var LinkEntry = new Class({
<td id="link_{{ link.id }}_name">{{ link.name }}</td>
<td id="link_{{ link.id }}_status">{{ link.status }}</td>
<td id="link_{{ link.id }}_info">{{ link.info }}</td>
- <td id="link_{{ link.id }}_kbleft">{{ link.format_size }}</td>
+ <td id="link_{{ link.id }}_bleft">{{ link.format_size }}</td>
<td>
- <span id="link_{{ link.id }}_percent">{{ link.percent }}% /{{ link.kbleft }}</span>
+ <span id="link_{{ link.id }}_percent">{{ link.percent }}% /{{ link.bleft }}</span>
<img id="link_{{ link.id }}_remove" style="vertical-align: middle; margin-right: -20px; margin-left: 5px; margin-top: -2px; cursor:pointer;" src="media/default/img/control_cancel.png"/>
</td>
</tr>
diff --git a/module/web/templates/default/info.html b/module/web/templates/default/info.html
index 14f5a734f..77ae57376 100644
--- a/module/web/templates/default/info.html
+++ b/module/web/templates/default/info.html
@@ -21,9 +21,14 @@
<h3>{{ _("Support") }}</h3>
<ul>
- <li style="font-weight:bold;"><a href="http://pyload.org/wiki" target="_blank">Wiki</a></li>
- <li style="font-weight:bold;"><a href="http://forum.pyload.org/" target="_blank">Forum</a></li>
- <li style="font-weight:bold;"><a href="http://pyload.org/irc/" target="_blank">Chat</a></li>
+ <li style="font-weight:bold;">
+ <a href="http://pyload.org/wiki" target="_blank">Wiki</a>
+ &nbsp;&nbsp;|&nbsp;&nbsp;
+ <a href="http://forum.pyload.org/" target="_blank">Forum</a>
+ &nbsp;&nbsp;|&nbsp;&nbsp;
+ <a href="http://pyload.org/irc/" target="_blank">Chat</a>
+ </li>
+ <li style="font-weight:bold;"><a href="http://docs.pyload.org" target="_blank">Documentation</a></li>
<li style="font-weight:bold;"><a href="https://bitbucket.org/spoob/pyload/overview" target="_blank">Development</a></li>
<li style="font-weight:bold;"><a href="https://bitbucket.org/spoob/pyload/issues?status=new&status=open" target="_blank">Issue Tracker</a></li>
diff --git a/module/web/templates/default/package_ui.js b/module/web/templates/default/package_ui.js
index cee29dfd8..0b938910a 100644
--- a/module/web/templates/default/package_ui.js
+++ b/module/web/templates/default/package_ui.js
@@ -204,6 +204,7 @@ var Package = new Class({
var ul = $("sort_children_{id}".substitute({"id": this.id}));
ul.erase("html");
data.links.each(function(link) {
+ link.id = link.fid;
var li = new Element("li", {
"style": {
"margin-left": 0
diff --git a/module/web/templates/default/queue.html b/module/web/templates/default/queue.html
index 104369c11..b9ec525a1 100644
--- a/module/web/templates/default/queue.html
+++ b/module/web/templates/default/queue.html
@@ -25,9 +25,9 @@ document.addEvent("domready", function(){
<ul id="package-list" style="list-style: none; padding-left: 0; margin-top: -10px;">
-{% for id, package in content %}
+{% for package in content %}
<li>
-<div id="package_{{id}}" class="package">
+<div id="package_{{package.pid}}" class="package">
<div class="order" style="display: none;">{{ package.order }}</div>
<div class="packagename" style="cursor: pointer;">
@@ -44,9 +44,9 @@ document.addEvent("domready", function(){
<img title="{{_("Move Package to Collector")}}" style="margin-left: -10px; cursor: pointer" height="12px" src="/media/default/img/package_go.png" />
</span>
</div>
- <div id="children_{{id}}" style="display: none;" class="children">
+ <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_{{id}}" style="list-style: none; padding-left: 0">
+ <ul id="sort_children_{{package.pid}}" style="list-style: none; padding-left: 0">
</ul>
</div>
</div>
diff --git a/module/web/templates/default/settings.html b/module/web/templates/default/settings.html
index a74fe4261..d5484f06e 100644
--- a/module/web/templates/default/settings.html
+++ b/module/web/templates/default/settings.html
@@ -131,10 +131,9 @@
</tr>
</thead>
- {% for plugin, accounts in conf.accs.iteritems() %}
-
- {% for account in accounts %}
+ {% for account in conf.accs %}
+ {% set plugin = account.type %}
<tr>
<td>
<span style="padding:5px">{{ plugin }}</span>
@@ -193,11 +192,9 @@
value="True"/>
</td>
</tr>
- {% endfor %}
{% endfor %}
</table>
-
<button id="account_submit" type="submit" class="styled_button">{{_("Submit")}}</button>
<button id="account_add" style="margin-left: 0" type="submit" class="styled_button">{{_("Add")}}</button>
</form>
@@ -223,12 +220,11 @@
<span class="small">{{_("Choose the hoster for your account.")}}</span>
</label>
<select name=account_type id="account_type">
- {% for type in conf.accs.iterkeys()|sort %}
+ {% for type in types|sort %}
<option value="{{ type }}">{{ type }}</option>
{% endfor %}
</select>
-
<button id="account_add_button" type="submit">{{_("Add")}}</button>
<button id="account_reset" style="margin-left: 0" type="reset">{{_("Reset")}}</button>
<div class="spacer"></div>
diff --git a/module/web/templates/default/settings_item.html b/module/web/templates/default/settings_item.html
index 593050bd2..92223557d 100644
--- a/module/web/templates/default/settings_item.html
+++ b/module/web/templates/default/settings_item.html
@@ -1,45 +1,45 @@
<table class="settable">
- {% for okey, option in section.iteritems() %}
- {% if okey != "desc" %}
- <tr>
- <td><label for="{{skey}}|{{okey}}"
- style="color:#424242;">{{ option.desc }}:</label></td>
- <td>
- {% if option.type == "bool" %}
- <select id="{{skey}}|{{okey}}" name="{{skey}}|{{okey}}">
- <option {% if option.value %} selected="selected"
- {% endif %}value="True">{{ _("on") }}</option>
- <option {% if not option.value %} selected="selected"
- {% endif %}value="False">{{ _("off") }}</option>
- </select>
- {% elif ";" in option.type %}
- <select id="{{skey}}|{{okey}}" name="{{skey}}|{{okey}}">
- {% for entry in option.list %}
- <option {% if option.value == entry %}
- selected="selected" {% endif %}>{{ entry }}</option>
- {% endfor %}
- </select>
- {% elif option.type == "folder" %}
- <input name="{{skey}}|{{okey}}" type="text"
- id="{{skey}}|{{okey}}" value="{{option.value}}"/>
- <input name="browsebutton" type="button"
- onclick="ifield = document.getElementById('{{skey}}|{{okey}}'); pathchooser = window.open('{% if option.value %}{{ "/pathchooser/" + option.value|quotepath }}{% else %}{{ pathroot }}{% endif %}', 'pathchooser', 'scrollbars=yes,toolbar=no,menubar=no,statusbar=no,width=650,height=300'); pathchooser.ifield = ifield; window.ifield = ifield;"
- value="{{_("Browse")}}"/>
- {% elif option.type == "file" %}
- <input name="{{skey}}|{{okey}}" type="text"
- id="{{skey}}|{{okey}}" value="{{option.value}}"/>
- <input name="browsebutton" type="button"
- onclick="ifield = document.getElementById('{{skey}}|{{okey}}'); filechooser = window.open('{% if option.value %}{{ "/filechooser/" + option.value|quotepath }}{% else %}{{ fileroot }}{% endif %}', 'filechooser', 'scrollbars=yes,toolbar=no,menubar=no,statusbar=no,width=650,height=300'); filechooser.ifield = ifield; window.ifield = ifield;"
- value="{{_("Browse")}}"/>
- {% elif option.type == "password" %}
- <input id="{{skey}}|{{okey}}" name="{{skey}}|{{okey}}"
- type="password" value="{{option.value}}"/>
- {% else %}
- <input id="{{skey}}|{{okey}}" name="{{skey}}|{{okey}}"
- type="text" value="{{option.value}}"/>
- {% endif %}
- </td>
- </tr>
- {% endif %}
+ {% set skey = section.name %}
+ {% for option in section.items %}
+ {% set okey = option.name %}
+ <tr>
+ <td><label for="{{skey}}|{{okey}}"
+ style="color:#424242;">{{ option.description }}:</label></td>
+ <td>
+ {% if option.type == "bool" %}
+ <select id="{{skey}}|{{okey}}" name="{{skey}}|{{okey}}">
+ <option {% if option.value %} selected="selected"
+ {% endif %}value="True">{{ _("on") }}</option>
+ <option {% if not option.value %} selected="selected"
+ {% endif %}value="False">{{ _("off") }}</option>
+ </select>
+ {% elif option.type|type == "<type 'list'>" %}
+ <select id="{{skey}}|{{okey}}" name="{{skey}}|{{okey}}">
+ {% for entry in option.type %}
+ <option {% if option.value == entry %}
+ selected="selected" {% endif %}>{{ entry }}</option>
+ {% endfor %}
+ </select>
+ {% elif option.type == "folder" %}
+ <input name="{{skey}}|{{okey}}" type="text"
+ id="{{skey}}|{{okey}}" value="{{option.value}}"/>
+ <input name="browsebutton" type="button"
+ onclick="ifield = document.getElementById('{{skey}}|{{okey}}'); pathchooser = window.open('{% if option.value %}{{ "/pathchooser/" + option.value|quotepath }}{% else %}{{ pathroot }}{% endif %}', 'pathchooser', 'scrollbars=yes,toolbar=no,menubar=no,statusbar=no,width=650,height=300'); pathchooser.ifield = ifield; window.ifield = ifield;"
+ value="{{_("Browse")}}"/>
+ {% elif option.type == "file" %}
+ <input name="{{skey}}|{{okey}}" type="text"
+ id="{{skey}}|{{okey}}" value="{{option.value}}"/>
+ <input name="browsebutton" type="button"
+ onclick="ifield = document.getElementById('{{skey}}|{{okey}}'); filechooser = window.open('{% if option.value %}{{ "/filechooser/" + option.value|quotepath }}{% else %}{{ fileroot }}{% endif %}', 'filechooser', 'scrollbars=yes,toolbar=no,menubar=no,statusbar=no,width=650,height=300'); filechooser.ifield = ifield; window.ifield = ifield;"
+ value="{{_("Browse")}}"/>
+ {% elif option.type == "password" %}
+ <input id="{{skey}}|{{okey}}" name="{{skey}}|{{okey}}"
+ type="password" value="{{option.value}}"/>
+ {% else %}
+ <input id="{{skey}}|{{okey}}" name="{{skey}}|{{okey}}"
+ type="text" value="{{option.value}}"/>
+ {% endif %}
+ </td>
+ </tr>
{% endfor %}
</table> \ No newline at end of file