]> git.saurik.com Git - cydia.git/blob - MobileCydia.app/confirm.js
Leave Package::source_ nil until first use.
[cydia.git] / MobileCydia.app / confirm.js
1 $(function () {
2 if (issues == null) {
3 $(".issues").remove();
4
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
15 $("#resuming").html($.xml(resuming));
16 } else for (var i = 0; i != issues.length; ++i) {
17 document.title = cydia.localize("CANNOT_COMPLY");
18
19 $(".queue").remove();
20
21 $("._issues").remove();
22
23 var issue = issues[i];
24
25 $("#issues").append(
26 "<label style=\"color: #704d4d\">" + $.xml(issue[0]) + "</label>" +
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";
35 var version = entry[1];
36 if (entry.length >= 4)
37 version += " " + entry[3];
38 $("#i" + i).append("<div class=\"clearfix\"><div>" +
39 "<label>" + $.xml(type) + "</label>" +
40 "<label>" + $.xml(version) + "</label>" +
41 "</div></div>");
42 }
43 }
44
45 var keys = [
46 "INSTALL",
47 "REINSTALL",
48 "UPGRADE",
49 "DOWNGRADE",
50 "REMOVE"
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) {
58 $("#modifications").append("<div class=\"clearfix\"><div>" +
59 "<label>" + cydia.localize($.xml(keys[i])) + "</label>" +
60 "<label id=\"c" + i + "\"></label>" +
61 "</div></div>");
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
70 $("#c" + i).html(value);
71 }
72 }
73 });