]> git.saurik.com Git - cydia.git/commitdiff
Welcome to the future.
authorJay Freeman (saurik) <saurik@saurk.com>
Wed, 31 Dec 2008 09:00:05 +0000 (09:00 +0000)
committerJay Freeman (saurik) <saurik@saurik.com>
Thu, 30 Sep 2010 07:09:33 +0000 (07:09 +0000)
Cydia.app/menes/style.css
Cydia.app/package.html
Cydia.app/package.js
Cydia.mm
control

index a7e1949d81c255f61bce1191f19813d32a4b1be9..d9915c988d4584a79d7fe73c0431a20241f05df6 100644 (file)
@@ -178,7 +178,7 @@ dialog > toolbar > a.forward-button {
     float: right;
 }
 /* }}} */
-/* fieldset {{{ */
+
 panel > block {
     background-color: #c7ced5;
     border-bottom: 1px solid #999999;
@@ -335,39 +335,37 @@ fieldset > div > select {
     -webkit-appearance: none;
 }
 
-fieldset > a,
-fieldset > div > select {
-    background: no-repeat url(chevron.png);
-}
-
-fieldset > a {
-    background-position-y: 13px;
-}
-
-fieldset > a.thumb {
-    background-position-y: 24px; 
-}
+/* Chevrons {{{ */
 
+fieldset > a[href],
 fieldset > div > select {
-    background-position-y: 11px;
+    background-repeat: no-repeat;
+    background-image: url(chevron.png);
+    background-position-y: center;
 }
 
-list > fieldset > a {
+/* Horizontal */
+
+list > fieldset > a[href] {
     background-position-x: 295px;
 }
 
-panel > fieldset > a {
+panel > fieldset > a[href] {
     background-position-x: 275px;
 }
 
+list > fieldset > a:not([href]) > select,
 list > fieldset > div > select {
     background-position-x: 192px;
 }
 
+panel > fieldset > a:not([href]) > select,
 panel > fieldset > div > select {
     background-position-x: 163px;
 }
 
+/* }}} */
+
 fieldset > textarea,
 fieldset > div > input,
 fieldset > div > select,
@@ -419,7 +417,7 @@ fieldset > div > div {
     width: 273px;
 }
 
-fieldset > a > div {
+fieldset > a:not(.thumb) > div {
     width: 250px;
 }
 
@@ -490,4 +488,3 @@ fieldset > a.thumb > back {
     top: -1px;
     width: 237px;
 }
-/* }}} */
index 3e634752582ced9def5c186172988c3c28b4235d..75b86f0eeba7f1da8e0f24d50bef18f6ab7c253f 100644 (file)
@@ -14,7 +14,7 @@
             if (count++ != 0)
                 return;
             $("#depiction-load").remove();
-            $("#depiction-src").css("display" "block");
+            $("#depiction-src").css("display", "block");
         }
 
         var remove = function() {
     </script>
 
     <style>
+        .flip-180 {
+            -webkit-backface-visibility: hidden;
+            -webkit-transform: rotateY(180deg);
+            -webkit-transition-duration: 2s;
+            -webkit-transition-property: transform;
+        }
+
+        .flip-360 {
+            -webkit-backface-visibility: hidden;
+            -webkit-transform: rotateY(360deg);
+            -webkit-transition-duration: 2s;
+            -webkit-transition-property: transform;
+        }
+
+        .fade-out { 
+            opacity: 0;
+            -webkit-transition-property: opacity;
+            -webkit-transition-duration: 2s;
+        }
+
+        .fade-in { 
+            opacity: 1;
+            -webkit-transition-property: opacity;
+            -webkit-transition-duration: 2s;
+        }
+
         #remove {
             margin-top: 7px;
             text-align: center;
             color: red;
         }
 
-        #boundry {
+        #boundary {
             float: left;
+            height: 64;
             width: 64px;
         }
 
+        #thumb,
         #icon {
             background-position: center center;
             background-repeat: no-repeat;
-            -webkit-border-radius: 9px;
             height: 64px;
+            position: absolute;
             width: 64px;
         }
 
+        #thumb {
+            -webkit-border-radius: 9px;
+        }
+
         /* XXX: this style is out of date */
         #reflection {
             height: 59px;
         }
 
         #name {
-            margin-bottom: 10px;
+            margin-bottom: 13px;
             font-weight: bold;
             font-size: 17px;
             overflow: hidden;
 <dialog><panel>
 
 <fieldset id="header">
-    <div class="clearfix">
-        <div id="boundry">
-            <div id="icon"></div>
+    <div>
+        <div id="boundary">
+            <div class="flip-0" id="icon"></div>
+            <div class="flip-180" id="thumb"></div>
             <!--img id="reflection"/-->
         </div>
 
index 71ac849b063735ce9a65bebccabe4c16fa333e52..de1343c60b08b11913f8903eec5fd4ad373b2455 100644 (file)
@@ -33,13 +33,29 @@ function space(selector, html, max) {
     }
 }
 
+function cache(url) {
+    return url.replace('://', '://ne.edgecastcdn.net/8003A4/');
+}
+
+var swap_, swap = function (on, off, time) {
+    setTimeout(swap_(on, off, time), time);
+};
+
+swap_ = function (on, off, time) {
+    return function () {
+        on.className = 'fade-out';
+        off.className = 'fade-in';
+        swap(off, on, time);
+    };
+};
+
 $(function () {
     var id = package.id;
     var idc = encodeURIComponent(id);
     var name = package.name;
     var regarding = encodeURIComponent("Cydia/APT: " + name);
     var icon = 'cydia://package-icon/' + idc;
-    var icon = 'http://cydia.saurik.com/thumb/net.ispazio.deeptheme.png';
+    var api = 'http://cydia.saurik.com/api/';
 
     $("#icon").css("background-image", 'url("' + icon + '")');
     $("#reflection").src("cydia://package-icon/" + idc);
@@ -47,36 +63,46 @@ $(function () {
     $("#name").html(name);
     space("#latest", package.latest, 96);
 
-    var rating = package.rating;
-    if (rating == null)
-        $(".rating").remove();
-    else {
-        $.xhr(rating, 'GET', {}, null, {
-            success: function (value) {
-                value = eval(value);
+    $.xhr(api + 'package/' + idc, 'GET', {}, null, {
+        success: function (value) {
+            value = eval(value);
 
-                $("#rating-load").remove();
-                $("#rating-href").href(value.reviews);
+            $("#rating-load").remove();
 
-                var none = $("#rating-none");
-                var done = $("#rating-done");
+            var href = $("#rating-href");
+            href.href(value.reviews);
 
-                if (value.rating == null) {
-                    done.remove();
-                    none.css("display", "block");
-                } else {
-                    none.remove();
-                    done.css("display", "block");
+            var none = $("#rating-none");
+            var done = $("#rating-done");
 
-                    $("#rating-value").css('width', 16 * value.rating);
-                }
-            },
+            if (value.rating == null) {
+                done.remove();
+                none.css("display", "block");
+            } else {
+                none.remove();
+                done.css("display", "block");
 
-            failure: function (status) {
-                $(".rating").remove();
+                $("#rating-value").css('width', 16 * value.rating);
             }
-        });
-    }
+
+            if (typeof value.icon != "undefined" && value.icon != null) {
+                var icon = $("#icon");
+                var thumb = $("#thumb");
+                icon[0].className = 'flip-180';
+                thumb[0].className = 'flip-360';
+                thumb.css("background-image", 'url("' + value.icon + '")');
+
+                setTimeout(function () {
+                    icon.css("display", "none");
+                    thumb[0].className = 'flip-0';
+                }, 2000);
+            }
+        },
+
+        failure: function (status) {
+            $(".rating").remove();
+        }
+    });
 
     $("#settings").href("cydia://package-settings/" + idc);
 
index 6f80b37c9d99184620bd04bf3e276dd2f6ee6e8b..467fcd64c31a5b93493cdd13c0760f915162c2e4 100644 (file)
--- a/Cydia.mm
+++ b/Cydia.mm
@@ -638,7 +638,6 @@ bool reload_;
 
 static NSDictionary *SectionMap_;
 static NSMutableDictionary *Metadata_;
-static NSMutableDictionary *Indices_;
 static _transient NSMutableDictionary *Settings_;
 static _transient NSString *Role_;
 static _transient NSMutableDictionary *Packages_;
@@ -1244,7 +1243,6 @@ class Progress :
 
 - (Source *) source;
 - (NSString *) role;
-- (NSString *) rating;
 
 - (BOOL) matches:(NSString *)text;
 
@@ -1307,7 +1305,7 @@ class Progress :
 }
 
 + (NSArray *) _attributeKeys {
-    return [NSArray arrayWithObjects:@"applications", @"author", @"depiction", @"description", @"essential", @"homepage", @"icon", @"id", @"installed", @"latest", @"maintainer", @"name", @"purposes", @"rating", @"section", @"size", @"source", @"sponsor", @"tagline", @"warnings", nil];
+    return [NSArray arrayWithObjects:@"applications", @"author", @"depiction", @"description", @"essential", @"homepage", @"icon", @"id", @"installed", @"latest", @"maintainer", @"name", @"purposes", @"section", @"size", @"source", @"sponsor", @"tagline", @"warnings", nil];
 }
 
 - (NSArray *) attributeKeys {
@@ -1838,13 +1836,6 @@ class Progress :
     return role_;
 }
 
-- (NSString *) rating {
-    if (NSString *rating = [Indices_ objectForKey:@"Rating"])
-        return [rating stringByReplacingOccurrencesOfString:@"@" withString:[id_ stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
-    else
-        return nil;
-}
-
 - (BOOL) matches:(NSString *)text {
     if (text == nil)
         return NO;
@@ -4095,9 +4086,10 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
         return;
 
     Package *package = [packages_ objectAtIndex:row];
+    package = [database_ packageWithName:[package id]];
     PackageView *view = [[[PackageView alloc] initWithBook:book_ database:database_] autorelease];
-    [view setDelegate:delegate_];
     [view setPackage:package];
+    [view setDelegate:delegate_];
     [book_ pushPage:view];
 }
 
@@ -7059,14 +7051,6 @@ int main(int argc, char *argv[]) { _pooled
     /*AddPreferences(@"/Applications/Preferences.app/Settings-iPhone.plist");
     AddPreferences(@"/Applications/Preferences.app/Settings-iPod.plist");*/
 
-    /*if ((Indices_ = [[NSMutableDictionary alloc] initWithContentsOfFile:@"/var/lib/cydia/indices.plist"]) == NULL)
-        Indices_ = [[NSMutableDictionary alloc] init];*/
-
-    Indices_ = [NSMutableDictionary dictionaryWithObjectsAndKeys:
-        @"http://"/*"cache.saurik.com/"*/"cydia.saurik.com/rating/@", @"Rating",
-        //@"http://"/*"cache.saurik.com/"*/"cydia.saurik.com/repotag/@", @"RepoTag",
-    nil];
-
     _trace();
     Metadata_ = [[NSMutableDictionary alloc] initWithContentsOfFile:@"/var/lib/cydia/metadata.plist"];
     _trace();
diff --git a/control b/control
index c51234a800b78c33f710d0bdd1fd894700b39c1a..35f6c571cccf43b8bfb601c18f7599e7309f6d14 100644 (file)
--- a/control
+++ b/control
@@ -4,7 +4,7 @@ Priority: required
 Section: Packaging
 Maintainer: Jay Freeman (saurik) <saurik@saurik.com>
 Architecture: iphoneos-arm
-Version: 1.0.2678-38
+Version: 1.0.2682-38
 Replaces: com.sosiphone.addcydia
 Depends: apt, darwintools, pcre, shell-cmds
 Conflicts: com.sosiphone.addcydia