Further fix for progress bar display in webui

When first loading webui is browser this.style is undefined and p.style
contains the width of the progress column however after this point
p.style contains the width of the previous column so need to use
this.style which now represents the progress column width.
This commit is contained in:
Calum Lind 2012-02-18 18:50:49 +00:00
parent 3744bdad69
commit d1f788ebe3
3 changed files with 13 additions and 3 deletions

View file

@ -8824,7 +8824,12 @@ Deluge.Toolbar = Ext.extend(Ext.Toolbar, {
value = new Number(value);
var progress = value;
var text = r.data['state'] + ' ' + value.toFixed(2) + '%';
var width = new Number(this.style.match(/\w+:\s*(\d+)\w+/)[1]);
if ( this.style ) {
var style = this.style
} else {
var style = p.style
}
var width = new Number(style.match(/\w+:\s*(\d+)\w+/)[1]);
return Deluge.progressBar(value, width - 8, text);
}
function seedsRenderer(value, p, r) {

File diff suppressed because one or more lines are too long

View file

@ -51,7 +51,12 @@
value = new Number(value);
var progress = value;
var text = r.data['state'] + ' ' + value.toFixed(2) + '%';
var width = new Number(this.style.match(/\w+:\s*(\d+)\w+/)[1]);
if ( this.style ) {
var style = this.style
} else {
var style = p.style
}
var width = new Number(style.match(/\w+:\s*(\d+)\w+/)[1]);
return Deluge.progressBar(value, width - 8, text);
}
function seedsRenderer(value, p, r) {