]>
Commit | Line | Data |
---|---|---|
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 | ||
17 | var size = sizes[2]; | |
18 | var negative; | |
19 | ||
20 | if (size.charAt(0) != '-') | |
21 | negative = false; | |
22 | else { | |
23 | negative = true; | |
24 | size = size.substr(1); | |
25 | } | |
26 | ||
27 | $("#disk-key").html(negative ? "Disk Freeing" : "Disk Using"); | |
28 | $("#disk-value").html($.xml(size)); | |
29 | } else for (var i = 0; i != issues.length; ++i) { | |
30 | document.title = "Cannot Comply"; | |
31 | ||
32 | $("._issues").remove(); | |
33 | ||
34 | var issue = issues[i]; | |
35 | ||
36 | $("#issues").append( | |
37 | "<label style=\"color: #704d4d\">" + issue[0] + "</label>" + | |
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"; | |
46 | $("#i" + i).append("<div><div>" + | |
47 | "<label>" + type + "</label>" + | |
48 | "<div>" + entry[1] + " " + entry[3] + "</div>" + | |
49 | "</div></div>"); | |
50 | } | |
51 | } | |
52 | ||
53 | var keys = [ | |
54 | "Install", | |
55 | "Reinstall", | |
56 | "Upgrade", | |
57 | "Downgrade", | |
58 | "Remove" | |
59 | ]; | |
60 | ||
61 | for (var i = 0; i != 5; ++i) { | |
62 | var list = changes[i]; | |
63 | var length = list.length; | |
64 | ||
65 | if (length != 0) { | |
66 | $("#modifications").append("<div class=\"clearfix\"><div>" + | |
67 | "<label>" + keys[i] + "</label>" + | |
68 | "<div id=\"c" + i + "\"></div>" + | |
69 | "</div></div>"); | |
70 | ||
71 | var value = ""; | |
72 | for (var j = 0; j != length; ++j) { | |
73 | if (j != 0) | |
74 | value += "<br/>"; | |
75 | value += $.xml(list[j]); | |
76 | } | |
77 | ||
78 | $("#c" + i).html(value); | |
79 | } | |
80 | } | |
81 | }); |