<commit_before>// Place all the behaviors and hooks related to the matching controller here.
// All this logic will automatically be available in application.js.

$(document).ready(function(){

  $('.language_to').click(function(){
    var language_to = $.trim($(this).attr('lang_sym'));
    $.ajax({
      type: 'POST',
      url: Routes.translation_center_set_lang_to_path(),
      data: { lang : language_to },
      success: function(){
        location.reload();
      }
    });
  });

  $('.language_from').click(function(){
    var language_from = $.trim($(this).attr('lang_sym'));
    $.ajax({
      type: 'POST',
      url: Routes.translation_center_set_lang_from_path(),
      data: { lang : language_from },
      success: function(){
        location.reload();
      }
    });
  });

  $('#search_activity').click(function(){
    $.ajax({
      type: 'GET',
      url: '/translation_center/search_activity.js',
      data: { filter : $('#activity_filter').val(), query : $('#activity_query').val() }
    });
    return false;
  });

  $('#search_reset').click(function(){
    $('#activity_filter').val('all')
    $('#activity_query').val('')
    $('#search_activity').click();
  });

  $(".pagination a").live('click', function() {
    $.ajax({<commit_msg>use js routes for search route<commit_after>// Place all the behaviors and hooks related to the matching controller here.
// All this logic will automatically be available in application.js.

$(document).ready(function(){

  $('.language_to').click(function(){
    var language_to = $.trim($(this).attr('lang_sym'));
    $.ajax({
      type: 'POST',
      url: Routes.translation_center_set_lang_to_path(),
      data: { lang : language_to },
      success: function(){
        location.reload();
      }
    });
  });

  $('.language_from').click(function(){
    var language_from = $.trim($(this).attr('lang_sym'));
    $.ajax({
      type: 'POST',
      url: Routes.translation_center_set_lang_from_path(),
      data: { lang : language_from },
      success: function(){
        location.reload();
      }
    });
  });

  $('#search_activity').click(function(){
    $.ajax({
      type: 'GET',
      url: Routes.translation_center_search_activity_path(),
      data: { filter : $('#activity_filter').val(), query : $('#activity_query').val() }
    });
    return false;
  });

  $('#search_reset').click(function(){
    $('#activity_filter').val('all')
    $('#activity_query').val('')
    $('#search_activity').click();
  });

  $(".pagination a").live('click', function() {
    $.ajax({
{'fraction_non_alphanumeric': 0.19836001561889888, 'fraction_numerical': 0.0, 'mean_word_length': 3.213815789473684, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '1784853', 'n_tokens_mistral': 758, 'n_tokens_neox': 757, 'n_words': 152}