Changing scroll speed. Adding authenticated info to every request.

This commit is contained in:
Samuel Clay 2011-09-03 23:10:46 -07:00
parent 47556ec303
commit 8c0906fbff
4 changed files with 15 additions and 19 deletions

11
fabfile.py vendored
View file

@ -110,11 +110,20 @@ def staging_full():
@roles('task') @roles('task')
def celery(): def celery():
with cd(env.NEWSBLUR_PATH):
run('git pull') run('git pull')
celery_stop()
celery_start()
@roles('task')
def celery_stop():
with cd(env.NEWSBLUR_PATH):
run('sudo supervisorctl stop celery') run('sudo supervisorctl stop celery')
with settings(warn_only=True): with settings(warn_only=True):
run('./utils/kill_celery.sh') run('./utils/kill_celery.sh')
@roles('task')
def celery_start():
with cd(env.NEWSBLUR_PATH):
run('sudo supervisorctl start celery') run('sudo supervisorctl start celery')
run('tail logs/newsblur.log') run('tail logs/newsblur.log')

View file

@ -820,9 +820,9 @@
} }
// NEWSBLUR.log(['page_in_story', this.$s.$story_pane, direction, page_height, scroll_height]); // NEWSBLUR.log(['page_in_story', this.$s.$story_pane, direction, page_height, scroll_height]);
if (this.story_view == 'page') { if (this.story_view == 'page') {
this.$s.$feed_iframe.scrollTo({top:dir+'='+scroll_height, left:'+=0'}, 150); this.$s.$feed_iframe.scrollTo({top:dir+'='+scroll_height, left:'+=0'}, 260);
} else if (this.story_view == 'feed') { } else if (this.story_view == 'feed') {
this.$s.$feed_stories.scrollTo({top:dir+'='+scroll_height, left:'+=0'}, 150); this.$s.$feed_stories.scrollTo({top:dir+'='+scroll_height, left:'+=0'}, 370);
} }
}, },
@ -6032,7 +6032,7 @@
}); });
$document.bind('keydown', 'space', function(e) { $document.bind('keydown', 'space', function(e) {
e.preventDefault(); e.preventDefault();
self.page_in_story(0.4, 1); self.page_in_story(0.2, 1);
}); });
$document.bind('keydown', 'shift+space', function(e) { $document.bind('keydown', 'shift+space', function(e) {
e.preventDefault(); e.preventDefault();

View file

@ -1,15 +0,0 @@
django
mongoengine
django-celery
django-compress
South
django-extensions
psycopg2
BeautifulSoup
pyyaml
nltk
lxml
oauth2
pytz
boto
gunicorn

View file

@ -102,6 +102,8 @@ def json_view(func):
response = dict(response) response = dict(response)
if 'result' not in response: if 'result' not in response:
response['result'] = 'ok' response['result'] = 'ok'
authenticated = request.user.is_authenticated()
response['authenticated'] = authenticated
except KeyboardInterrupt: except KeyboardInterrupt:
# Allow keyboard interrupts through for debugging. # Allow keyboard interrupts through for debugging.
raise raise