Fixing blurblog preview, using fetched blurblog title when not available, styling on Friends.

This commit is contained in:
Samuel Clay 2012-05-10 09:45:07 -07:00
parent 96fcc65afe
commit be479b46b6
3 changed files with 13 additions and 4 deletions

View file

@ -259,6 +259,7 @@ class MSocialProfile(mongo.Document):
'username': self.username,
'photo_url': self.profile_photo_url,
'num_subscribers': self.follower_count,
'feed_title': self.title,
'feed_address': "http://%s%s" % (domain, reverse('shared-stories-rss-feed',
kwargs={'user_id': self.user_id, 'username': self.username_slug})),
'feed_link': "http://%s%s" % (domain, reverse('load-social-page',

View file

@ -7391,7 +7391,7 @@ background: transparent;
border: 0;
border-top: 1px solid #E6E6E6;
padding: 0 12px;
margin: 0;
margin: 12px 0 0;
}
.NB-modal-friends fieldset legend {
padding: 0 12px;
@ -7516,7 +7516,7 @@ background: transparent;
}
.NB-modal-friends .NB-profile-section-heading {
text-align: center;
margin: 4px 0;
margin: 18px 0 0px;
border-bottom: 1px solid #E0E0E0;
padding: 0 0 16px;
}

View file

@ -917,7 +917,7 @@
scroll_story_titles_to_show_selected_story_title: function($story) {
var $story = $story || this.find_story_in_story_titles();
if (!$story) return;
if (!$story || !$story.length) return;
var $story_titles = this.$s.$story_titles;
var story_title_visisble = $story_titles.isScrollVisible($story);
if (!story_title_visisble) {
@ -931,7 +931,7 @@
scroll_feed_list_to_show_selected_feed: function($feed) {
$feed = $feed || this.find_feed_in_feed_list(this.active_feed);
if (!$feed) return;
if (!$feed || !$feed.length) return;
var $feed_lists = this.$s.$feed_lists;
var is_feed_visible = $feed_lists.isScrollVisible($feed);
if (!is_feed_visible) {
@ -1332,6 +1332,12 @@
make_feed_title_template: function(feed, type, depth) {
var unread_class = '';
var exception_class = '';
if (NEWSBLUR.utils.is_feed_social(feed)) {
if (!feed.feed_title) {
var profile = this.model.user_profiles.get(feed.user_id) || {};
feed.feed_title = profile.feed_title;
}
}
if (feed.ps) {
unread_class += ' unread_positive';
}
@ -2416,6 +2422,7 @@
if (this.flags['showing_social_feed_in_tryfeed_view']) {
this.show_tryfeed_follow_button();
this.correct_tryfeed_title();
}
}
},
@ -7159,6 +7166,7 @@
$('.NB-feeds-header-title', this.$s.$tryfeed_header).text(social_feed.get('username'));
$('.NB-feeds-header-icon', this.$s.$tryfeed_header).attr('src', $.favicon(social_feed.attributes));
$('.NB-feeds-header-title', this.$s.$tryfeed_header).text(social_feed.get('username'));
$tryfeed_container.slideDown(350, _.bind(function() {
this.open_social_stories(social_feed.get('id'), options);