Skip to content

Commit

Permalink
Small bugs.
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelclay committed Jul 16, 2012
1 parent 5adc74c commit a47abcb
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 12 deletions.
18 changes: 11 additions & 7 deletions media/js/newsblur/views/feed_list_header_view.js
Expand Up @@ -10,13 +10,17 @@ NEWSBLUR.Views.FeedListHeader = Backbone.View.extend({
},

initialize: function() {
_.bindAll(this, 'render');
this.collection.bind('reset', this.render);
this.collection.bind('add', this.render);
this.collection.bind('remove', this.render);
this.collection.bind('change:ps', this.render);
this.collection.bind('change:nt', this.render);
this.collection.bind('change:ng', this.render);
_.bindAll(this, 'render', 'defer_render');
this.collection.bind('reset', this.defer_render);
this.collection.bind('add', this.defer_render);
this.collection.bind('remove', this.defer_render);
this.collection.bind('change:ps', this.defer_render);
this.collection.bind('change:nt', this.defer_render);
this.collection.bind('change:ng', this.defer_render);
},

defer_render: function() {
_.defer(this.render);
},

render: function() {
Expand Down
2 changes: 1 addition & 1 deletion media/js/newsblur/views/original_tab_view.js
Expand Up @@ -489,7 +489,7 @@ NEWSBLUR.Views.OriginalTabView = Backbone.View.extend({
.unbind('click.NB-taskbar')
.bind('click.NB-taskbar', _.bind(function(e) {
var href = $(this).attr('href');
if (href.indexOf('#') == 0) {
if (href && href.indexOf('#') == 0) {
e.preventDefault();
var $footnote = $('a[name='+href.substr(1)+'], [id='+href.substr(1)+']',
$iframe_contents);
Expand Down
3 changes: 2 additions & 1 deletion settings.py
Expand Up @@ -390,7 +390,8 @@ def custom_show_toolbar(request):
# =========

REDIS_POOL = redis.ConnectionPool(host=REDIS['host'], port=6379, db=0)
REDIS_ANALYTICS_POOL = redis.ConnectionPool(host=REDIS['host'], port=6379, db=1)
REDIS_STORY_POOL = redis.ConnectionPool(host=REDIS['host'], port=6379, db=1)
REDIS_ANALYTICS_POOL = redis.ConnectionPool(host=REDIS['host'], port=6379, db=2)

JAMMIT = jammit.JammitAssets(NEWSBLUR_DIR)

Expand Down
4 changes: 1 addition & 3 deletions templates/base.html
Expand Up @@ -17,9 +17,7 @@
'is_staff' : {{ user.is_staff|yesno:"true,false" }},
'secret_token' : "{{ user.profile.secret_token }}",
'username' : "{{ user.username|safe }}",
{% if user.pk %}
'user_id' : {{ user.pk }},
{% endif %}
{% if user.pk %}'user_id' : {{ user.pk }},{% endif %}
'email' : "{{ user.email|safe }}",
'MEDIA_URL' : "{{ MEDIA_URL }}",
'debug' : {{ debug|yesno:"true,false" }}
Expand Down

0 comments on commit a47abcb

Please sign in to comment.