]> git.saurik.com Git - cydia.git/blame - Cydia.app/confirm.js
Add UITableView support to ResetView.
[cydia.git] / Cydia.app / confirm.js
CommitLineData
f464053e 1$(function () {
e9c3b052
JF
2 if (issues == null) {
3 $(".issues").remove();
f464053e 4
e9c3b052
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
f464053e
JF
15 $("#resuming").html($.xml(resuming));
16
e9c3b052
JF
17 var size = sizes[2];
18 var negative;
f464053e 19
e9c3b052
JF
20 if (size.charAt(0) != '-')
21 negative = false;
22 else {
23 negative = true;
24 size = size.substr(1);
25 }
26
6932575e 27 $("#disk-key").html(cydia.localize(negative ? "DISK_FREEING" : "DISK_USING"));
e9c3b052
JF
28 $("#disk-value").html($.xml(size));
29 } else for (var i = 0; i != issues.length; ++i) {
6932575e 30 document.title = cydia.localize("CANNOT_COMPLY");
83105e6e 31
e9c3b052 32 $("._issues").remove();
f464053e 33
e9c3b052
JF
34 var issue = issues[i];
35
36 $("#issues").append(
04700693 37 "<label style=\"color: #704d4d\">" + $.xml(issue[0]) + "</label>" +
e9c3b052
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";
e4765783
JF
46 var version = entry[1];
47 if (entry.length >= 4)
48 version += " " + entry[3];
b456f1c9 49 $("#i" + i).append("<div class=\"clearfix\"><div>" +
04700693 50 "<label>" + $.xml(type) + "</label>" +
e4765783 51 "<label>" + $.xml(version) + "</label>" +
6e673d99 52 "</div></div>");
e9c3b052
JF
53 }
54 }
f464053e
JF
55
56 var keys = [
6932575e
JF
57 "INSTALL",
58 "REINSTALL",
59 "UPGRADE",
60 "DOWNGRADE",
61 "REMOVE"
f464053e
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) {
6e673d99 69 $("#modifications").append("<div class=\"clearfix\"><div>" +
6932575e 70 "<label>" + cydia.localize($.xml(keys[i])) + "</label>" +
04700693 71 "<label id=\"c" + i + "\"></label>" +
6e673d99 72 "</div></div>");
f464053e
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
e9c3b052 81 $("#c" + i).html(value);
f464053e
JF
82 }
83 }
84});