]> git.saurik.com Git - cydia.git/blame - Cydia.app/confirm.js
Add UITableView support to ResetView.
[cydia.git] / Cydia.app / confirm.js
CommitLineData
affeffc7 1$(function () {
fefdda6b
JF
2 if (issues == null) {
3 $(".issues").remove();
affeffc7 4
fefdda6b
JF
5 var downloading = sizes[0];
6 if (downloading == "0.0 B")
7 $(".downloading").remove();
8 else
9 $("#downloading").html($.xml(downloading));
10
11 var resuming = sizes[1];
12 if (resuming == "0.0 B")
13 $(".resuming").remove();
14 else
affeffc7
JF
15 $("#resuming").html($.xml(resuming));
16
fefdda6b
JF
17 var size = sizes[2];
18 var negative;
affeffc7 19
fefdda6b
JF
20 if (size.charAt(0) != '-')
21 negative = false;
22 else {
23 negative = true;
24 size = size.substr(1);
25 }
26
f79a4512 27 $("#disk-key").html(cydia.localize(negative ? "DISK_FREEING" : "DISK_USING"));
fefdda6b
JF
28 $("#disk-value").html($.xml(size));
29 } else for (var i = 0; i != issues.length; ++i) {
f79a4512 30 document.title = cydia.localize("CANNOT_COMPLY");
b0ad8dee 31
fefdda6b 32 $("._issues").remove();
affeffc7 33
fefdda6b
JF
34 var issue = issues[i];
35
36 $("#issues").append(
aa5d0de7 37 "<label style=\"color: #704d4d\">" + $.xml(issue[0]) + "</label>" +
fefdda6b
JF
38 "<fieldset style=\"background-color: #dddddd\" class=\"clearfix\" id=\"i" + i + "\"></fieldset>"
39 );
40
41 for (var j = 1; j != issue.length; ++j) {
42 var entry = issue[j];
43 var type = entry[0];
44 if (type == "PreDepends")
45 type = "Depends";
744f398e
JF
46 var version = entry[1];
47 if (entry.length >= 4)
48 version += " " + entry[3];
bd0a4099 49 $("#i" + i).append("<div class=\"clearfix\"><div>" +
aa5d0de7 50 "<label>" + $.xml(type) + "</label>" +
744f398e 51 "<label>" + $.xml(version) + "</label>" +
189a73d0 52 "</div></div>");
fefdda6b
JF
53 }
54 }
affeffc7
JF
55
56 var keys = [
f79a4512
JF
57 "INSTALL",
58 "REINSTALL",
59 "UPGRADE",
60 "DOWNGRADE",
61 "REMOVE"
affeffc7
JF
62 ];
63
64 for (var i = 0; i != 5; ++i) {
65 var list = changes[i];
66 var length = list.length;
67
68 if (length != 0) {
189a73d0 69 $("#modifications").append("<div class=\"clearfix\"><div>" +
f79a4512 70 "<label>" + cydia.localize($.xml(keys[i])) + "</label>" +
aa5d0de7 71 "<label id=\"c" + i + "\"></label>" +
189a73d0 72 "</div></div>");
affeffc7
JF
73
74 var value = "";
75 for (var j = 0; j != length; ++j) {
76 if (j != 0)
77 value += "<br/>";
78 value += $.xml(list[j]);
79 }
80
fefdda6b 81 $("#c" + i).html(value);
affeffc7
JF
82 }
83 }
84});