<commit_before>ETahi.PhaseHeaderView = Em.View.extend
  templateName: 'phase_header'
  classNames: ['column-header']
  classNameBindings: ['active']
  active: false

  focusIn: (e)->
    @set('active', true)

  keyUp: (e)->
    Tahi.utils.resizeColumnHeaders()

  actions:
    save: ->
      @set('active', false)
      name = @$('h2').get(0).innerText
      phase = @get('phase')

      if phase.get('name') != name
        phase.set('name', name)
        phase.save()

    cancel: ->
      @set('active', false)
      @get('phase').rollback()<commit_msg>Resize phase column titles on cancel of edit<commit_after>ETahi.PhaseHeaderView = Em.View.extend
  templateName: 'phase_header'
  classNames: ['column-header']
  classNameBindings: ['active']
  active: false

  focusIn: (e)->
    @set('active', true)

  keyUp: (e)->
    Tahi.utils.resizeColumnHeaders()

  phaseTitleDidChange: (->
    # race condition? :(
    Em.run.later (->
      Tahi.utils.resizeColumnHeaders()
    ), 40
  ).observes('phase.name')

  actions:
    save: ->
      @set('active', false)
      name = @$('h2').get(0).innerText
      phase = @get('phase')

      if phase.get('name') != name
        phase.set('name', name)
        phase.save()

    cancel: ->
      @set('active', false)
      @get('phase').rollback()
{'fraction_non_alphanumeric': 0.17788089713843774, 'fraction_numerical': 0.004640371229698376, 'mean_word_length': 2.8397626112759644, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, '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': '252904', 'n_tokens_mistral': 446, 'n_tokens_neox': 426, 'n_words': 83}