diff options
Diffstat (limited to 'module/webui/themes/dark/tml/home.html')
-rw-r--r-- | module/webui/themes/dark/tml/home.html | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/module/webui/themes/dark/tml/home.html b/module/webui/themes/dark/tml/home.html index 68bf387af..340a905cf 100644 --- a/module/webui/themes/dark/tml/home.html +++ b/module/webui/themes/dark/tml/home.html @@ -29,12 +29,12 @@ var EntryManager = new Class({ {{ link.id }}, {% endif %} {% endfor %}]; - + this.entries = []; this.container = $('LinksAktiv'); - + this.parseFromContent(); - + this.json.startTimer(); }, parseFromContent: function(){ @@ -45,12 +45,12 @@ var EntryManager = new Class({ }, this); }, update: function(data){ - + try{ this.ids = this.entries.map(function(item){ return item.fid }); - + this.ids.filter(function(id){ return !this.ids.contains(id) },data).each(function(id){ @@ -59,13 +59,13 @@ var EntryManager = new Class({ 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.fid)){ - + var index = this.ids.indexOf(link.fid); this.entries[index].update(link) - + }else{ var entry = new LinkEntry(link.fid); entry.insert(link); @@ -74,7 +74,7 @@ var EntryManager = new Class({ this.container.adopt(entry.elements.tr,entry.elements.pgbTr); entry.fade.start('opacity', 1); entry.fadeBar.start('opacity', 1); - + } }, this) }catch(e){ @@ -150,7 +150,7 @@ var LinkEntry = new Class({ } }) }; - + 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.initEffects(); @@ -163,11 +163,11 @@ var LinkEntry = new Class({ this.bar = new Fx.Morph(this.elements.pgb, {unit: '%', duration: 5000, link: 'link', fps:30}); this.fade = new Fx.Tween(this.elements.tr); this.fadeBar = new Fx.Tween(this.elements.pgbTr); - + this.elements.remove.addEvent('click', function(){ new Request({method: 'get', url: '/json/abort_link/'+this.id}).send(); }.bind(this)); - + }, update: function(item){ this.elements.name.set('text', item.name); @@ -242,7 +242,7 @@ var LinkEntry = new Class({ </tr> </thead> <tbody id="LinksAktiv"> - + {% for link in content %} <tr id="link_{{ link.id }}"> <td id="link_{{ link.id }}_name">{{ link.name }}</td> @@ -260,7 +260,7 @@ var LinkEntry = new Class({ </td> </tr> {% endfor %} - + </tbody> </table> {% endblock %}
\ No newline at end of file |