diff options
author | Jay Freeman (saurik) <saurik@saurik.com> | 2008-12-09 03:14:28 +0000 |
---|---|---|
committer | Jay Freeman (saurik) <saurik@saurik.com> | 2010-09-30 07:09:04 +0000 |
commit | fefdda6bcfde597dac30b4f18341a0598cff98c1 (patch) | |
tree | d4694a464519bd3eb932c439355fefec27ee996d /Cydia.app/confirm.js | |
parent | 22f8bed9669aee2b33cbc4da49eea3106e91c338 (diff) |
Fixed an XHTML issue, finished confirmation Javascript, and finally enhanced Test script.
Diffstat (limited to 'Cydia.app/confirm.js')
-rw-r--r-- | Cydia.app/confirm.js | 66 |
1 files changed, 45 insertions, 21 deletions
diff --git a/Cydia.app/confirm.js b/Cydia.app/confirm.js index 09a121c..9210295 100644 --- a/Cydia.app/confirm.js +++ b/Cydia.app/confirm.js @@ -1,28 +1,52 @@ $(function () { - var downloading = sizes[0]; - if (downloading == "0.0 B") - $(".downloading").remove(); - else - $("#downloading").html($.xml(downloading)); + if (issues == null) { + $(".issues").remove(); - var resuming = sizes[1]; - if (resuming == "0.0 B") - $(".resuming").remove(); - else + var downloading = sizes[0]; + if (downloading == "0.0 B") + $(".downloading").remove(); + else + $("#downloading").html($.xml(downloading)); + + var resuming = sizes[1]; + if (resuming == "0.0 B") + $(".resuming").remove(); + else $("#resuming").html($.xml(resuming)); - var size = sizes[2]; - var negative; + var size = sizes[2]; + var negative; - if (size.charAt(0) != '-') - negative = false; - else { - negative = true; - size = size.substr(1); - } + if (size.charAt(0) != '-') + negative = false; + else { + negative = true; + size = size.substr(1); + } + + $("#disk-key").html(negative ? "Disk Freeing" : "Disk Using"); + $("#disk-value").html($.xml(size)); + } else for (var i = 0; i != issues.length; ++i) { + $("._issues").remove(); - $("#disk-key").html(negative ? "Disk Freeing" : "Disk Using"); - $("#disk-value").html($.xml(size)); + var issue = issues[i]; + + $("#issues").append( + "<label style=\"color: #704d4d\">" + issue[0] + "</label>" + + "<fieldset style=\"background-color: #dddddd\" class=\"clearfix\" id=\"i" + i + "\"></fieldset>" + ); + + for (var j = 1; j != issue.length; ++j) { + var entry = issue[j]; + var type = entry[0]; + if (type == "PreDepends") + type = "Depends"; + $("#i" + i).append("<div>" + + "<label>" + type + "</label>" + + "<div>" + entry[1] + " " + entry[3] + "</div>" + + "</div>"); + } + } var keys = [ "Install", @@ -39,7 +63,7 @@ $(function () { if (length != 0) { $("#modifications").append("<div class=\"clearfix\">" + "<label>" + keys[i] + "</label>" + - "<div id=\"i" + i + "\"></div>" + + "<div id=\"c" + i + "\"></div>" + "</div>"); var value = ""; @@ -49,7 +73,7 @@ $(function () { value += $.xml(list[j]); } - $("#i" + i).html(value); + $("#c" + i).html(value); } } }); |