]> git.saurik.com Git - cydia.git/commitdiff
Fixed empty Statistics on confirm page if all statistics have been removed.
authorGrant Paul <chpwn@chpwn.com>
Sun, 12 Dec 2010 07:11:07 +0000 (23:11 -0800)
committerGrant Paul <chpwn@chpwn.com>
Sun, 12 Dec 2010 07:11:07 +0000 (23:11 -0800)
MobileCydia.app/confirm.html
MobileCydia.app/confirm.js

index 5a4ed5544371743840e4c3df2c6667a7efda70d7..dbc6043daf04afb4cfff5a691ee2e1c2fe12807f 100644 (file)
@@ -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>
index efffdc4abe8a993be95e0060375eec7726ece24b..4c74b43cb93e282e267175e22ca353275bb4fda3 100644 (file)
@@ -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");