diff options
-rw-r--r-- | Cydia.app/Sources/ispaziorepo.com.png | bin | 0 -> 10712 bytes | |||
-rw-r--r-- | Cydia.app/menes/menes.js | 16 | ||||
-rw-r--r-- | Cydia.app/package.html | 19 | ||||
-rw-r--r-- | Cydia.app/package.js | 42 | ||||
-rw-r--r-- | Cydia.mm | 22 |
5 files changed, 70 insertions, 29 deletions
diff --git a/Cydia.app/Sources/ispaziorepo.com.png b/Cydia.app/Sources/ispaziorepo.com.png Binary files differnew file mode 100644 index 0000000..d6b1a39 --- /dev/null +++ b/Cydia.app/Sources/ispaziorepo.com.png diff --git a/Cydia.app/menes/menes.js b/Cydia.app/menes/menes.js index 1d153bb..64ec5d0 100644 --- a/Cydia.app/menes/menes.js +++ b/Cydia.app/menes/menes.js @@ -24,9 +24,10 @@ var $ = function (arg, doc) { else if (type == "string") { if (doc == undefined) doc = document; - if (arg.charAt(0) == '#') - return new $([doc.getElementById(arg.substring(1))]); - else if (arg.charAt(0) == '.') + if (arg.charAt(0) == '#') { + var node = doc.getElementById(arg.substring(1)); + return $(node == null ? [] : [node]); + } else if (arg.charAt(0) == '.') return new $(doc.getElementsByClassName(arg.substring(1))); else return $([doc]).descendants(arg); @@ -201,6 +202,15 @@ $.inject({ } }, + src: { + get: function (node) { + return node.src; + }, + set: function (node, value) { + node.src = value; + } + }, + value: { get: function (node) { return node.value; diff --git a/Cydia.app/package.html b/Cydia.app/package.html index 1331c7d..c545802 100644 --- a/Cydia.app/package.html +++ b/Cydia.app/package.html @@ -17,14 +17,23 @@ <div id="latest"></div> </div> - <a id="author-link" class="author"> + <a id="author-href" class="author"> <label>Author</label> <div id="author"></div> </a> +</fieldset> + +<div style="width: 320px; overflow: hidden" class="depiction"><iframe + id="depiction-src" + frameborder="0" + width="300" + target="_top" +></iframe></div> +<fieldset class="description"> <div id="description"></div> - <a id="homepage-link" class="homepage"> + <a id="homepage-href"> <label>More Information</label> </a> </fieldset> @@ -36,7 +45,7 @@ <div id="installed"></div> </div> - <a id="files-link"><label>Filesystem Content</label></a> + <a id="files-href"><label>Filesystem Content</label></a> </fieldset> <label>Package Details</label> @@ -56,12 +65,12 @@ <div id="size"></div> </div> - <a id="maintainer-link" class="maintainer"> + <a id="maintainer-href" class="maintainer"> <label>Maintainer</label> <div id="maintainer"></div> </a> - <a id="sponsor-link" class="sponsor"> + <a id="sponsor-href" class="sponsor"> <label>Sponsor</label> <div id="sponsor"></div> </a> diff --git a/Cydia.app/package.js b/Cydia.app/package.js index 4539006..aec8141 100644 --- a/Cydia.app/package.js +++ b/Cydia.app/package.js @@ -5,8 +5,10 @@ "name": "Allen Porter", "address": "allen.porter@gmail.com" }, + "depiction": "http://planet-iphones.com/repository/info/chromium1.3.php", "description": "this is a sample description", - "homepage": "http://cydia.saurik.com/terminal.html", + //"homepage": "http://cydia.saurik.com/terminal.html", + "homepage": "http://planet-iphones.com/repository/info/chromium1.3.php", "installed": "286u-4", "id": "mobileterminal", "section": "Terminal Support", @@ -34,28 +36,36 @@ $(function () { $(".author").remove(); else { $("#author").html(author.name); - $("#author-link").href("mailto:" + author.address + "?subject=" + regarding); + $("#author-href").href("mailto:" + author.address + "?subject=" + regarding); } - var description = package.description; - if (description == null) - description = package.tagline; - else - description = description.replace(/\n/g, "<br/>"); - $("#description").html(description); + var depiction = package.depiction; + if (depiction != null) { + $(".description").remove(); + $("#depiction-src").src(depiction); + } else { + $(".depiction").remove(); + + var description = package.description; + if (description == null) + description = package.tagline; + else + description = description.replace(/\n/g, "<br/>"); + $("#description").html(description); + } var homepage = package.homepage; 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); @@ -77,7 +87,7 @@ $(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.sponsor; @@ -85,15 +95,19 @@ $(function () { $(".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 { + $(".trusted").remove(); + } else { $("#source-name").html(source.name); + if (!source.trusted) + $(".trusted").remove(); + var description = source.description; if (description == null) $(".source-description").remove(); @@ -849,12 +849,6 @@ class Progress : distribution_ = [[NSString stringWithUTF8String:index->GetDist().c_str()] retain]; type_ = [[NSString stringWithUTF8String:index->GetType()] retain]; - description_ = nil; - label_ = nil; - origin_ = nil; - version_ = nil; - defaultIcon_ = nil; - debReleaseIndex *dindex(dynamic_cast<debReleaseIndex *>(index)); if (dindex != NULL) { std::ifstream release(dindex->MetaIndexFile("Release").c_str()); @@ -1047,6 +1041,7 @@ NSString *Scour(const char *field, const char *begin, const char *end) { NSString *tagline_; NSString *icon_; NSString *homepage_; + NSString *depiction_; Address *sponsor_; Address *author_; NSArray *tags_; @@ -1088,6 +1083,7 @@ NSString *Scour(const char *field, const char *begin, const char *end) { - (NSString *) tagline; - (NSString *) icon; - (NSString *) homepage; +- (NSString *) depiction; - (Address *) author; - (NSArray *) relationships; @@ -1133,6 +1129,8 @@ NSString *Scour(const char *field, const char *begin, const char *end) { [icon_ release]; if (homepage_ != nil) [homepage_ release]; + if (depiction_ != nil) + [depiction_ release]; if (sponsor_ != nil) [sponsor_ release]; if (author_ != nil) @@ -1149,7 +1147,7 @@ NSString *Scour(const char *field, const char *begin, const char *end) { } + (NSArray *) _attributeKeys { - return [NSArray arrayWithObjects:@"author", @"description", @"essential", @"homepage", @"icon", @"id", @"installed", @"latest", @"maintainer", @"name", @"section", @"size", @"source", @"sponsor", @"tagline", nil]; + return [NSArray arrayWithObjects:@"author", @"depiction", @"description", @"essential", @"homepage", @"icon", @"id", @"installed", @"latest", @"maintainer", @"name", @"section", @"size", @"source", @"sponsor", @"tagline", nil]; } - (NSArray *) attributeKeys { @@ -1198,6 +1196,9 @@ NSString *Scour(const char *field, const char *begin, const char *end) { homepage_ = Scour("Website", begin, end); if (homepage_ != nil) homepage_ = [homepage_ retain]; + depiction_ = Scour("Depiction", begin, end); + if (depiction_ != nil) + depiction_ = [depiction_ retain]; NSString *sponsor = Scour("Sponsor", begin, end); if (sponsor != nil) sponsor_ = [[Address addressWithString:sponsor] retain]; @@ -1408,6 +1409,10 @@ NSString *Scour(const char *field, const char *begin, const char *end) { return homepage_; } +- (NSString *) depiction { + return depiction_; +} + - (Address *) sponsor { return sponsor_; } @@ -4318,6 +4323,9 @@ void AddTextView(NSMutableDictionary *fields, NSMutableArray *packages, NSString } - (void) webView:(WebView *)sender didReceiveTitle:(NSString *)title forFrame:(WebFrame *)frame { + if ([frame parentFrame] != nil) + return; + title_ = [title retain]; [self setTitle:title]; } |