Fixing up push expires text.

This commit is contained in:
Samuel Clay 2013-06-29 11:29:23 -07:00
parent b3ee9a0e3e
commit 16da80787d
2 changed files with 7 additions and 1 deletions

View file

@ -11,6 +11,7 @@ from django.template import RequestContext
from apps.rss_feeds.models import Feed, merge_feeds
from apps.rss_feeds.models import MFetchHistory
from apps.rss_feeds.models import MFeedIcon
from apps.push.models import PushSubscription
from apps.analyzer.models import get_classifiers_for_user
from apps.reader.models import UserSubscription
from apps.rss_feeds.models import MStory

View file

@ -75,7 +75,12 @@ _.extend(NEWSBLUR.ReaderStatistics.prototype, {
var $stats = this.make_stats(data);
$('.NB-modal-statistics-info', this.$modal).replaceWith($stats);
$(".NB-modal-feed-subscribers", this.$modal).removeClass('NB-hidden').text(Inflector.pluralize(' subscriber', data.num_subscribers, true));
$(".NB-statistics-push-expires", this.$modal).html(data['lease_expires'] || "");
var $expires = $(".NB-statistics-push-expires", this.$modal);
if (data['lease_expires']) {
$expires.html("Push expires: " + data['lease_expires']);
} else {
$expires.html("");
}
setTimeout(function() {
self.make_charts(data);
}, this.first_load ? 200 : 50);