<commit_before># -----------------------------------------------------------------------------
# Author: <NAME> <<EMAIL>>,
#         Slate Studio (http://www.slatestudio.com)
#
# Coding Guide:
#   https://github.com/thoughtbot/guides/tree/master/style/coffeescript
# -----------------------------------------------------------------------------

# -----------------------------------------------------------------------------
# CHARACTER ROUTER
# -----------------------------------------------------------------------------

@chrRouter =

  # PRIVATE ===============================================

  _route: (path) -> #/<module>[/<list>][/new]OR[/view/<objectId>]
    crumbs = path.split('/')
    update_list_items = true


    if @module
      path = location.hash

      # do not update items when return to active list from view
      if @module.activeList.path == path
        update_list_items = false

      # do not update items when show view
      view_path = path.replace(@module.activeList.path, '')

      if view_path.startsWith('/new/') || view_path.startsWith('/view/')
        update_list_items = false


    # if module changed, hide previous module & update list items
    if @module != @modules[crumbs[1]]
      @module?.hide()


    @module = @modules[crumbs[1]] # module name on position 1


    if @module
      @module.show()
      if update_list_items # for root list
        @module.activeList.updateItems()

      config = @module.config
      crumbs = crumbs.splice(2) # remove #/<module> part

      if crumbs.length > 0<commit_msg>fix navigation for new objects;<commit_after># -----------------------------------------------------------------------------
# Author: <NAME> <<EMAIL>>,
#         Slate Studio (http://www.slatestudio.com)
#
# Coding Guide:
#   https://github.com/thoughtbot/guides/tree/master/style/coffeescript
# -----------------------------------------------------------------------------

# -----------------------------------------------------------------------------
# CHARACTER ROUTER
# -----------------------------------------------------------------------------

@chrRouter =

  # PRIVATE ===============================================

  _route: (path) -> #/<module>[/<list>][/new]OR[/view/<objectId>]
    crumbs = path.split('/')
    update_list_items = true


    if @module
      path = location.hash

      # do not update items when return to active list from view
      if @module.activeList.path == path
        update_list_items = false

      # do not update items when show view
      view_path = path.replace(@module.activeList.path, '')

      if view_path.startsWith('/view/') || view_path.endsWith('/new')
        update_list_items = false


    # if module changed, hide previous module & update list items
    if @module != @modules[crumbs[1]]
      @module?.hide()


    @module = @modules[crumbs[1]] # module name on position 1


    if @module
      @module.show()
      if update_list_items # for root list
        @module.activeList.updateItems()

      config = @module.config
      crumbs = crumbs.splice(2) # remove #/<module> part

      if crumbs.length > 0
{'fraction_non_alphanumeric': 0.3279210442534225, 'fraction_numerical': 0.003183699458771092, 'mean_word_length': 1.4662480376766092, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 21, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1209406', 'n_tokens_mistral': 833, 'n_tokens_neox': 794, 'n_words': 191}