mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-09-18 21:50:56 +00:00
Fixing up statistics modal.Also handling weird URL cases in icon fetching.
This commit is contained in:
parent
40b6ac4c7c
commit
f3d922f6b1
4 changed files with 6 additions and 5 deletions
|
@ -178,7 +178,7 @@ class IconImporter(object):
|
||||||
return image, icon_file
|
return image, icon_file
|
||||||
try:
|
try:
|
||||||
image, icon_file = _1(url)
|
image, icon_file = _1(url)
|
||||||
except (urllib2.HTTPError, urllib2.URLError, IOError, TimeoutError):
|
except (urllib2.HTTPError, urllib2.URLError, IOError, TimeoutError, ValueError):
|
||||||
return None, None
|
return None, None
|
||||||
return image, icon_file
|
return image, icon_file
|
||||||
|
|
||||||
|
|
|
@ -66,7 +66,7 @@ def load_feed_statistics(request):
|
||||||
stats['active_subscribers'] = feed.active_subscribers
|
stats['active_subscribers'] = feed.active_subscribers
|
||||||
|
|
||||||
logging.info(" ---> [%s] ~FBStatistics: ~SB%s ~FG(%s/%s/%s subs)" % (request.user, feed, feed.num_subscribers, feed.active_subscribers, feed.premium_subscribers,))
|
logging.info(" ---> [%s] ~FBStatistics: ~SB%s ~FG(%s/%s/%s subs)" % (request.user, feed, feed.num_subscribers, feed.active_subscribers, feed.premium_subscribers,))
|
||||||
|
|
||||||
return stats
|
return stats
|
||||||
|
|
||||||
@ajax_login_required
|
@ajax_login_required
|
||||||
|
|
|
@ -3651,10 +3651,10 @@ background: transparent;
|
||||||
width: 524px;
|
width: 524px;
|
||||||
height: 180px;
|
height: 180px;
|
||||||
}
|
}
|
||||||
.NB-modal-statistics .NB-modal-feed-chooser-container {
|
.NB-modal.NB-modal-statistics .NB-modal-feed-chooser-container {
|
||||||
margin: 3px 0 12px;
|
margin: 3px 0 12px;
|
||||||
}
|
}
|
||||||
.NB-modal-statistics .NB-modal-feed-chooser-container .NB-modal-feed-chooser {
|
.NB-modal.NB-modal-statistics .NB-modal-feed-chooser-container .NB-modal-feed-chooser {
|
||||||
margin: 0 0 12px;
|
margin: 0 0 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -166,8 +166,9 @@ NEWSBLUR.ReaderStatistics.prototype = {
|
||||||
])
|
])
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
var count = _.isUndefined(data['subscriber_count']) && 'Loading ' || data['subscriber_count'];
|
||||||
var $subscribers = $.make('div', { className: 'NB-statistics-subscribers' }, [
|
var $subscribers = $.make('div', { className: 'NB-statistics-subscribers' }, [
|
||||||
$.make('span', { className: 'NB-statistics-subscribers-count' }, ''+data['subscriber_count']),
|
$.make('span', { className: 'NB-statistics-subscribers-count' }, ''+count),
|
||||||
$.make('span', { className: 'NB-statistics-subscribers-label' }, 'subscriber' + (data['subscriber_count']==1?'':'s'))
|
$.make('span', { className: 'NB-statistics-subscribers-label' }, 'subscriber' + (data['subscriber_count']==1?'':'s'))
|
||||||
]);
|
]);
|
||||||
$('.NB-statistics-subscribers', this.$modal).remove();
|
$('.NB-statistics-subscribers', this.$modal).remove();
|
||||||
|
|
Loading…
Add table
Reference in a new issue