From e8da85562cfbf30ab084258f2bb0a56bde7828b3 Mon Sep 17 00:00:00 2001 From: Lisa Passing Date: Wed, 6 May 2015 16:35:26 +0200 Subject: [PATCH] add some scrolling to click on sidebar --- app/views/repos-list.coffee | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/views/repos-list.coffee b/app/views/repos-list.coffee index 5d4fba03..392294df 100644 --- a/app/views/repos-list.coffee +++ b/app/views/repos-list.coffee @@ -23,7 +23,13 @@ View = Ember.CollectionView.extend colorForState(@get('repo.lastBuildState')) ).property('repo.lastBuildState') + scrollTop: (-> + if (window.scrollY > 0) + $('html, body').animate({scrollTop: 0}, 200) + ) + click: -> + @scrollTop() @get('controller').transitionToRoute('/' + @get('repo.slug')) `export default View`