' +
'
' +
@@ -47,13 +54,6 @@ var tpl = '
' +
'
' +
'
';
-function progress(value, p, r) {
- var progress = value.toInt();
- var text = r.data['state'] + ' ' + value.toFixed(2) + '%'
- var width = this.style.match(/\w+:\s*(\d+)\w+/)[1].toInt() - 8;
- return progressBar(value.toInt(), width, text);
-}
-
function progressBar(progress, width, text) {
var progressWidth = (width / 100.0) * progress;
var barWidth = progressWidth.toInt() - 1;
@@ -81,6 +81,10 @@ function avail(value) {
return value.toFixed(3);
}
+function tracker(value) {
+ return String.format('
{0}
', value);
+}
+
Deluge.Torrents = {
Store: new Ext.data.SimpleStore({
fields: [
@@ -151,7 +155,7 @@ Deluge.Torrents.Grid = new Ext.grid.GridPanel({
{header: "Ratio", width: 60, sortable: true, renderer: avail, dataIndex: 'ratio'},
{header: "Avail.", width: 60, sortable: true, renderer: avail, dataIndex: 'avail'},
{header: "Added", width: 80, sortable: true, renderer: fdate, dataIndex: 'added'},
- {header: "Tracker", width: 120, sortable: true, renderer: Deluge.Formatters.plain, dataIndex: 'tracker'}
+ {header: "Tracker", width: 120, sortable: true, renderer: tracker, dataIndex: 'tracker'}
],
stripeRows: true,
autoExpandColumn: 'name',