]> git.saurik.com Git - cydia.git/blame - Cydia.app/confirm.js
Fix Manage buttons/title.
[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 15 $("#resuming").html($.xml(resuming));
fefdda6b 16 } else for (var i = 0; i != issues.length; ++i) {
f79a4512 17 document.title = cydia.localize("CANNOT_COMPLY");
b0ad8dee 18
fefdda6b 19 $("._issues").remove();
affeffc7 20
fefdda6b
JF
21 var issue = issues[i];
22
23 $("#issues").append(
aa5d0de7 24 "<label style=\"color: #704d4d\">" + $.xml(issue[0]) + "</label>" +
fefdda6b
JF
25 "<fieldset style=\"background-color: #dddddd\" class=\"clearfix\" id=\"i" + i + "\"></fieldset>"
26 );
27
28 for (var j = 1; j != issue.length; ++j) {
29 var entry = issue[j];
30 var type = entry[0];
31 if (type == "PreDepends")
32 type = "Depends";
744f398e
JF
33 var version = entry[1];
34 if (entry.length >= 4)
35 version += " " + entry[3];
bd0a4099 36 $("#i" + i).append("<div class=\"clearfix\"><div>" +
aa5d0de7 37 "<label>" + $.xml(type) + "</label>" +
744f398e 38 "<label>" + $.xml(version) + "</label>" +
189a73d0 39 "</div></div>");
fefdda6b
JF
40 }
41 }
affeffc7
JF
42
43 var keys = [
f79a4512
JF
44 "INSTALL",
45 "REINSTALL",
46 "UPGRADE",
47 "DOWNGRADE",
48 "REMOVE"
affeffc7
JF
49 ];
50
51 for (var i = 0; i != 5; ++i) {
52 var list = changes[i];
53 var length = list.length;
54
55 if (length != 0) {
189a73d0 56 $("#modifications").append("<div class=\"clearfix\"><div>" +
f79a4512 57 "<label>" + cydia.localize($.xml(keys[i])) + "</label>" +
aa5d0de7 58 "<label id=\"c" + i + "\"></label>" +
189a73d0 59 "</div></div>");
affeffc7
JF
60
61 var value = "";
62 for (var j = 0; j != length; ++j) {
63 if (j != 0)
64 value += "<br/>";
65 value += $.xml(list[j]);
66 }
67
fefdda6b 68 $("#c" + i).html(value);
affeffc7
JF
69 }
70 }
71});