From: Jay Freeman (saurik) Date: Mon, 20 Oct 2008 20:21:23 +0000 (+0000) Subject: Initial implementation of rating reports. X-Git-Tag: v1.0.3366~359 X-Git-Url: https://git.saurik.com/cydia.git/commitdiff_plain/365d45da86873eab6dd3b3faebb54745e9eae7bb?ds=sidebyside Initial implementation of rating reports. --- diff --git a/Cydia.app/menes/listArrow.png b/Cydia.app/menes/listArrow.png index 6421a167..6ff82054 100644 Binary files a/Cydia.app/menes/listArrow.png and b/Cydia.app/menes/listArrow.png differ diff --git a/Cydia.app/menes/style.css b/Cydia.app/menes/style.css index 544f2afa..5d1faa72 100644 --- a/Cydia.app/menes/style.css +++ b/Cydia.app/menes/style.css @@ -221,7 +221,7 @@ pre { } .dialog > .panel > fieldset > a { - background: 275px 11px no-repeat url(listArrow.png); + background: 275px 13px no-repeat url(listArrow.png); color: inherit; display: block; } diff --git a/Cydia.app/package.html b/Cydia.app/package.html index 0c7762e4..880439d5 100644 --- a/Cydia.app/package.html +++ b/Cydia.app/package.html @@ -110,18 +110,27 @@ margin: auto 0; position: absolute; left: 72px; + width: 237px; } - #content > div { - margin: 7px; + #lower { + margin: 12px 5px; } #name { + margin: 5px 5px; font-weight: bold; } #latest { color: #335588; + float: left; + } + + #rating { + float: right; + margin-top: -7px; + width: 130px; } #description { @@ -146,7 +155,17 @@
-
+ +
+
+ + +
diff --git a/Cydia.app/package.js b/Cydia.app/package.js index 3117a576..cd1667e6 100644 --- a/Cydia.app/package.js +++ b/Cydia.app/package.js @@ -23,6 +23,17 @@ } };*/ +function space(selector, html, max) { + var node = $(selector); + node.html(html); + var width = node.width(); + if (width > max) { + var spacing = (max - node.width()) / (html.length - 1) + "px"; + console.log(width + " " + max + " " + spacing); + node.css("letter-spacing", spacing); + } +} + $(function () { var id = package.id; var idc = encodeURIComponent(id); @@ -33,7 +44,9 @@ $(function () { $("#reflection").src("cydia://package-icon/" + idc); $("#name").html(name); - $("#latest").html(package.latest); + space("#latest", package.latest, 93); + + $("#rating").src("http://cydia.saurik.com/test_.html"); $("#settings").href("cydia://package-settings/" + idc); @@ -130,15 +143,7 @@ $(function () { $("#files-href").href("cydia://files/" + idc); } - var nid = $("#id"); - nid.html(id); - var width = nid.width(); - - var max = 238.0; - if (width > max) { - var spacing = (max - nid.width()) / (id.length - 1) + "px"; - nid.css("letter-spacing", spacing); - } + space("#id", id, 238); var section = package.section; if (section == null)