minor fixes and remove statistics when no downloads, better way to hide them comming soon

This commit is contained in:
hamza zia 2013-03-24 09:57:56 +01:00
parent 02a7a595a0
commit 3cc42f1626
2 changed files with 4 additions and 4 deletions

View File

@ -207,7 +207,7 @@
<!-- }}} -->
<!-- {{{ downloads -->
<div ng-show="!totalAria2Downloads()" class="hero-unit">
<div ng-show="!totalAria2Downloads() && totalAria2Downloads() > getDownloads()" class="hero-unit">
<h3>Currently no downloads in line to display, use the Add download button to start downloading files!</h3>
</div>
@ -522,12 +522,12 @@
<!-- }}} -->
<!-- {{{ global statistics -->
<h3>Global Statistics</h3>
<h3 ng-show="totalAria2Downloads()">Global Statistics</h3>
<div class="download-graph"
dspeed="gstats.downloadSpeed"
uspeed="gstats.uploadSpeed"
dgraph>
dgraph ng-show="totalAria2Downloads()">
</div>
<!-- }}} -->

View File

@ -38,7 +38,7 @@ angular.module('webui.services.utils', [])
mergeMap: function(arr, dest, func) {
if (!dest) dest = [];
for (i = 0; i < dest.length; i++) {
for (var i = 0; i < dest.length; i++) {
if (i >= arr.length) {
// remove the deleted downloads
dest.splice(i, dest.length - arr.length);