Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add size of viewed torrents to status row #2301

Merged
merged 2 commits into from
Feb 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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