     catchAjaxError: ->
         @$('.span-12').html '<h3>Could not get files :(</h3>'
 
+    scrollToTop: ->
+        offset = @$el.offset().top
+        $(window).scrollTop offset
+
     navigate: (event) ->
         event.preventDefault()
-
 
         $table = @$ 'table'
         # Get table height for later


        app.router.navigate "#task/#{ @collection.taskId }/files/#{ @collection.path }"

        @collection.reset()
        @collection.fetch()

        @render()

        $loaderContainer = @$ '.page-loader-container'
        if tableHeight?
            $loaderContainer.css 'height', "#{ tableHeight }px"

            breadcrumbs: breadcrumbs

        if @scrollWhenReady
            @scrollToTop()

            # Only do it once
            @scrollWhenReady = false
