adding in activities module

This commit is contained in:
Roy Yang 2012-07-11 18:08:07 -07:00
parent 8be48f335c
commit b1509d455f
22 changed files with 402 additions and 142 deletions

View file

@ -0,0 +1,31 @@
//
// ActivityModule.h
// NewsBlur
//
// Created by Roy Yang on 7/11/12.
// Copyright (c) 2012 NewsBlur. All rights reserved.
//
#import <UIKit/UIKit.h>
@class NewsBlurAppDelegate;
@class ASIHTTPRequest;
@interface ActivityModule : UIView
<UITableViewDelegate,
UITableViewDataSource> {
NewsBlurAppDelegate *appDelegate;
UITableView *activitiesTable;
NSArray *activitiesArray;
BOOL isSelf;
}
@property (nonatomic, retain) NewsBlurAppDelegate *appDelegate;
@property (nonatomic, retain) UITableView *activitiesTable;
@property (nonatomic, retain) NSArray *activitiesArray;
@property (nonatomic, readwrite) BOOL isSelf;
- (void)refreshWithActivities:(NSArray *)activities asSelf:(BOOL)asSelf;
@end

View file

@ -0,0 +1,123 @@
//
// ActivityModule.m
// NewsBlur
//
// Created by Roy Yang on 7/11/12.
// Copyright (c) 2012 NewsBlur. All rights reserved.
//
#import "ActivityModule.h"
#import "NewsBlurAppDelegate.h"
#import "Utilities.h"
#import "ASIHTTPRequest.h"
#import "JSON.h"
@implementation ActivityModule
@synthesize appDelegate;
@synthesize activitiesTable;
@synthesize activitiesArray;
@synthesize isSelf;
- (id)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self) {
}
return self;
}
- (void)dealloc {
[appDelegate release];
[activitiesTable release];
[activitiesArray release];
[super dealloc];
}
- (void)layoutSubviews {
[super layoutSubviews];
}
- (void)refreshWithActivities:(NSArray *)activities asSelf:(BOOL)asSelf {
self.isSelf = asSelf;
self.appDelegate = (NewsBlurAppDelegate *)[[UIApplication sharedApplication] delegate];
self.activitiesArray = activities;
self.activitiesTable = [[[UITableView alloc] init] autorelease];
self.activitiesTable.dataSource = self;
self.activitiesTable.delegate = self;
self.activitiesTable.frame = CGRectMake(0, 0, self.frame.size.width, self.frame.size.height);
[self addSubview:self.activitiesTable];
[self.activitiesTable reloadData];
}
#pragma mark -
#pragma mark Table View - Interactions List
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
return 1;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
int activitesCount = [self.activitiesArray count];
if (activitesCount) {
return activitesCount;
} else {
return 0;
}
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView
dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc]
initWithStyle:UITableViewCellStyleDefault
reuseIdentifier:CellIdentifier] autorelease];
}
int activitesCount = [self.activitiesArray count];
if (activitesCount) {
NSDictionary *activity = [self.activitiesArray objectAtIndex:indexPath.row];
NSString *category = [activity objectForKey:@"category"];
NSString *content = [activity objectForKey:@"content"];
NSString *title = [activity objectForKey:@"title"];
NSString *username = self.isSelf ? @"You" : @"Stub for username";
NSString *withUserUsername = [[activity objectForKey:@"with_user"] objectForKey:@"username"];
if ([category isEqualToString:@"follow"]) {
cell.textLabel.text = [NSString stringWithFormat:@"%@ followed %@", username, withUserUsername];
} else if ([category isEqualToString:@"comment_reply"]) {
cell.textLabel.text = [NSString stringWithFormat:@"%@ replied to %@", username, withUserUsername];
} else if ([category isEqualToString:@"sharedstory"]) {
cell.textLabel.text = [NSString stringWithFormat:@"%@ shared %@ : %@", username, title, content];
// star and feedsub are always private.
} else if ([category isEqualToString:@"star"]) {
cell.textLabel.text = [NSString stringWithFormat:@"You saved %@", content];
} else if ([category isEqualToString:@"feedsub"]) {
cell.textLabel.text = [NSString stringWithFormat:@"You subscribed to %@", content];
}
cell.textLabel.font = [UIFont systemFontOfSize:13];
}
return cell;
}
@end

View file

@ -25,6 +25,8 @@
- (IBAction)doLogout:(id)sender;
- (void)refreshInteractions;
- (void)refreshActivity;
- (void)finishLoadInteractions:(ASIHTTPRequest *)request;
- (void)finishLoadActivities:(ASIHTTPRequest *)request;
- (void)requestFailed:(ASIHTTPRequest *)request;
@end

View file

@ -8,6 +8,7 @@
#import "DashboardViewController.h"
#import "NewsBlurAppDelegate.h"
#import "ActivityModule.h"
#import "JSON.h"
@implementation DashboardViewController
@ -77,14 +78,42 @@
[request startAsynchronous];
}
- (void)refreshActivity {
NSString *urlString = [NSString stringWithFormat:@"http://%@/social/profile?user_id=%@",
NEWSBLUR_URL,
[appDelegate.dictUserProfile objectForKey:@"user_id"]];
NSURL *url = [NSURL URLWithString:urlString];
ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url];
[request setDidFinishSelector:@selector(finishLoadActivities:)];
[request setDidFailSelector:@selector(requestFailed:)];
[request setDelegate:self];
[request startAsynchronous];
}
- (void)finishLoadActivities:(ASIHTTPRequest *)request {
NSString *responseString = [request responseString];
NSDictionary *results = [[NSDictionary alloc]
initWithDictionary:[responseString JSONValue]];
appDelegate.dictUserActivity = [results objectForKey:@"activities"];
[results release];
ActivityModule *activity = [[ActivityModule alloc] init];
activity.frame = CGRectMake(20, 510, 438, 300);
activity.backgroundColor = [UIColor redColor];
[activity refreshWithActivities:appDelegate.dictUserActivity asSelf:YES];
[self.view addSubview:activity];
[activity release];
}
- (void)finishLoadInteractions:(ASIHTTPRequest *)request {
NSString *responseString = [request responseString];
NSDictionary *results = [[NSDictionary alloc]
initWithDictionary:[responseString JSONValue]];
appDelegate.dictUserInteractions = [results objectForKey:@"interactions"];
NSLog(@"appDelegate.dictUserInteractions finishLoadInteractions is %i", [appDelegate.dictUserInteractions count]);
[results release];
[self.interactionsTable reloadData];
}

View file

@ -94,6 +94,7 @@
NSDictionary * dictSocialFeeds;
NSDictionary * dictUserProfile;
NSMutableArray * dictUserInteractions;
NSMutableArray * dictUserActivity;
NSMutableArray * dictFoldersArray;
}
@ -152,6 +153,7 @@
@property (nonatomic, retain) NSDictionary *dictSocialFeeds;
@property (nonatomic, retain) NSDictionary *dictUserProfile;
@property (nonatomic, retain) NSMutableArray *dictUserInteractions;
@property (nonatomic, retain) NSMutableArray *dictUserActivity;
@property (nonatomic, retain) NSMutableArray *dictFoldersArray;
+ (NewsBlurAppDelegate*) sharedAppDelegate;

View file

@ -85,6 +85,7 @@
@synthesize dictSocialFeeds;
@synthesize dictUserProfile;
@synthesize dictUserInteractions;
@synthesize dictUserActivity;
@synthesize dictFoldersArray;
+ (NewsBlurAppDelegate*) sharedAppDelegate {
@ -172,6 +173,7 @@
[dictSocialFeeds release];
[dictUserProfile release];
[dictUserInteractions release];
[dictUserActivity release];
[dictFoldersArray release];
[super dealloc];
@ -689,7 +691,10 @@
- (void)hideStoryDetailView {
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
[self.splitStoryDetailNavigationController popViewControllerAnimated:YES];
[self.splitStoryDetailNavigationController popToRootViewControllerAnimated:YES];
[self.navigationController popToRootViewControllerAnimated:YES];
} else {
[self.navigationController popViewControllerAnimated:YES];
}
}

View file

@ -20,7 +20,7 @@
#define kTableViewRowHeight 40;
#define kBlurblogTableViewRowHeight 45;
#define kBlurblogTableViewRowHeight 46;
@implementation NewsBlurViewController
@ -109,9 +109,9 @@
[self.intelligenceControl setImage:[UIImage imageNamed:@"16-List.png"]
forSegmentAtIndex:0];
[self.intelligenceControl setImage:[UIImage imageNamed:@"unread.png"]
[self.intelligenceControl setImage:[UIImage imageNamed:@"unread_color.png"]
forSegmentAtIndex:1];
[self.intelligenceControl setImage:[UIImage imageNamed:@"focused.png"]
[self.intelligenceControl setImage:[UIImage imageNamed:@"focused_color.png"]
forSegmentAtIndex:2];
[self.intelligenceControl addTarget:self
action:@selector(selectIntelligence)
@ -259,11 +259,12 @@
//}
// adding user avatar to left
NSString *url = [NSString stringWithFormat:@"%@", [[results objectForKey:@"social_profile"] objectForKey:@"photo_url"]];
NSURL * imageURL = [NSURL URLWithString:url];
NSData * imageData = [NSData dataWithContentsOfURL:imageURL];
UIImage * userAvatarImage = [UIImage imageWithData:imageData];
userAvatarImage = [self roundCorneredImage:userAvatarImage radius:6];
userAvatarImage = [Utilities roundCorneredImage:userAvatarImage radius:6];
UIButton *userAvatarButton = [UIButton buttonWithType:UIButtonTypeCustom];
userAvatarButton.bounds = CGRectMake(0, 0, 32, 32);
@ -273,17 +274,29 @@
initWithCustomView:userAvatarButton];
self.navigationItem.leftBarButtonItem = userAvatar;
[userAvatar release];
// adding settings button to right
// UIBarButtonItem *settingsButton = [[UIBarButtonItem alloc] init];
//
// settingsButton.title = @"\u2699";
// UIFont *f1 = [UIFont fontWithName:@"Helvetica" size:24.0];
// NSDictionary *dict = [[NSDictionary alloc] initWithObjectsAndKeys:f1, UITextAttributeFont, nil];
// [settingsButton setTitleTextAttributes:dict forState:UIControlStateNormal];
//
// self.navigationItem.rightBarButtonItem = settingsButton;
// [settingsButton release];
NSMutableDictionary *sortedFolders = [[NSMutableDictionary alloc] init];
NSArray *sortedArray;
// Set up dictUserProfile
// Set up dictUserProfile and dictUserActivity
appDelegate.dictUserProfile = [results objectForKey:@"social_profile"];
appDelegate.dictUserActivity = [results objectForKey:@"activities"];
[appDelegate.dashboardViewController refreshInteractions];
[appDelegate.dashboardViewController refreshActivity];
// Set up dictSocialFeeds
NSArray *socialFeedsArray = [results objectForKey:@"social_feeds"];
NSMutableArray *socialFolder = [[NSMutableArray alloc] init];
@ -572,9 +585,9 @@
int headerLabelHeight, folderImageViewY, disclosureImageViewY;
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) {
headerLabelHeight = 30;
folderImageViewY = 7;
disclosureImageViewY = 8;
headerLabelHeight = 24;
folderImageViewY = 4;
disclosureImageViewY = 5;
} else {
headerLabelHeight = 20;
folderImageViewY = 2;
@ -675,7 +688,7 @@
// return 0;
// }
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad){
return 31;
return 25;
}else{
return 21;
}
@ -954,7 +967,7 @@
NSData *imageData = [NSData dataWithContentsOfURL:imageURL];
UIImage *faviconImage = [UIImage imageWithData:imageData];
faviconImage = [self roundCorneredImage:faviconImage radius:6];
faviconImage = [Utilities roundCorneredImage:faviconImage radius:6];
[Utilities saveImage:faviconImage feedId:feed_id];
}
@ -967,15 +980,7 @@
});
}
- (UIImage *)roundCorneredImage: (UIImage*) orig radius:(CGFloat) r {
UIGraphicsBeginImageContextWithOptions(orig.size, NO, 0);
[[UIBezierPath bezierPathWithRoundedRect:(CGRect){CGPointZero, orig.size}
cornerRadius:r] addClip];
[orig drawInRect:(CGRect){CGPointZero, orig.size}];
UIImage* result = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return result;
}
- (void)saveAndDrawFavicons:(ASIHTTPRequest *)request {
NSString *responseString = [request responseString];

View file

@ -72,7 +72,7 @@
int yCoordinatePointer = 0;
// USERNAME
UILabel *user = [[UILabel alloc] initWithFrame:CGRectMake(120,10,230,20)];
UILabel *user = [[UILabel alloc] initWithFrame:CGRectMake(120, 10, 190, 20)];
user.text = [profile objectForKey:@"username"];
user.textColor = [UIColor colorWithRed:0.1f green:0.1f blue:0.1f alpha:1.0];
user.font = [UIFont fontWithName:@"Helvetica-Bold" size:20];
@ -107,6 +107,20 @@
bio.text = [profile objectForKey:@"bio"];
bio.textColor = [UIColor colorWithRed:0.1f green:0.1f blue:0.1f alpha:1.0];
bio.font = [UIFont fontWithName:@"Helvetica" size:12];
bio.lineBreakMode = UILineBreakModeTailTruncation;
bio.numberOfLines = 2;
// Calculate the expected size based on the font and linebreak mode of your label
CGSize maximumLabelSize = CGSizeMake(190, 40);
CGSize expectedLabelSize = [[profile objectForKey:@"bio"]
sizeWithFont:bio.font
constrainedToSize:maximumLabelSize
lineBreakMode:bio.lineBreakMode];
CGRect newFrame = bio.frame;
newFrame.size.height = expectedLabelSize.height;
bio.frame = newFrame;
self.userDescription = bio;
[self addSubview:self.userDescription];
[bio release];
@ -121,6 +135,8 @@
[[profile objectForKey:@"follower_count"] intValue] == 1 ? @"" : @"s"];
stats.text = statsStr;
stats.font = [UIFont fontWithName:@"Helvetica" size:10];
stats.textColor = UIColorFromRGB(0xAE5D15);
self.userStats = stats;
[self addSubview:self.userStats];
[stats release];
@ -133,13 +149,14 @@
}
if ([photo_url rangeOfString:@"twimg"].location != NSNotFound) {
photo_url = [photo_url stringByReplacingOccurrencesOfString:@"_normal" withString:@""];
photo_url = [photo_url stringByReplacingOccurrencesOfString:@"_normal" withString:@"_bigger"];
}
NSURL *imageURL = [NSURL URLWithString:photo_url];
NSData *imageData = [NSData dataWithContentsOfURL:imageURL];
UIImage *image = [UIImage imageWithData:imageData];
UIImageView *avatar = [[UIImageView alloc] initWithImage:image];
image = [Utilities roundCorneredImage:image radius:6];
UIImageView *avatar = [[UIImageView alloc] initWithImage:image];
avatar.frame = CGRectMake(10, 10, 100, 100);
self.userAvatar = avatar;
[self addSubview:self.userAvatar];
@ -147,7 +164,7 @@
// FOLLOW BUTTON
UIButton *follow = [UIButton buttonWithType:UIButtonTypeRoundedRect];
follow.frame = CGRectMake(120, 80, 100, 30);
follow.frame = CGRectMake(120, 83, 100, 30);
// check if self
NSString *currentUserId = [NSString stringWithFormat:@"%@", [self.appDelegate.dictUserProfile objectForKey:@"user_id"]];

View file

@ -317,16 +317,21 @@
for (int i = 0; i < replies.count; i++) {
NSDictionary *reply_dict = [replies objectAtIndex:i];
NSDictionary *user = [self getUser:[[reply_dict objectForKey:@"user_id"] intValue]];
NSString *editStr = [NSString stringWithFormat:@
" <div class=\"NB-story-comment-edit-button NB-story-comment-reply-edit-button\">"
" <div class=\"NB-story-comment-edit-button-wrapper\">edit</div>"
" </div>"];
NSString *reply = [NSString stringWithFormat:@
"<div class=\"NB-story-comment-reply\">"
" <img class=\"NB-user-avatar NB-story-comment-reply-photo\" src=\"%@\" />"
" <a class=\"NB-show-profile\" href=\"http://ios.newsblur.com/show-profile/%@\">"
" <img class=\"NB-user-avatar NB-story-comment-reply-photo\" src=\"%@\" />"
" </a>"
" <div class=\"NB-story-comment-username NB-story-comment-reply-username\">%@</div>"
" <div class=\"NB-story-comment-date NB-story-comment-reply-date\">%@ ago</div>"
" <div class=\"NB-story-comment-edit-button NB-story-comment-reply-edit-button\">"
" <div class=\"NB-story-comment-edit-button-wrapper\">edit</div>"
" </div>"
" <div class=\"NB-story-comment-reply-content\">%@</div>"
"</div>",
[user objectForKey:@"user_id"],
[user objectForKey:@"photo_url"],
[user objectForKey:@"username"],
[reply_dict objectForKey:@"publish_date"],

View file

@ -11,6 +11,7 @@
@class NewsBlurAppDelegate;
@class ProfileBadge;
@class ActivityModule;
@interface UserProfileViewController : UIViewController <ASIHTTPRequestDelegate> {
NewsBlurAppDelegate *appDelegate;
@ -18,13 +19,12 @@
UILabel *followingCount;
UILabel *followersCount;
ProfileBadge *profileBadge;
ActivityModule *activityModule;
}
@property (retain, nonatomic) IBOutlet NewsBlurAppDelegate *appDelegate;
@property (retain, nonatomic) IBOutlet ProfileBadge *profileBadge;
@property (retain, nonatomic) IBOutlet UILabel *followingCount;
@property (retain, nonatomic) IBOutlet UILabel *followersCount;
@property (retain, nonatomic) NewsBlurAppDelegate *appDelegate;
@property (retain, nonatomic) ProfileBadge *profileBadge;
@property (retain, nonatomic) ActivityModule *activityModule;
- (void)getUserProfile;
- (void)requestFinished:(ASIHTTPRequest *)request;

View file

@ -11,15 +11,15 @@
#import "ASIHTTPRequest.h"
#import "JSON.h"
#import "ProfileBadge.h"
#import "ActivityModule.h"
#import "Utilities.h"
#import "MBProgressHUD.h"
@implementation UserProfileViewController
@synthesize appDelegate;
@synthesize followingCount;
@synthesize followersCount;
@synthesize profileBadge;
@synthesize activityModule;
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
@ -38,16 +38,22 @@
ProfileBadge *badge = [[ProfileBadge alloc] init];
badge.frame = CGRectMake(0, 0, 320, 140);
self.profileBadge = badge;
ActivityModule *activity = [[ActivityModule alloc] init];
activity.frame = CGRectMake(0, badge.frame.size.height, 320, 300);
self.activityModule = activity;
self.view.frame = CGRectMake(0, 0, 320, 500);
self.view.backgroundColor = [UIColor whiteColor];
[self.view addSubview:self.profileBadge];
[badge release];
[activity release];
}
- (void)viewDidUnload
{
[self setFollowingCount:nil];
[self setFollowersCount:nil];
[self setActivityModule:nil];
[self setProfileBadge:nil];
[super viewDidUnload];
// Release any retained subviews of the main view.
@ -65,9 +71,8 @@
- (void)dealloc {
[appDelegate release];
[followingCount release];
[followersCount release];
[profileBadge release];
[activityModule release];
[super dealloc];
}
@ -78,10 +83,10 @@
- (void)getUserProfile {
[MBProgressHUD hideHUDForView:self.view animated:YES];
MBProgressHUD *HUD = [MBProgressHUD showHUDAddedTo:self.view animated:YES];
HUD.labelText = @"Finding...";
HUD.labelText = @"Profiling...";
[self.profileBadge initProfile];
NSString *urlString = [NSString stringWithFormat:@"http://%@/social/settings/%@",
NSString *urlString = [NSString stringWithFormat:@"http://%@/social/profile?user_id=%@",
NEWSBLUR_URL,
appDelegate.activeUserProfileId];
NSURL *url = [NSURL URLWithString:urlString];
@ -107,8 +112,9 @@
}
[MBProgressHUD hideHUDForView:self.view animated:YES];
[self.profileBadge refreshWithProfile:results];
[self.profileBadge refreshWithProfile:[results objectForKey:@"user_profile"]];
[self.activityModule refreshWithActivities:[results objectForKey:@"activities"]];
[results release];
}

View file

@ -15,5 +15,6 @@
+ (void)saveImage:(UIImage *)image feedId:(NSString *)filename;
+ (UIImage *)getImage:(NSString *)filename;
+ (void)saveimagesToDisk;
+ (UIImage *)roundCorneredImage:(UIImage *)orig radius:(CGFloat)r;
@end

View file

@ -58,4 +58,14 @@ static NSMutableDictionary *imageCache;
} copy] autorelease]);
}
+ (UIImage *)roundCorneredImage: (UIImage*) orig radius:(CGFloat) r {
UIGraphicsBeginImageContextWithOptions(orig.size, NO, 0);
[[UIBezierPath bezierPathWithRoundedRect:(CGRect){CGPointZero, orig.size}
cornerRadius:r] addClip];
[orig drawInRect:(CGRect){CGPointZero, orig.size}];
UIImage* result = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return result;
}
@end

View file

@ -115,6 +115,11 @@
437F975E15ACF5D20007136B /* read@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 437F975815ACF5D20007136B /* read@2x.png */; };
437F975F15ACF5D20007136B /* unread.png in Resources */ = {isa = PBXBuildFile; fileRef = 437F975915ACF5D20007136B /* unread.png */; };
437F976015ACF5D20007136B /* unread@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 437F975A15ACF5D20007136B /* unread@2x.png */; };
437F976915ADFD980007136B /* focused_color.png in Resources */ = {isa = PBXBuildFile; fileRef = 437F976515ADFD980007136B /* focused_color.png */; };
437F976A15ADFD980007136B /* focused_color@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 437F976615ADFD980007136B /* focused_color@2x.png */; };
437F976B15ADFD980007136B /* unread_color.png in Resources */ = {isa = PBXBuildFile; fileRef = 437F976715ADFD980007136B /* unread_color.png */; };
437F976C15ADFD980007136B /* unread_color@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 437F976815ADFD980007136B /* unread_color@2x.png */; };
437F976F15AE21290007136B /* ActivityModule.m in Sources */ = {isa = PBXBuildFile; fileRef = 437F976E15AE21280007136B /* ActivityModule.m */; };
4389E9E9159B931900BEA604 /* Screen Shot 2012-06-27 at 12.14.10 PM.png in Resources */ = {isa = PBXBuildFile; fileRef = 4389E9E8159B931900BEA604 /* Screen Shot 2012-06-27 at 12.14.10 PM.png */; };
438F525D159B65E200211B65 /* 16-List.png in Resources */ = {isa = PBXBuildFile; fileRef = 438F525B159B65E200211B65 /* 16-List.png */; };
438F5262159B6F8C00211B65 /* MBProgressHUD.m in Sources */ = {isa = PBXBuildFile; fileRef = 438F5261159B6F0400211B65 /* MBProgressHUD.m */; };
@ -373,6 +378,12 @@
437F975815ACF5D20007136B /* read@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "read@2x.png"; sourceTree = "<group>"; };
437F975915ACF5D20007136B /* unread.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = unread.png; sourceTree = "<group>"; };
437F975A15ACF5D20007136B /* unread@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "unread@2x.png"; sourceTree = "<group>"; };
437F976515ADFD980007136B /* focused_color.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = focused_color.png; sourceTree = "<group>"; };
437F976615ADFD980007136B /* focused_color@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "focused_color@2x.png"; sourceTree = "<group>"; };
437F976715ADFD980007136B /* unread_color.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = unread_color.png; sourceTree = "<group>"; };
437F976815ADFD980007136B /* unread_color@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "unread_color@2x.png"; sourceTree = "<group>"; };
437F976D15AE21280007136B /* ActivityModule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ActivityModule.h; sourceTree = "<group>"; };
437F976E15AE21280007136B /* ActivityModule.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ActivityModule.m; sourceTree = "<group>"; };
4389E9E8159B931900BEA604 /* Screen Shot 2012-06-27 at 12.14.10 PM.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Screen Shot 2012-06-27 at 12.14.10 PM.png"; sourceTree = "<group>"; };
438F525B159B65E200211B65 /* 16-List.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "16-List.png"; sourceTree = "<group>"; };
438F5260159B6F0400211B65 /* MBProgressHUD.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MBProgressHUD.h; sourceTree = "<group>"; };
@ -773,6 +784,8 @@
431B856C15A0D91E00DCE497 /* UserProfileViewController.m */,
431B857F15A23C6B00DCE497 /* ProfileBadge.h */,
431B858015A23C6B00DCE497 /* ProfileBadge.m */,
437F976D15AE21280007136B /* ActivityModule.h */,
437F976E15AE21280007136B /* ActivityModule.m */,
);
name = Social;
sourceTree = "<group>";
@ -840,6 +853,10 @@
431B857615A132B600DCE497 /* Images */ = {
isa = PBXGroup;
children = (
437F976515ADFD980007136B /* focused_color.png */,
437F976615ADFD980007136B /* focused_color@2x.png */,
437F976715ADFD980007136B /* unread_color.png */,
437F976815ADFD980007136B /* unread_color@2x.png */,
437F975515ACF5D20007136B /* focused.png */,
437F975615ACF5D20007136B /* focused@2x.png */,
437F975715ACF5D20007136B /* read.png */,
@ -1606,6 +1623,10 @@
437F975E15ACF5D20007136B /* read@2x.png in Resources */,
437F975F15ACF5D20007136B /* unread.png in Resources */,
437F976015ACF5D20007136B /* unread@2x.png in Resources */,
437F976915ADFD980007136B /* focused_color.png in Resources */,
437F976A15ADFD980007136B /* focused_color@2x.png in Resources */,
437F976B15ADFD980007136B /* unread_color.png in Resources */,
437F976C15ADFD980007136B /* unread_color@2x.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -1725,6 +1746,7 @@
431B856E15A0D91E00DCE497 /* UserProfileViewController.m in Sources */,
431B858115A23C6B00DCE497 /* ProfileBadge.m in Sources */,
437F974C15ACA0ED0007136B /* DashboardViewController.m in Sources */,
437F976F15AE21290007136B /* ActivityModule.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};

View file

@ -73,7 +73,6 @@
<string key="NSFrame">{{0, 960}, {320, 44}}</string>
<reference key="NSSuperview" ref="191373211"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView"/>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MC4yMjcwMjkxMjggMC4zNjIxMzU3NzY0IDAuNDU2NTIxNzM5MQA</bytes>
@ -216,8 +215,8 @@
<reference key="object" ref="191373211"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="576313732"/>
<reference ref="929039419"/>
<reference ref="576313732"/>
</object>
<reference key="parent" ref="0"/>
</object>
@ -526,6 +525,64 @@
<string key="minorKey">./Classes/BaseViewController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">DashboardViewController</string>
<string key="superclassName">UIViewController</string>
<object class="NSMutableDictionary" key="actions">
<string key="NS.key.0">doLogout:</string>
<string key="NS.object.0">id</string>
</object>
<object class="NSMutableDictionary" key="actionInfosByName">
<string key="NS.key.0">doLogout:</string>
<object class="IBActionInfo" key="NS.object.0">
<string key="name">doLogout:</string>
<string key="candidateClassName">id</string>
</object>
</object>
<object class="NSMutableDictionary" key="outlets">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>appDelegate</string>
<string>bottomToolbar</string>
<string>interactionsTable</string>
</object>
<object class="NSArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>NewsBlurAppDelegate</string>
<string>UIToolbar</string>
<string>UITableView</string>
</object>
</object>
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>appDelegate</string>
<string>bottomToolbar</string>
<string>interactionsTable</string>
</object>
<object class="NSArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBToOneOutletInfo">
<string key="name">appDelegate</string>
<string key="candidateClassName">NewsBlurAppDelegate</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">bottomToolbar</string>
<string key="candidateClassName">UIToolbar</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">interactionsTable</string>
<string key="candidateClassName">UITableView</string>
</object>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/DashboardViewController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">FeedDashboardViewController</string>
<string key="superclassName">UIViewController</string>
@ -1526,6 +1583,7 @@
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>addSiteViewController</string>
<string>dashboardViewController</string>
<string>feedDashboardViewController</string>
<string>feedDetailViewController</string>
<string>feedsMenuViewController</string>
@ -1542,7 +1600,6 @@
<string>shareViewController</string>
<string>splitStoryController</string>
<string>splitStoryDetailNavigationController</string>
<string>splitStoryDetailViewController</string>
<string>storyDetailViewController</string>
<string>userProfileViewController</string>
<string>window</string>
@ -1550,6 +1607,7 @@
<object class="NSArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>AddSiteViewController</string>
<string>DashboardViewController</string>
<string>FeedDashboardViewController</string>
<string>FeedDetailViewController</string>
<string>FeedsMenuViewController</string>
@ -1566,7 +1624,6 @@
<string>ShareViewController</string>
<string>MGSplitViewController</string>
<string>UINavigationController</string>
<string>SplitStoryDetailViewController</string>
<string>StoryDetailViewController</string>
<string>UserProfileViewController</string>
<string>UIWindow</string>
@ -1577,6 +1634,7 @@
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>addSiteViewController</string>
<string>dashboardViewController</string>
<string>feedDashboardViewController</string>
<string>feedDetailViewController</string>
<string>feedsMenuViewController</string>
@ -1593,7 +1651,6 @@
<string>shareViewController</string>
<string>splitStoryController</string>
<string>splitStoryDetailNavigationController</string>
<string>splitStoryDetailViewController</string>
<string>storyDetailViewController</string>
<string>userProfileViewController</string>
<string>window</string>
@ -1604,6 +1661,10 @@
<string key="name">addSiteViewController</string>
<string key="candidateClassName">AddSiteViewController</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">dashboardViewController</string>
<string key="candidateClassName">DashboardViewController</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">feedDashboardViewController</string>
<string key="candidateClassName">FeedDashboardViewController</string>
@ -1668,10 +1729,6 @@
<string key="name">splitStoryDetailNavigationController</string>
<string key="candidateClassName">UINavigationController</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">splitStoryDetailViewController</string>
<string key="candidateClassName">SplitStoryDetailViewController</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">storyDetailViewController</string>
<string key="candidateClassName">StoryDetailViewController</string>
@ -1954,6 +2011,25 @@
<string key="minorKey">./Classes/OriginalStoryViewController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">ProfileBadge</string>
<string key="superclassName">UIView</string>
<object class="NSMutableDictionary" key="actions">
<string key="NS.key.0">doFollowButton:</string>
<string key="NS.object.0">id</string>
</object>
<object class="NSMutableDictionary" key="actionInfosByName">
<string key="NS.key.0">doFollowButton:</string>
<object class="IBActionInfo" key="NS.object.0">
<string key="name">doFollowButton:</string>
<string key="candidateClassName">id</string>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/ProfileBadge.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">ShareViewController</string>
<string key="superclassName">UIViewController</string>
@ -2068,83 +2144,6 @@
<string key="minorKey">./Classes/ShareViewController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">SocialBadge</string>
<string key="superclassName">UIView</string>
<object class="NSMutableDictionary" key="actions">
<string key="NS.key.0">doFollowButton:</string>
<string key="NS.object.0">id</string>
</object>
<object class="NSMutableDictionary" key="actionInfosByName">
<string key="NS.key.0">doFollowButton:</string>
<object class="IBActionInfo" key="NS.object.0">
<string key="name">doFollowButton:</string>
<string key="candidateClassName">id</string>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/SocialBadge.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">SplitStoryDetailViewController</string>
<string key="superclassName">UIViewController</string>
<object class="NSMutableDictionary" key="actions">
<string key="NS.key.0">doLogoutButton:</string>
<string key="NS.object.0">id</string>
</object>
<object class="NSMutableDictionary" key="actionInfosByName">
<string key="NS.key.0">doLogoutButton:</string>
<object class="IBActionInfo" key="NS.object.0">
<string key="name">doLogoutButton:</string>
<string key="candidateClassName">id</string>
</object>
</object>
<object class="NSMutableDictionary" key="outlets">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>appDelegate</string>
<string>bottomToolbar</string>
<string>scrollView</string>
</object>
<object class="NSArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>NewsBlurAppDelegate</string>
<string>UIToolbar</string>
<string>UIScrollView</string>
</object>
</object>
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>appDelegate</string>
<string>bottomToolbar</string>
<string>scrollView</string>
</object>
<object class="NSArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBToOneOutletInfo">
<string key="name">appDelegate</string>
<string key="candidateClassName">NewsBlurAppDelegate</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">bottomToolbar</string>
<string key="candidateClassName">UIToolbar</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">scrollView</string>
<string key="candidateClassName">UIScrollView</string>
</object>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/SplitStoryDetailViewController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">StoryDetailViewController</string>
<string key="superclassName">UIViewController</string>
@ -2304,14 +2303,14 @@
<string>appDelegate</string>
<string>followersCount</string>
<string>followingCount</string>
<string>socialBadge</string>
<string>profileBadge</string>
</object>
<object class="NSArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>NewsBlurAppDelegate</string>
<string>UILabel</string>
<string>UILabel</string>
<string>SocialBadge</string>
<string>ProfileBadge</string>
</object>
</object>
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
@ -2321,7 +2320,7 @@
<string>appDelegate</string>
<string>followersCount</string>
<string>followingCount</string>
<string>socialBadge</string>
<string>profileBadge</string>
</object>
<object class="NSArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
@ -2338,8 +2337,8 @@
<string key="candidateClassName">UILabel</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">socialBadge</string>
<string key="candidateClassName">SocialBadge</string>
<string key="name">profileBadge</string>
<string key="candidateClassName">ProfileBadge</string>
</object>
</object>
</object>

Binary file not shown.

After

Width:  |  Height:  |  Size: 728 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 595 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 KiB

File diff suppressed because one or more lines are too long

View file

@ -267,6 +267,10 @@ div + p {
clear: both;
}
#story_pane .nb-feed-story-comments {
max-width: none;
}
.NB-story-title {
clear: left;
margin: 8px 0 4px;

View file

@ -7,7 +7,7 @@ $('.NB-story img').bind('load', function() {
});
$('a.NB-show-profile').click(function(){
var offset = $(this).offset();
var offset = $('img', this).offset();
console.log(offset);
var url = $(this).attr('href') + "/" + offset.left + "/" + (offset.top - window.pageYOffset) + "/" + offset.width + "/" + offset.height;
window.location = url;