<commit_before># Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/

$ ->

  $(".best_in_place").best_in_place()

  $('#ticket_name').on 'keyup', ()->
    project_key = $(this).val().split('-')[0]
    project = $('#ticket_project_id option').filter(()->
      $(this).html() == project_key
    ).val()

    if project
      $('#ticket_project_id').val project


  $('form').on 'ajax:success', ()->
    $('<div></div>', {
      class: 'alert',
      text: 'Operation Successful'
    }).append($('<button></button>', {
      type: 'button',
      class: 'close',
      'data-dismiss': 'alert',
      html: '&times;'
    })).prependTo '.row'

    $.get '/tickets/list', (data) ->
      $('#list').html(data)

  $('#list').on 'ajax:success', 'a.destroy', () ->
    $(this).closest('tr').remove()
<commit_msg>Best in place after refresh<commit_after># Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/

$ ->

  $(".best_in_place").best_in_place()

  $('#ticket_name').on 'keyup', ()->
    project_key = $(this).val().split('-')[0]
    project = $('#ticket_project_id option').filter(()->
      $(this).html() == project_key
    ).val()

    if project
      $('#ticket_project_id').val project


  $('form').on 'ajax:success', ()->
    $('<div></div>', {
      class: 'alert',
      text: 'Operation Successful'
    }).append($('<button></button>', {
      type: 'button',
      class: 'close',
      'data-dismiss': 'alert',
      html: '&times;'
    })).prependTo '.row'

    $.get '/tickets/list', (data) ->
      $('#list').html(data)
      $(".best_in_place").best_in_place()

  $('#list').on 'ajax:success', 'a.destroy', () ->
    $(this).closest('tr').remove()

{'fraction_non_alphanumeric': 0.2177579365079365, 'fraction_numerical': 0.000992063492063492, 'mean_word_length': 3.2020833333333334, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 23, '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': '5987901', 'n_tokens_mistral': 661, 'n_tokens_neox': 648, 'n_words': 149}