<commit_before>job_popover_matcher = '[data-toggle="popover"][data-popover-type="job-history"]'

@init_table_info_popover= () ->
  $('[data-toggle="popover"][data-popover-type="table-info-hint"]').popover
    placement: 'top'
    trigger: 'focus'

@init_history_popover= () ->
  # init popovers elements
  init_job_popover()

@init_job_popover= () ->
  $(job_popover_matcher).popover
    placement: 'top'
    html: true

  # add click handler to the popovers to hide popover if other popover is clicked
  $(job_popover_matcher).on 'click', job_popover_close_other_popovers_handler

  # add click handler to close the jobs popover when shown
  $(job_popover_matcher).on 'shown.bs.popover', -><commit_msg>[automation-plugin]: fix jumping when clicking info icon on tables<commit_after>job_popover_matcher = '[data-toggle="popover"][data-popover-type="job-history"]'

@init_table_info_popover= () ->
  $('[data-toggle="popover"][data-popover-type="table-info-hint"]').popover
    placement: 'top'
    trigger: 'focus'
  $('[data-toggle="popover"][data-popover-type="table-info-hint"]').on 'click', (e) ->
    e.stopPropagation()
    e.preventDefault()

@init_history_popover= () ->
  # init popovers elements
  init_job_popover()

@init_job_popover= () ->
  $(job_popover_matcher).popover
    placement: 'top'
    html: true

  # add click handler to the popovers to hide popover if other popover is clicked
  $(job_popover_matcher).on 'click', job_popover_close_other_popovers_handler

  # add click handler to close the jobs popover when shown
  $(job_popover_matcher).on 'shown.bs.popover', ->
{'fraction_non_alphanumeric': 0.14438166980539863, 'fraction_numerical': 0.0, 'mean_word_length': 5.06083650190114, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '4554913', 'n_tokens_mistral': 559, 'n_tokens_neox': 547, 'n_words': 109}