]> git.saurik.com Git - cydia.git/blobdiff - Cydia.app/package.js
Massive stability and feature improvements to Cydia.
[cydia.git] / Cydia.app / package.js
index 60bf483d62cbf953e7a7a768f03c4403a8a9d5ee..480ec01dfb2ef1a04feb511a85a4990d7971c0ac 100644 (file)
@@ -5,6 +5,8 @@
         "name": "Allen Porter",
         "address": "allen.porter@gmail.com"
     },
+    //"depiction": "http://planet-iphones.com/repository/info/chromium1.3.php",
+    "depiction": "http://cydia.saurik.com/terminal.html",
     "description": "this is a sample description",
     "homepage": "http://cydia.saurik.com/terminal.html",
     "installed": "286u-4",
@@ -16,7 +18,8 @@
         "address": "saurik@saurik.com"
     },
     "source": {
-        "name": "Telesphoreo Tangelo"
+        "name": "Telesphoreo Tangelo",
+        "description": "Distribution of Unix Software for the iPhone"
     }
 };*/
 
@@ -33,7 +36,17 @@ $(function () {
         $(".author").remove();
     else {
         $("#author").html(author.name);
-        $("#author-link").href("mailto:" + author.address + "?subject=" + regarding);
+        $("#author-href").href("mailto:" + author.address + "?subject=" + regarding);
+    }
+
+    //$("#notice-src").src("http://saurik.cachefly.net/notice/" + encodeURIComponent(id) + ".html");
+
+    var depiction = package.depiction;
+    if (depiction == null)
+        $(".depiction").remove();
+    else {
+        $(".description").display("none");
+        $("#depiction-src").src(depiction);
     }
 
     var description = package.description;
@@ -47,14 +60,14 @@ $(function () {
     if (homepage == null)
         $(".homepage").remove();
     else
-        $("#homepage-link").href(homepage);
+        $("#homepage-href").href(homepage);
 
     var installed = package.installed;
     if (installed == null)
         $(".installed").remove();
     else {
         $("#installed").html(installed);
-        $("#files-link").href("cydia://files/" + id);
+        $("#files-href").href("cydia://files/" + id);
     }
 
     $("#id").html(id);
@@ -76,20 +89,31 @@ $(function () {
         $(".maintainer").remove();
     else {
         $("#maintainer").html(maintainer.name);
-        $("#maintainer-link").href("mailto:" + maintainer.address + "?subject=" + regarding);
+        $("#maintainer-href").href("mailto:" + maintainer.address + "?subject=" + regarding);
     }
 
-    var sponsor = package.maintainer;
+    var sponsor = package.sponsor;
     if (sponsor == null)
         $(".sponsor").remove();
     else {
         $("#sponsor").html(sponsor.name);
-        $("#sponsor-link").href(sponsor.address);
+        $("#sponsor-href").href(sponsor.address);
     }
 
     var source = package.source;
-    if (source == null)
+    if (source == null) {
         $(".source").remove();
-    else
-        $("#origin").html(source.name);
+        $(".trusted").remove();
+    } else {
+        $("#source-name").html(source.name);
+
+        if (!source.trusted)
+            $(".trusted").remove();
+
+        var description = source.description;
+        if (description == null)
+            $(".source-description").remove();
+        else
+            $("#source-description").html(description);
+    }
 });