<commit_before><script type="text/javascript">
  jQuery.noConflict();
  function __highlight(s, t) {
    var matcher = new RegExp("("+jQuery.ui.autocomplete.escapeRegex(t)+")", "ig" );
    return s.replace(matcher, "<strong>$1</strong>");
  }

  jQuery.ui.autocomplete.prototype._renderItem = function (ul, item) {
    //  item.label = item.label.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)(" + jQuery.ui.autocomplete.escapeRegex(this.term) + ")(?![^<>]*>)(?![^&;]+;)", "gi"), "<strong>$1</strong>");
    if (item.menutype == 'action')    {
      return jQuery("<li></li>")
      .data("item.autocomplete",item)
      .append("<a class='action'>"+ item.label +"</a>")
      .appendTo(ul);
    }
    item.label = __highlight(item.label, this.term)
    return jQuery("<li></li>")
    .data("item.autocomplete", item)
    .append("<a>" + item.label + "</a>")
    .appendTo(ul);
  };

  jQuery(document).bind('keypress', 'q', function(){jQuery("input#autosuggest_menu_input").focus();return false;});
  gotoLink = function(event,ui){
    window.location.href = ui.item.value;
    return false;
  };
  searchoptions = function (request,response){
    var query=request.term;
    var available_options = <%= autosuggest_menuitems %>;
    var options = jQuery.ui.autocomplete.filter(available_options,query)
    options.push({'menutype': 'action',
      'label' : '<%=t('autosuggest_menu.search_students')%> : <strong>'+query+'</strong>',
      'value' : "/student/advanced_search?search%5Border%5D=&search%5Bfirst_name_or_middle_name_or_last_name_like%5D="+query+"&search%5Badmission_no_equals%5D=&advv_search%5Bcourse_id%5D=&search%5Bbatch_id_equals%5D=&search%5Bstudent_category_id_equals%5D=&search%5Bgender_equals%5D=&search%5Bblood_group_like%5D=&search%5Bnationality_id_equals%5D=&advv_search%5Bdoa_option%5D=&advv_search%5Bdoa_year%5D=&advv_search%5Bdob_option%5D=&advv_search%5Bdob_year%5D=&commit=Search"})

    options.push({'menutype': 'action',
      'label' : '<%=t('autosuggest_menu.search_employees')%>: <strong>'+query+'</strong>',
      'value' : "/employee/advanced_search?search%5Border%5D=&search%5Bfirst_name_or_middle_name_or_last_name_like%5D="+query+"&search%5Bemployee_number_equals%5D="+query+"&search%5Bgender_equals%5D=&search%5Bblood_group_like%5D=&search%5Bmarital_status_like%5D=&search%5Bnationality_id_equals%5D=&search%5Bemployee_category_id_equals%5D=&search%5Bemployee_department_id_equals%5D=&search%5Bemployee_position_id_equals%5D=&search%5Bemployee_grade_id_equals%5D=&adv_search%5Bdoj_option%5D=&adv_search%5Bdoj_year%5D=&adv_search%5Bdob_option%5D=&adv_search%5Bdob_year%5D=&search%5Bstatus_equals%5D=&commit=Search"})

    response(options)
  }


  jQuery(document).ready(function() {
    jQuery("input#autosuggest_menu_input").autocomplete({
      source: searchoptions,
      select : gotoLink,
      focus: function(event, ui) { return false; }
    });<commit_msg>Autosuggest menu * Search employee to check only employee name<commit_after><script type="text/javascript">
  jQuery.noConflict();
  function __highlight(s, t) {
    var matcher = new RegExp("("+jQuery.ui.autocomplete.escapeRegex(t)+")", "ig" );
    return s.replace(matcher, "<strong>$1</strong>");
  }

  jQuery.ui.autocomplete.prototype._renderItem = function (ul, item) {
    //  item.label = item.label.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)(" + jQuery.ui.autocomplete.escapeRegex(this.term) + ")(?![^<>]*>)(?![^&;]+;)", "gi"), "<strong>$1</strong>");
    if (item.menutype == 'action')    {
      return jQuery("<li></li>")
      .data("item.autocomplete",item)
      .append("<a class='action'>"+ item.label +"</a>")
      .appendTo(ul);
    }
    item.label = __highlight(item.label, this.term)
    return jQuery("<li></li>")
    .data("item.autocomplete", item)
    .append("<a>" + item.label + "</a>")
    .appendTo(ul);
  };

  jQuery(document).bind('keypress', 'q', function(){jQuery("input#autosuggest_menu_input").focus();return false;});
  gotoLink = function(event,ui){
    window.location.href = ui.item.value;
    return false;
  };
  searchoptions = function (request,response){
    var query=request.term;
    var available_options = <%= autosuggest_menuitems %>;
    var options = jQuery.ui.autocomplete.filter(available_options,query)
    options.push({'menutype': 'action',
      'label' : '<%=t('autosuggest_menu.search_students')%> : <strong>'+query+'</strong>',
      'value' : "/student/advanced_search?search%5Border%5D=&search%5Bfirst_name_or_middle_name_or_last_name_like%5D="+query+"&search%5Badmission_no_equals%5D=&advv_search%5Bcourse_id%5D=&search%5Bbatch_id_equals%5D=&search%5Bstudent_category_id_equals%5D=&search%5Bgender_equals%5D=&search%5Bblood_group_like%5D=&search%5Bnationality_id_equals%5D=&advv_search%5Bdoa_option%5D=&advv_search%5Bdoa_year%5D=&advv_search%5Bdob_option%5D=&advv_search%5Bdob_year%5D=&commit=Search"})

    options.push({'menutype': 'action',
      'label' : '<%=t('autosuggest_menu.search_employees')%>: <strong>'+query+'</strong>',
      'value' : "/employee/advanced_search?search%5Border%5D=&search%5Bfirst_name_or_middle_name_or_last_name_like%5D="+query+"&search%5Bemployee_number_equals%5D=&search%5Bgender_equals%5D=&search%5Bblood_group_like%5D=&search%5Bmarital_status_like%5D=&search%5Bnationality_id_equals%5D=&search%5Bemployee_category_id_equals%5D=&search%5Bemployee_department_id_equals%5D=&search%5Bemployee_position_id_equals%5D=&search%5Bemployee_grade_id_equals%5D=&adv_search%5Bdoj_option%5D=&adv_search%5Bdoj_year%5D=&adv_search%5Bdob_option%5D=&adv_search%5Bdob_year%5D=&search%5Bstatus_equals%5D=&commit=Search"})

    response(options)
  }


  jQuery(document).ready(function() {
    jQuery("input#autosuggest_menu_input").autocomplete({
      source: searchoptions,
      select : gotoLink,
      focus: function(event, ui) { return false; }
    });
{'fraction_non_alphanumeric': 0.18628121792678753, 'fraction_numerical': 0.020526855969893943, 'mean_word_length': 6.837801608579088, 'pattern_counts': {'":': 0, '<': 49, '<?xml version=': 0, '>': 49, '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': '2879892', 'n_tokens_mistral': 2248, 'n_tokens_neox': 2133, 'n_words': 194}