From c52ee8392501ee916d85fd9da75aa08a8f014493 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Tue, 12 Jul 2011 23:42:11 +0200 Subject: removed server_methods, please test everything entirely --- module/web/templates/default/home.html | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) (limited to 'module/web/templates/default/home.html') 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({ {{ link.name }} {{ link.status }} {{ link.info }} - {{ link.format_size }} + {{ link.format_size }} - {{ link.percent }}% /{{ link.kbleft }} + {{ link.percent }}% /{{ link.bleft }} -- cgit v1.2.3