diff options
author | Jay Freeman (saurik) <saurik@saurik.com> | 2008-12-04 07:17:49 +0000 |
---|---|---|
committer | Jay Freeman (saurik) <saurik@saurik.com> | 2010-09-30 07:09:00 +0000 |
commit | 22f8bed9669aee2b33cbc4da49eea3106e91c338 (patch) | |
tree | 6fee9ee08b04bf3d7a3f0997a97d49e8d861f4e7 /Cydia.app | |
parent | 03c0f7a9657ad201acfa37b0f94bc080014a4516 (diff) |
Reorganized code and mostly finished ratings indicator.
Diffstat (limited to 'Cydia.app')
-rw-r--r-- | Cydia.app/Sections/Widgets.png | bin | 0 -> 9943 bytes | |||
-rw-r--r-- | Cydia.app/loading.html | 15 | ||||
-rw-r--r-- | Cydia.app/menes/indicator-c7ced5-4d4d70.gif | bin | 0 -> 1849 bytes | |||
-rw-r--r-- | Cydia.app/menes/menes.js | 12 | ||||
-rw-r--r-- | Cydia.app/package.html | 1 | ||||
-rw-r--r-- | Cydia.app/package.js | 9 |
6 files changed, 32 insertions, 5 deletions
diff --git a/Cydia.app/Sections/Widgets.png b/Cydia.app/Sections/Widgets.png Binary files differnew file mode 100644 index 0000000..ca8c1ef --- /dev/null +++ b/Cydia.app/Sections/Widgets.png diff --git a/Cydia.app/loading.html b/Cydia.app/loading.html new file mode 100644 index 0000000..85cc4c5 --- /dev/null +++ b/Cydia.app/loading.html @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-16"?> +<html><head> + <title>Loading</title> + <meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0"/> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> + <link rel="stylesheet" type="text/css" href="menes/style.css"/> + <base target="_blank"/> +</head><body> + <div style="padding: 5px 7px"> + <span style="color: #4d4d70; font-weight: normal; font-size: 16px"/> + <div style="display: inline-block; background-image: url(menes/indicator-c7ced5-4d4d70.gif); width: 16px; height: 16px; margin: 2px 0 -2px 0"></div> + <span style="margin: 0 4px">Loading...</span> + </span> + </div> +</body></html> diff --git a/Cydia.app/menes/indicator-c7ced5-4d4d70.gif b/Cydia.app/menes/indicator-c7ced5-4d4d70.gif Binary files differnew file mode 100644 index 0000000..e41bb96 --- /dev/null +++ b/Cydia.app/menes/indicator-c7ced5-4d4d70.gif diff --git a/Cydia.app/menes/menes.js b/Cydia.app/menes/menes.js index 8148d8d..70c5c47 100644 --- a/Cydia.app/menes/menes.js +++ b/Cydia.app/menes/menes.js @@ -439,9 +439,15 @@ $.xhr = function (url, method, headers, data, events) { events = {}; xhr.onreadystatechange = function () { - if (xhr.readyState == 4) - if (events.complete != null) - events.complete(xhr.responseText); + if (xhr.readyState == 4) { + var status = xhr.status; + var text = xhr.responseText; + if (events.response != null) + events.response(status, text); + if (events.success != null) + if (status == 200) + events.success(text); + } }; xhr.send(data); diff --git a/Cydia.app/package.html b/Cydia.app/package.html index faba915..2b1aca9 100644 --- a/Cydia.app/package.html +++ b/Cydia.app/package.html @@ -164,6 +164,7 @@ frameborder="0" height="0" target="_top" + src="loading.html" ></iframe> </div> </div> diff --git a/Cydia.app/package.js b/Cydia.app/package.js index fc8e218..bab0b2f 100644 --- a/Cydia.app/package.js +++ b/Cydia.app/package.js @@ -49,8 +49,13 @@ $(function () { var rating = package.rating; if (rating == null) $(".rating").remove(); - else - $("#rating").src(rating); + else { + $.xhr(rating, 'GET', {}, null, { + success: function (value) { + document.getElementById("rating").contentWindow.document.write(value); + } + }); + } $("#settings").href("cydia://package-settings/" + idc); |