- Fixed share ratio display in properties widget and in Web UI

This commit is contained in:
Christophe Dumez 2009-11-27 15:59:49 +00:00
parent 9ada7c809b
commit 4908458729
3 changed files with 18 additions and 16 deletions

View file

@ -101,10 +101,16 @@ var dynamicTable = new Class ({
else
return (tr2.getElements('td')[i].get('html').split(' ')[0].toInt() - tr1.getElements('td')[i].get('html').split(' ')[0].toInt());
default: // Ratio
var ratio1 = tr1.getElements('td')[i].get('html');
if(ratio1 == '∞')
ratio1 = '101.0';
var ratio2 = tr2.getElements('td')[i].get('html');
if(ratio2 == '∞')
ratio2 = '101.0';
if(order == "ASC")
return (tr1.getElements('td')[i].get('html').toFloat() - tr2.getElements('td')[i].get('html')).toFloat();
return (ratio1.toFloat() - ratio2.toFloat());
else
return (tr2.getElements('td')[i].get('html').toFloat() - tr1.getElements('td')[i].get('html')).toFloat();
return (ratio2.toFloat() - ratio1.toFloat());
}
},