summaryrefslogtreecommitdiffstats
path: root/module/web/templates/default/home.html
diff options
context:
space:
mode:
Diffstat (limited to 'module/web/templates/default/home.html')
-rw-r--r--module/web/templates/default/home.html110
1 files changed, 62 insertions, 48 deletions
diff --git a/module/web/templates/default/home.html b/module/web/templates/default/home.html
index 7359e326c..89074dd26 100644
--- a/module/web/templates/default/home.html
+++ b/module/web/templates/default/home.html
@@ -77,6 +77,7 @@ var EntryManager = new Class({
}
}, this)
+
}catch(e){
//alert(e)
}
@@ -105,20 +106,29 @@ var LinkEntry = new Class({
},
insert: function(item){
try{
+
+
this.elements = {
tr: new Element('tr', {
'html': '',
'styles':{
- 'opacity': 0
+ 'opacity': 0,
}
}),
+ status: new Element('td', {
+ 'html': ' ',
+ }),
+ statusspan: new Element('span', {
+ 'html': item.statusmsg,
+ 'class': 'label label-default',
+ 'styles':{
+
+ }
+ }),
name: new Element('td', {
'html': item.name
}),
- status: new Element('td', {
- 'html': item.statusmsg
- }),
info: new Element('td', {
'html': item.info
}),
@@ -139,20 +149,35 @@ var LinkEntry = new Class({
}
}),
pgbTr: new Element('tr', {
- 'html':''
+ 'html':'',
+ 'styles':{
+ 'border-top-color': '#fff',
+ }
+ }),
+ progress: new Element('div', {
+ 'html':'',
+ 'class':'progress',
+ 'styles':{
+ 'margin-bottom': '0px',
+ }
}),
pgb: new Element('div', {
- 'html': ' ',
+ 'html':'',
+ 'class':'progress-bar progress-bar-striped active',
+ 'role':'progress',
'styles':{
- 'height': '4px',
'width': item.percent+'%',
'background-color': '#ddd'
}
})
+
};
- this.elements.tr.adopt(this.elements.name,this.elements.status,this.elements.info,this.elements.bleft,new Element('td').adopt(this.elements.percent,this.elements.remove));
- this.elements.pgbTr.adopt(new Element('td',{'colspan':5}).adopt(this.elements.pgb));
+
+ this.elements.status.adopt(this.elements.statusspan);
+ this.elements.progress.adopt(this.elements.pgb);
+ this.elements.tr.adopt(this.elements.status,this.elements.name,this.elements.info,this.elements.bleft,new Element('td').adopt(this.elements.percent,this.elements.remove));
+ this.elements.pgbTr.adopt(new Element('td',{'colspan':5}).adopt(this.elements.progress));
this.initEffects();
}catch(e){
alert(e)
@@ -171,15 +196,27 @@ var LinkEntry = new Class({
},
update: function(item){
this.elements.name.set('text', item.name);
- this.elements.status.set('text', item.statusmsg);
+ this.elements.statusspan.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));
+ if (item.statusmsg == "waiting") {
+ this.elements.statusspan.set('class', 'label label-warning')
+ } else if (item.statusmsg == "starting") {
+ this.elements.statusspan.set('class', 'label label-info')
+ } else if (item.statusmsg == "downloading") {
+ this.elements.statusspan.set('class', 'label label-success')
+ } else if (item.stausmsg == "extracting") {
+ this.elements.statusspan.set('class', 'label label-primary')
+ } else {
+ this.elements.statusspan.set('class', 'label label-default')
+ }
if(!operafix)
{
+
this.bar.start({
'width': item.percent,
- 'background-color': [Math.round(120/100*item.percent),100,100].hsbToRgb().rgbToHex()
+ 'background-color': [Math.round(120/100*item.percent),80,70].hsbToRgb().rgbToHex()
});
}
else
@@ -188,9 +225,10 @@ var LinkEntry = new Class({
'styles', {
'height': '4px',
'width': item.percent+'%',
- 'background-color': [Math.round(120/100*item.percent),100,100].hsbToRgb().rgbToHex(),
+ 'background-color': [Math.round(50/200*item.percent),0,200].hsbToRgb().rgbToHex(),
});
}
+
},
remove: function(){
this.fade.start('opacity',0).chain(function(){this.elements.tr.dispose();}.bind(this));
@@ -198,57 +236,32 @@ var LinkEntry = new Class({
}
});
+
+
</script>
-
-{% endblock %}
-
-{% block subtitle %}
-{{_("Active Downloads")}}
-{% endblock %}
-
-{% block menu %}
-<li class="selected">
- <a href="/" title=""><img src="/media/default/img/head-menu-home.png" alt="" /> {{_("Home")}}</a>
-</li>
-<li>
- <a href="/queue/" title=""><img src="/media/default/img/head-menu-queue.png" alt="" /> {{_("Queue")}}</a>
-</li>
-<li>
- <a href="/collector/" title=""><img src="/media/default/img/head-menu-collector.png" alt="" /> {{_("Collector")}}</a>
-</li>
-<li>
- <a href="/downloads/" title=""><img src="/media/default/img/head-menu-development.png" alt="" /> {{_("Downloads")}}</a>
-</li>
-{#<li>#}
-{# <a href="/filemanager/" title=""><img src="/media/default/img/head-menu-download.png" alt="" /> {{_("FileManager")}}</a>#}
-{#</li>#}
-<li class="right">
- <a href="/logs/" class="action index" accesskey="x" rel="nofollow"><img src="/media/default/img/head-menu-index.png" alt="" />{{_("Logs")}}</a>
-</li>
-<li class="right">
- <a href="/settings/" class="action index" accesskey="x" rel="nofollow"><img src="/media/default/img/head-menu-config.png" alt="" />{{_("Config")}}</a>
-</li>
{% endblock %}
+{% block subtitle %}{{_("Active Downloads")}}{% endblock %}
{% block content %}
-<table width="100%" class="queue">
+<table class="table" style="width:100%;">
<thead>
<tr class="header">
- <th>{{_("Name")}}</th>
<th>{{_("Status")}}</th>
+ <th>{{_("Name")}}</th>
<th>{{_("Information")}}</th>
<th>{{_("Size")}}</th>
<th>{{_("Progress")}}</th>
</tr>
</thead>
+</br>
<tbody id="LinksAktiv">
{% for link in content %}
<tr id="link_{{ link.id }}">
- <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 }}_bleft">{{ link.format_size }}</td>
+ <td id="link_{{ link.id }}_status"><span class="label label-{% if link.status == 'downloading' %}success{% endif %}{% if link.status == 'extracting' %}primary{% endif %}{% if link.status == 'starting' %}warning{% else %}default{% endif %}">{{ link.status }}</span></td>
+ <td id="link_{{ link.id }}_name">{{ link.name }}</td>
+ <td id="link_{{ link.id }}_info">{{ link.info }}</td>
+ <td id="link_{{ link.id }}_bleft">{{ link.format_size }}</td>
<td>
<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"/>
@@ -263,4 +276,5 @@ var LinkEntry = new Class({
</tbody>
</table>
-{% endblock %} \ No newline at end of file
+</div>
+{% endblock %}