Skip to content

Commit

Permalink
Merge pull request #2301 from TrimmingFool/master
Browse files Browse the repository at this point in the history
add size of viewed torrents to status row
  • Loading branch information
Novik committed Feb 12, 2022
2 parents 6ef8301 + 55899d3 commit a65e307
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ div.graph_tab {background-color: #FFFFFF; overflow: hidden; display: block; -moz
}
.graph_tab_grid { background-color: transparent; border: 2px solid #545454; }
.graph_tab_legend { background-color: #F0F0F0; border: 0px none transparent; }
.graph_tab_tooltip { border: 1px solid #fdd; padding: 2px; background-color: #fee; color: black; font-size: 11px; font-weight: bold; font-family: Tahoma, Arial, Helvetica, sans-serif; opacity: 0.80; }
.graph_tab_tooltip { position: absolute; border: 1px solid #fdd; padding: 2px; background-color: #fee; color: black; font-size: 11px; font-weight: bold; font-family: Tahoma, Arial, Helvetica, sans-serif; opacity: 0.80; }

div.table_tab {background-color: #FFFFFF; overflow: hidden; display: block; -moz-user-select: none; -moz-user-focus: normal; -moz-user-input: enabled; user-select: none; }
div#List {border: 1px solid #A0A0A0;}
Expand Down
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@
<table id="st_system" class="statuscell" cellpadding="0" cellspacing="0">
<tr>
<td><div class="sthdr"><script type="text/javascript"> document.write(theUILang.Torrents); </script>:</div></td><td><div class="stval" id="viewrows"></div></td>
<td><div class="stval" id="viewrows_size"></div></td>
</tr>
</table>
</td>
Expand Down
1 change: 0 additions & 1 deletion js/graph.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ rSpeedGraph.prototype.draw = function()
.addClass('graph_tab_tooltip')
.text(contents)
.css( {
position: 'absolute',
display: 'none',
top: y + 5,
left: x + 5,
Expand Down
15 changes: 13 additions & 2 deletions js/webui.js
Original file line number Diff line number Diff line change
Expand Up @@ -1754,7 +1754,7 @@ var theWebUI =
this.loadTorrents();
this.getTotal();

$('#viewrows').text(table.viewRows + '/' + table.rows);
this.updateViewRows(table)

// Cleanup memory leaks
tArray = null;
Expand All @@ -1769,6 +1769,17 @@ var theWebUI =
this.allLabelSize, showSize);
},

updateViewRows: function(table)
{
var viewSize = 0;
for (var sId in table.rowdata) {
var s = iv(this.torrents[sId].size);
viewSize += s * (table.rowdata[sId].enabled);
}
$('#viewrows').text(table.viewRows + '/' + table.rows);
$('#viewrows_size').text(theConverter.bytes(viewSize, 2));
},

setSpeedValues: function(tul,tdl)
{
this.speedGraph.addData(tul,tdl);
Expand Down Expand Up @@ -2187,7 +2198,7 @@ var theWebUI =
}
table.refreshRows();

$('#viewrows').text(table.viewRows + '/' + table.rows);
this.updateViewRows(table);
}
},

Expand Down
1 change: 0 additions & 1 deletion plugins/trafic/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ if(plugin.canChangeTabs())
.addClass('graph_tab_tooltip')
.text(contents)
.css( {
position: 'absolute',
display: 'none',
top: y + 5,
left: x + 5,
Expand Down

0 comments on commit a65e307

Please sign in to comment.