focusing JS only on story body

This commit is contained in:
Roy Yang 2012-06-28 15:11:39 -07:00
parent e7ef5da019
commit d10e24bb57
2 changed files with 11 additions and 6 deletions

View file

@ -200,6 +200,7 @@
}
comments = [comments stringByAppendingString:[NSString stringWithFormat:@"</div>"]];
}
return comments;
}
@ -226,6 +227,7 @@
[user objectForKey:@"username"],
[commentDict objectForKey:@"comments"],
[self getReplies:[commentDict objectForKey:@"replies"]]];
return comment;
}
@ -238,10 +240,13 @@
NSDictionary *user = [self getUser:[[reply_dict objectForKey:@"user_id"] intValue]];
NSString *reply = [NSString stringWithFormat:@
"<div class=\"NB-story-comment-reply\">"
"<img class=\"NB-user-avatar NB-story-comment-reply-photo\" src=\"%@\" />"
"<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-reply-content\">%@</div>"
" <img class=\"NB-user-avatar NB-story-comment-reply-photo\" src=\"%@\" />"
" <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:@"photo_url"],
[user objectForKey:@"username"],

View file

@ -1,8 +1,8 @@
$('img').each(function() {
$('.NB-story img').each(function() {
setImage(this);
});
$('img').bind('load', function() {
$('.NB-story img').bind('load', function() {
setImage(this);
});