/* }}} */
panel > block {
- background-color: #c7ced5;
+ /*background-color: #ccd1d5;*/
+ /*background-color: white;*/
+ /*background-color: #c7ced5;*/
+ background-color: transparent;
+ //background-color: #ffffff;
border-bottom: 1px solid #999999;
border-top: 1px solid #999999;
+ border-left: 1px dotted #999999;
+ border-right: 1px dotted #999999;
+ -webkit-border-radius: 9px;
+ //border: 1px solid #999999;
display: block;
font-size: 16px;
margin: 9px 10px;
padding: 12px 14px 10px 14px;
}
-fieldset > a:not([type="ad"]):first-child,
-fieldset > div:first-child {
- padding-top: 13px;
-}
-
/*fieldset > a:not([type="ad"]):last-child,
fieldset > div:last-child {
padding-bottom: 10px;
}
panel > fieldset > a[type="profile"] > div:first-of-type,
-panel > fieldset > a[type="thumb"] > div:first-of-type {
+panel > fieldset:not(.header) > a[type="thumb"] > div:first-of-type {
border: 1px solid #999999;
}
width: 44px;
}
+fieldset > a[type="header"] > div:first-of-type {
+ height: 64px;
+ width: 64px;
+}
+
fieldset > a[type="profile"] > div:first-of-type {
+ -webkit-background-size: 50px;
height: 50px;
width: 50px;
}
}
fieldset > a[type="comment"] > div:first-of-type,
+fieldset > a[type="header"] > div:first-of-type,
fieldset > a[type="profile"] > div:first-of-type,
fieldset > a[type="thumb"] > div:first-of-type {
background-repeat: no-repeat;
display: inline-block;
/* XXX: small differences due to font bugs */
/* XXX: 1px difference due to border stupidity */
- margin: -14px 7px -11px -15px;
+ margin: -13px 7px -11px -15px;
}
fieldset > a > img.icon,
width: 250px;
}
+fieldset > a:not([href]) > img.icon + div,
fieldset > div > img.icon + div {
width: 244px;
}
-fieldset > a > img.icon + div {
+fieldset > a[href] > img.icon + div {
width: 221px;
}
}
fieldset > a[type="profile"] > div:nth-of-type(2) {
- margin: -6px 0 -5px 0;
+ margin: -5px 0;
}
fieldset > a[type="profile"] > div:nth-of-type(2),
}
panel > iframe {
- margin: -8px 0;
+ margin: -9px 0;
+}
+
+panel > iframe + iframe {
+ margin-top: 0;
}
/* Rating Stars {{{ */
position: absolute;
}
/* }}} */
+
+panel > fieldset.header {
+ background-color: transparent;
+ border: none;
+ margin: -5px 0 -11px 0;
+}
+
+panel > fieldset.header > a > div > label {
+ color: #4d4d70;
+ text-shadow: rgba(255, 255, 255, 0.75) 1px 1px 0;
+}
$("#name").html(name);
space("#latest", package.latest, 96);
- $.xhr((api + 'package_/' + idc), 'GET', {}, null, {
+ $.xhr(cache(api + 'package/' + idc), 'GET', {}, null, {
success: function (value) {
value = eval(value);
}
}*/
- var purposes = package.purposes;
- var commercial = false;
- var _console = false;
- if (purposes != null)
- for (var i = 0, e = purposes.length; i != e; ++i) {
- var purpose = purposes[i];
- if (purpose == "commercial")
- commercial = true;
- else if (purpose == "console")
- _console = true;
- }
+ var commercial = package.hasTag('cydia::commercial');
if (!commercial)
$(".commercial").remove();
+
+ var _console = package.hasTag('purpose::console');
if (!_console)
$(".console").remove();
//$("#notice-src").src("http://saurik.cachefly.net/notice/" + idc + ".html");
+ /*var store = commercial;
+ if (!store)
+ $(".activation").remove();
+ else {
+ var activation = api + 'activation/' + idc;
+ $("#activation-src").src(activation);
+ }*/
+
var depiction = package.depiction;
if (depiction == null)
$(".depiction").remove();
#define ForRelease 1
#define ForSaurik (1 && !ForRelease)
+#define LogBrowser (0 && !ForRelease)
+#define ManualRefresh (1 && !ForRelease)
#define ShowInternals (1 && !ForRelease)
#define IgnoreInstall (0 && !ForRelease)
#define RecycleWebViews 0
-#define AlwaysReload (1 && !ForRelease)
+#define AlwaysReload (0 && !ForRelease)
#if ForRelease
#undef _trace
static CGColor Off_;
static CGColor White_;
static CGColor Gray_;
+static CGColor Green_;
+static CGColor Purple_;
+static CGColor Purplish_;
+
+static UIColor *CommercialColor_;
static NSString *App_;
static NSString *Home_;
- (BOOL) hasTag:(NSString *)tag;
- (NSString *) primaryPurpose;
- (NSArray *) purposes;
+- (bool) isCommercial;
- (NSComparisonResult) compareByName:(Package *)package;
- (NSComparisonResult) compareBySection:(Package *)package;
[super dealloc];
}
++ (NSString *) webScriptNameForSelector:(SEL)selector {
+ if (selector == @selector(hasTag:))
+ return @"hasTag";
+ else
+ return nil;
+}
+
++ (BOOL) isSelectorExcludedFromWebScript:(SEL)selector {
+ return [self webScriptNameForSelector:selector] == nil;
+}
+
+ (NSArray *) _attributeKeys {
return [NSArray arrayWithObjects:@"applications", @"author", @"depiction", @"description", @"essential", @"homepage", @"icon", @"id", @"installed", @"latest", @"maintainer", @"name", @"purposes", @"section", @"size", @"source", @"sponsor", @"tagline", @"warnings", nil];
}
return [purposes count] == 0 ? nil : purposes;
}
+- (bool) isCommercial {
+ return [self hasTag:@"cydia::commercial"];
+}
+
- (NSComparisonResult) compareByName:(Package *)package {
NSString *lhs = [self name];
NSString *rhs = [package name];
/* }}} */
/* Package Cell {{{ */
-@interface PackageCell : UISimpleTableCell {
+@interface PackageCell : UITableCell {
UIImage *icon_;
NSString *name_;
NSString *description_;
+ bool commercial_;
NSString *source_;
UIImage *badge_;
+ bool cached_;
#ifdef USE_BADGES
UITextLabel *status_;
#endif
name_ = [[package name] retain];
description_ = [[package tagline] retain];
+ commercial_ = [package isCommercial];
NSString *label = nil;
bool trusted = false;
[status_ setText:nil];
}
#endif
+
+ cached_ = false;
+}
+
+- (void) drawRect:(CGRect)rect {
+ if (!cached_) {
+ //[self setBackgroundColor:(commercial_ ? CommercialColor_ : [UIColor whiteColor])];
+ cached_ = true;
+ }
+
+ [super drawRect:rect];
+}
+
+- (void) drawBackgroundInRect:(CGRect)rect withFade:(float)fade {
+ if (fade == 0 && commercial_) {
+ CGContextRef context(UIGraphicsGetCurrentContext());
+ [[self backgroundColor] set];
+ CGRect back(rect);
+ back.size.height -= 1;
+ CGContextFillRect(context, back);
+ }
+
+ [super drawBackgroundInRect:rect withFade:fade];
}
- (void) drawContentInRect:(CGRect)rect selected:(BOOL)selected {
UISetColor(White_);
if (!selected)
- UISetColor(Black_);
+ UISetColor(commercial_ ? Purple_ : Black_);
[name_ drawAtPoint:CGPointMake(48, 8) forWidth:240 withFont:Font18Bold_ ellipsis:2];
[source_ drawAtPoint:CGPointMake(58, 29) forWidth:225 withFont:Font12_ ellipsis:2];
if (!selected)
- UISetColor(Gray_);
+ UISetColor(commercial_ ? Purplish_ : Gray_);
[description_ drawAtPoint:CGPointMake(12, 46) forWidth:280 withFont:Font14_ ellipsis:2];
[super drawContentInRect:rect selected:selected];
_transient Database *database_;
Package *package_;
NSString *name_;
+ bool commercial_;
NSMutableArray *buttons_;
}
}
- (bool) _allowJavaScriptPanel {
- return false;
+ return commercial_;
}
#if !AlwaysReload
if (package != nil) {
package_ = [package retain];
name_ = [[package id] retain];
+ commercial_ = [package isCommercial];
[self loadURL:[NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"package" ofType:@"html"]]];
}
}
-- (bool) _loading {
- return false;
+- (bool) isLoading {
+ return commercial_ ? [super isLoading] : false;
}
- (void) reloadData {
}
#endif
-- (bool) _loading {
+- (bool) isLoading {
return false;
}
// XXX: what is this line of code for?
if ([packages count] == 0);
- else if (Loaded_ || ForSaurik) loaded:
+ else if (Loaded_ || ManualRefresh) loaded:
[self _loaded];
else {
Loaded_ = YES;
Off_.Set(space_, 0.9, 0.9, 0.9, 1.0);
White_.Set(space_, 1.0, 1.0, 1.0, 1.0);
Gray_.Set(space_, 0.4, 0.4, 0.4, 1.0);
+ Green_.Set(space_, 0.0, 0.5, 0.0, 1.0);
+ Purple_.Set(space_, 0.0, 0.0, 0.7, 1.0);
+ Purplish_.Set(space_, 0.4, 0.4, 0.8, 1.0);
+ /*Purple_.Set(space_, 1.0, 0.3, 0.0, 1.0);
+ Purplish_.Set(space_, 1.0, 0.6, 0.4, 1.0); ORANGE */
+ /*Purple_.Set(space_, 1.0, 0.5, 0.0, 1.0);
+ Purplish_.Set(space_, 1.0, 0.7, 0.2, 1.0); ORANGISH */
+ /*Purple_.Set(space_, 0.5, 0.0, 0.7, 1.0);
+ Purplish_.Set(space_, 0.7, 0.4, 0.8, 1.0); PURPLE */
+
+ CommercialColor_ = [UIColor colorWithRed:0.93f green:1.00f blue:0.88f alpha:1.00f];
Finishes_ = [NSArray arrayWithObjects:@"return", @"reopen", @"restart", @"reload", @"reboot", nil];