diff options
Diffstat (limited to 'Cydia.app/confirm.js')
-rw-r--r-- | Cydia.app/confirm.js | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/Cydia.app/confirm.js b/Cydia.app/confirm.js new file mode 100644 index 0000000..579c3f5 --- /dev/null +++ b/Cydia.app/confirm.js @@ -0,0 +1,55 @@ +$(function () { + var downloading = sizes[0]; + if (downloading == "0.0B") + $(".downloading").remove(); + else + $("#downloading").html($.xml(downloading)); + + var resuming = sizes[1]; + if (resuming == "0.0B") + $(".resuming").remove(); + else + $("#resuming").html($.xml(resuming)); + + var size = sizes[2]; + var negative; + + if (size.charAt(0) != '-') + negative = false; + else { + negative = true; + size = size.substr(1); + } + + $("#disk-key").html(negative ? "Disk Freeing" : "Disk Using"); + $("#disk-value").html($.xml(size)); + + var keys = [ + "Install", + "Reinstall", + "Upgrade", + "Downgrade", + "Remove" + ]; + + for (var i = 0; i != 5; ++i) { + var list = changes[i]; + var length = list.length; + + if (length != 0) { + $("#modifications").append("<div>" + + "<label>" + keys[i] + "</label>" + + "<div id=\"i" + i + "\"></div>" + + "</div>"); + + var value = ""; + for (var j = 0; j != length; ++j) { + if (j != 0) + value += "<br/>"; + value += $.xml(list[j]); + } + + $("#i" + i).html(value); + } + } +}); |