<commit_before>$(document).ready(function() {
   $("body").on("click", ".itemSelect", function() {
      var id = $(this).data('id');
      uniqueItem(id, $(this));
   });
   var listItems = [];
   function uniqueItem(element, currentElement)
   {
      var dataType = currentElement.data('type');
      var dataId = currentElement.data('id');
      var objectActivity = $("input[data-select="+dataId+"][data-type="+dataType+"]");

      if(objectActivity.length == 0) {
         $(".contentListOfItems").append('<input class="activityObjects" name="activityItems['+currentElement.data('type')+'][]" value="' + element + '" type="hidden" data-type="'+currentElement.data('type')+'" data-select="' + element + '">');
      } else {
         issetItemAndRemove(objectActivity);
      }
   }

   function issetItemAndRemove(objectActivity)
   {
      if(objectActivity.length == 1) {
         objectActivity.remove();
      }
   }

   $("body").on("click", ".pager ul.yiiPager li", function() { // check list on pagination
      setTimeout(function() {
         $.each($(".activityObjects"), function (index) {
            var dataType = $(this).data('type');
            var dataId = $(this).data('select');
            var objectActivity = $("input[data-id="+dataId+"][data-type="+dataType+"]");
            if (!objectActivity.is(":checked")) {
                  objectActivity.prop("checked", true);
            }
         });
      }, 500);
   })

   setTimeout(function() {
      $.each($(".activityObjects"), function (index) {
         var dataType = $(this).data('type');
         var dataId = $(this).data('select');
         var objectActivity = $("input[data-id="+dataId+"][data-type="+dataType+"]");
         if (!objectActivity.is(":checked")) {
            objectActivity.prop("checked", true);
         }
      });
   }, 500);


   var html;
   $("body").on("click", ".htmlToWord" ,function() { //second step convert html to docx
      html='';
      $.each($(".check-item"), function(index) {
         if($(this).is(":checked")) {
            var parentElement = $(this).parents(".block-item").clone();
            parentElement.find(".check-item").remove();
            html += parentElement.html();
         }
      });

      $.ajax({
         type: 'POST',
         url: url,
         data: {'html':html, 'CSRF_TOKEN':token},
         success: function(data) {
            console.log(data);
         }
      });
   });

   $("body").on("click", ".htmlPreview" ,function() { //second step preview html to docx
      html='';
      $.each($(".check-item"), function(index) {
         if($(this).is(":checked")) {
            var parentElement = $(this).parents(".block-item").clone();
            parentElement.find(".check-item").remove();
            html += parentElement.html();
         }
      });
      $(".previewModal .modal-body").empty();
      $(".previewModal .modal-body").append(html);
      $(".previewModal").modal('show');
   });


   $('input[name="daterange"]').daterangepicker({ // set datapicker on first step
      timePicker: false,
      locale: {
         format: 'YYYY/MM/DD'
      }
   });
});<commit_msg>TC-25 fixed date search<commit_after>$(document).ready(function() {
   $("body").on("click", ".itemSelect", function() {
      var id = $(this).data('id');
      uniqueItem(id, $(this));
   });
   var listItems = [];
   function uniqueItem(element, currentElement)
   {
      var dataType = currentElement.data('type');
      var dataId = currentElement.data('id');
      var objectActivity = $("input[data-select="+dataId+"][data-type="+dataType+"]");

      if(objectActivity.length == 0) {
         $(".contentListOfItems").append('<input class="activityObjects" name="activityItems['+currentElement.data('type')+'][]" value="' + element + '" type="hidden" data-type="'+currentElement.data('type')+'" data-select="' + element + '">');
      } else {
         issetItemAndRemove(objectActivity);
      }
   }

   function issetItemAndRemove(objectActivity)
   {
      if(objectActivity.length == 1) {
         objectActivity.remove();
      }
   }

   $("body").on("click", ".pager ul.yiiPager li", function() { // check list on pagination
      setTimeout(function() {
         $.each($(".activityObjects"), function (index) {
            var dataType = $(this).data('type');
            var dataId = $(this).data('select');
            var objectActivity = $("input[data-id="+dataId+"][data-type="+dataType+"]");
            if (!objectActivity.is(":checked")) {
                  objectActivity.prop("checked", true);
            }
         });
      }, 500);
   })

   setTimeout(function() {
      $.each($(".activityObjects"), function (index) {
         var dataType = $(this).data('type');
         var dataId = $(this).data('select');
         var objectActivity = $("input[data-id="+dataId+"][data-type="+dataType+"]");
         if (!objectActivity.is(":checked")) {
            objectActivity.prop("checked", true);
         }
      });
   }, 500);


   var html;
   $("body").on("click", ".htmlToWord" ,function() { //second step convert html to docx
      html='';
      $.each($(".check-item"), function(index) {
         if($(this).is(":checked")) {
            var parentElement = $(this).parents(".block-item").clone();
            parentElement.find(".check-item").remove();
            html += parentElement.html();
         }
      });

      $.ajax({
         type: 'POST',
         url: url,
         data: {'html':html, 'CSRF_TOKEN':token},
         success: function(data) {
            console.log(data);
         }
      });
   });

   $("body").on("click", ".htmlPreview" ,function() { //second step preview html to docx
      html='';
      $.each($(".check-item"), function(index) {
         if($(this).is(":checked")) {
            var parentElement = $(this).parents(".block-item").clone();
            parentElement.find(".check-item").remove();
            html += parentElement.html();
         }
      });
      $(".previewModal .modal-body").empty();
      $(".previewModal .modal-body").append(html);
      $(".previewModal").modal('show');
   });


   $('input[name="daterange"]').daterangepicker({ // set datapicker on first step
      timePicker: false,
      locale: {
         format: 'DD MMMM YY',
      },
   });
});
{'fraction_non_alphanumeric': 0.207382762991128, 'fraction_numerical': 0.0028517110266159697, 'mean_word_length': 2.478236914600551, 'pattern_counts': {'":': 8, '<': 5, '<?xml version=': 0, '>': 5, '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': '4465470', 'n_tokens_mistral': 1847, 'n_tokens_neox': 1821, 'n_words': 311}