mirror of
https://github.com/viq/NewsBlur.git
synced 2025-09-18 21:43:31 +00:00
Fixing the living crap out of IE9. Everything works excellently now.
This commit is contained in:
parent
e2da3881d4
commit
c9425860d8
4 changed files with 23 additions and 8 deletions
|
@ -51,6 +51,7 @@ from vendor.timezones.utilities import localtime_for_timezone
|
|||
|
||||
SINGLE_DAY = 60*60*24
|
||||
|
||||
@never_cache
|
||||
@render_to('reader/feeds.xhtml')
|
||||
def index(request, **kwargs):
|
||||
if request.method == "GET" and request.subdomain and request.subdomain != 'dev':
|
||||
|
@ -178,6 +179,7 @@ def autologin(request, username, secret):
|
|||
return HttpResponseRedirect(reverse('index') + next)
|
||||
|
||||
@ratelimit(minutes=1, requests=12)
|
||||
@never_cache
|
||||
@json.json_view
|
||||
def load_feeds(request):
|
||||
user = get_user(request)
|
||||
|
@ -324,6 +326,7 @@ def load_feeds_flat(request):
|
|||
return data
|
||||
|
||||
@ratelimit(minutes=1, requests=20)
|
||||
@never_cache
|
||||
@json.json_view
|
||||
def refresh_feeds(request):
|
||||
user = get_user(request)
|
||||
|
@ -390,6 +393,7 @@ def refresh_feed(request, feed_id):
|
|||
return load_single_feed(request, feed_id)
|
||||
|
||||
@json.json_view
|
||||
@never_cache
|
||||
def load_single_feed(request, feed_id):
|
||||
start = time.time()
|
||||
user = get_user(request)
|
||||
|
|
|
@ -193,9 +193,9 @@ _.extend(NEWSBLUR.ReaderIntro.prototype, {
|
|||
|
||||
} else {
|
||||
var syncing = this.services && this.services[service] && this.services[service].syncing;
|
||||
$service = $.make('div', { className: 'NB-friends-service NB-friends-service-'+service }, [
|
||||
$service = $.make('div', { className: 'NB-friends-service NB-friends-service-'+service + (syncing ? ' NB-friends-service-syncing' : '') }, [
|
||||
$.make('div', { className: 'NB-friends-service-title' }, _.string.capitalize(service)),
|
||||
$.make('div', { className: 'NB-friends-service-connect NB-modal-submit-button NB-modal-submit-green' }, [
|
||||
$.make('div', { className: 'NB-friends-service-connect NB-modal-submit-button ' + (syncing ? 'NB-modal-submit-grey' : 'NB-modal-submit-green') }, [
|
||||
$.make('img', { src: NEWSBLUR.Globals.MEDIA_URL + '/img/reader/' + service + '_icon.png' }),
|
||||
(syncing ? 'Fetching...' : 'Find ' + _.string.capitalize(service) + ' Friends')
|
||||
])
|
||||
|
@ -239,13 +239,13 @@ _.extend(NEWSBLUR.ReaderIntro.prototype, {
|
|||
var options = "location=0,status=0,width=800,height=500";
|
||||
var url = "/oauth/" + service + "_connect";
|
||||
this.connect_window = window.open(url, '_blank', options);
|
||||
_gaq.push(['_trackEvent', 'reader_intro', 'Connect to ' + this.service.name + ' attempt']);
|
||||
_gaq.push(['_trackEvent', 'reader_intro', 'Connect to ' + service.name + ' attempt']);
|
||||
},
|
||||
|
||||
disconnect: function(service) {
|
||||
var $service = $('.NB-friends-service-'+service, this.$modal);
|
||||
$('.NB-friends-service-connect', $service).text('Disconnecting...');
|
||||
_gaq.push(['_trackEvent', 'reader_intro', 'Disconnect from ' + this.service.name]);
|
||||
_gaq.push(['_trackEvent', 'reader_intro', 'Disconnect from ' + service.name]);
|
||||
NEWSBLUR.assets.disconnect_social_service(service, _.bind(function(data) {
|
||||
this.services = data.services;
|
||||
this.make_find_friends_and_services();
|
||||
|
@ -255,6 +255,7 @@ _.extend(NEWSBLUR.ReaderIntro.prototype, {
|
|||
},
|
||||
|
||||
post_connect: function(data) {
|
||||
console.log(["Intro post_connect", data]);
|
||||
$('.NB-error', this.$modal).remove();
|
||||
if (data.error) {
|
||||
var $error = $.make('div', { className: 'NB-error' }, [
|
||||
|
@ -264,10 +265,10 @@ _.extend(NEWSBLUR.ReaderIntro.prototype, {
|
|||
$('.NB-intro-services', this.$modal).append($error);
|
||||
$error.animate({'opacity': 1}, {'duration': 1000});
|
||||
this.resize();
|
||||
_gaq.push(['_trackEvent', 'reader_intro', 'Connect to ' + this.service.name + ' error']);
|
||||
_gaq.push(['_trackEvent', 'reader_intro', 'Connect to service error']);
|
||||
} else {
|
||||
this.fetch_friends();
|
||||
_gaq.push(['_trackEvent', 'reader_intro', 'Connect to ' + this.service.name + ' success']);
|
||||
_gaq.push(['_trackEvent', 'reader_intro', 'Connect to service success']);
|
||||
}
|
||||
NEWSBLUR.assets.preference('has_found_friends', true);
|
||||
NEWSBLUR.reader.check_hide_getting_started();
|
||||
|
@ -365,7 +366,6 @@ _.extend(NEWSBLUR.ReaderIntro.prototype, {
|
|||
].join(""));
|
||||
|
||||
if (feed_count) {
|
||||
NEWSBLUR.assets.preference('has_setup_feeds', true);
|
||||
NEWSBLUR.reader.check_hide_getting_started();
|
||||
}
|
||||
},
|
||||
|
|
|
@ -155,9 +155,14 @@ NEWSBLUR.Views.StoryDetailView = Backbone.View.extend({
|
|||
|
||||
generate_gradients: function() {
|
||||
var $header = this.$('.NB-feed-story-header-feed');
|
||||
|
||||
|
||||
if (!this.feed) return;
|
||||
|
||||
var favicon_color = this.feed.get('favicon_color');
|
||||
if (favicon_color) {
|
||||
$header.css('backgroundColor', '#' + favicon_color);
|
||||
$header.css('background-image', 'none');
|
||||
}
|
||||
$header.css('background-image', NEWSBLUR.utils.generate_gradient(this.feed, 'webkit'));
|
||||
$header.css('background-image', NEWSBLUR.utils.generate_gradient(this.feed, 'moz'));
|
||||
$header.css('borderTop', NEWSBLUR.utils.generate_gradient(this.feed, 'border'));
|
||||
|
|
|
@ -28,6 +28,12 @@ def user(u, msg):
|
|||
platform = 'Androd'
|
||||
elif 'MSIE' in user_agent:
|
||||
platform = 'IE'
|
||||
if 'MSIE 9' in user_agent:
|
||||
platform += '9'
|
||||
elif 'MSIE 10' in user_agent:
|
||||
platform += '10'
|
||||
elif 'MSIE 8' in user_agent:
|
||||
platform += '8'
|
||||
elif 'Chrome' in user_agent:
|
||||
platform = 'Chrome'
|
||||
elif 'Safari' in user_agent:
|
||||
|
|
Loading…
Add table
Reference in a new issue