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