       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

        Session.set "#{tableName}-field-sort-order-#{fieldName}", tableOptions.sortOrder[fieldName].get()
        Session.set "#{tableName}-field-sort-direction-#{fieldName}", tableOptions.sortDirection[fieldName].get()

  ###
  # tableFields - creates the fields array to pass to the ReactiveTable within
  # settings. Field criterial is added to the fields array of the tableOptions object on
  # the template instance
  #
  # @param {object} instance, instance of template containing table
  # @return {array} fields, array containing fields for ReactiveTable
  ###
  tableFields: (instance) ->
    tableOptions = instance.tableOptions
    fields = []
