       fields.push(tableField)
     fields
 
+  ###
+  # gotoEvent - navigates to a selected event
+  #
+  # @param {object} event, DOM event
+  # @param {object} instance, template instance
+  ###
   gotoEvent: (event, instance) ->
     route = instance.tableOptions.name.slice(0, -1)
     if event.metaKey

module.exports =
  manageTableSorting: (instance) ->
    tableOptions = instance.tableOptions
    fields = tableOptions.fields

    else
      Router.go route, _id: @_id

  ###
  # scrollToTop - scrolls document to top of window
  ###
  scrollToTop: ->
    if window.scrollY > 0 and window.innerHeight < 700
      $(document.body).animate({scrollTop: 0}, 400)
