diff options
author | Grant Paul <chpwn@chpwn.com> | 2010-12-11 23:11:07 -0800 |
---|---|---|
committer | Grant Paul <chpwn@chpwn.com> | 2010-12-11 23:11:07 -0800 |
commit | a2bd7a7305fc62b7e218cb206b56f35d3a880f28 (patch) | |
tree | 241973814262e39c60f235ef59e0c6c491ddd45f | |
parent | dd5f81612e2906f740d09566145cd1be72a4c227 (diff) |
Fixed empty Statistics on confirm page if all statistics have been removed.
-rw-r--r-- | MobileCydia.app/confirm.html | 4 | ||||
-rw-r--r-- | MobileCydia.app/confirm.js | 19 |
2 files changed, 15 insertions, 8 deletions
diff --git a/MobileCydia.app/confirm.html b/MobileCydia.app/confirm.html index 5a4ed55..dbc6043 100644 --- a/MobileCydia.app/confirm.html +++ b/MobileCydia.app/confirm.html @@ -15,8 +15,8 @@ <div><p><span style="color: red; font-weight: bold" localize="NOTE"></span>: <span localize="CANNOT_COMPLY_EX"></span></p></div> </fieldset> -<label class="_issues" localize="STATISTICS"></label> -<fieldset class="_issues"> +<label class="_issues statistics" localize="STATISTICS"></label> +<fieldset class="_issues statistics"> <div class="downloading"><div> <label localize="DOWNLOADING"></label> <label id="downloading"></label> diff --git a/MobileCydia.app/confirm.js b/MobileCydia.app/confirm.js index efffdc4..4c74b43 100644 --- a/MobileCydia.app/confirm.js +++ b/MobileCydia.app/confirm.js @@ -1,18 +1,25 @@ $(function () { if (issues == null) { $(".issues").remove(); + var removed = 0; var downloading = sizes[0]; - if (downloading == "0.0 B") + if (downloading == "0.0 B") { $(".downloading").remove(); - else - $("#downloading").html($.xml(downloading)); + removed += 1; + } else { + $("#downloading").html($.xml(downloading)); + } var resuming = sizes[1]; - if (resuming == "0.0 B") + if (resuming == "0.0 B") { $(".resuming").remove(); - else - $("#resuming").html($.xml(resuming)); + removed += 1; + } else { + $("#resuming").html($.xml(resuming)); + } + + if (removed >= 2) $(".statistics").remove(); } else for (var i = 0; i != issues.length; ++i) { document.title = cydia.localize("CANNOT_COMPLY"); |