Відмінності між версіями «Шаблони заяв та клопотань»

Перейти до навігації Перейти до пошуку
м
Мітка: Скасовано
м
Мітка: Скасовано
Рядок 26: Рядок 26:
      
      
});
});
</script>
<script>
function nameSearch() {
  var input_name, input_age, input_city, filter, table, tr, td, i, txtValue_name, txtValue_age, txtValue_city;
  input_name = document.getElementById("name-search");
  input_age = document.getElementById("age-search");
  input_city = document.getElementById("city-search");
  filter_name = input_name.value.toUpperCase();
  filter_age = input_age.value.toUpperCase();
  filter_city = input_city.value.toUpperCase();
  table = document.getElementById("custom-table");
  tr = table.getElementsByTagName("tr");
  for (i = 0; i < tr.length; i++) {
    td_name = tr[i].getElementsByTagName("td")[0];
    if (td_name) {
      txtValue_name = td_name.textContent || td_name.innerText;
      if (txtValue_name.toUpperCase().indexOf(filter_name) > -1) {
        tr[i].style.display = "";
      } else {
        tr[i].style.display = "none";
      }
    }
  }
}
function ageSearch() {
  var input_name, input_age, input_city, filter, table, tr, td, i, txtValue_name, txtValue_age, txtValue_city;
  input_name = document.getElementById("name-search");
  input_age = document.getElementById("age-search");
  input_city = document.getElementById("city-search");
  filter_name = input_name.value.toUpperCase();
  filter_age = input_age.value.toUpperCase();
  filter_city = input_city.value.toUpperCase();
  table = document.getElementById("custom-table");
  tr = table.getElementsByTagName("tr");
  for (i = 0; i < tr.length; i++) {
    td_age = tr[i].getElementsByTagName("td")[1];
    if (td_age) {
      txtValue_age = td_age.textContent || td_age.innerText;
      if (txtValue_age.toUpperCase().indexOf(filter_age) > -1) {
        tr[i].style.display = "";
      } else {
        tr[i].style.display = "none";
      }
    }
  }
}
function citySearch() {
  var input_name, input_age, input_city, filter, table, tr, td, i, txtValue_name, txtValue_age, txtValue_city;
  input_name = document.getElementById("name-search");
  input_age = document.getElementById("age-search");
  input_city = document.getElementById("city-search");
  filter_name = input_name.value.toUpperCase();
  filter_age = input_age.value.toUpperCase();
  filter_city = input_city.value.toUpperCase();
  table = document.getElementById("custom-table");
  tr = table.getElementsByTagName("tr");
  for (i = 0; i < tr.length; i++) {
    td_city = tr[i].getElementsByTagName("td")[2];
    if (td_city) {
      txtValue_city = td_city.textContent || td_city.innerText;
      if (txtValue_city.toUpperCase().indexOf(filter_city) > -1) {
        tr[i].style.display = "";
      } else {
        tr[i].style.display = "none";
      }
    }
  }
}
</script>
</script>
<input type="text" id="name-search" onkeyup="nameSearch()" placeholder="Назва шаблону.." class="table-search-filters">
<input type="text" id="name-search" onkeyup="nameSearch()" placeholder="Назва шаблону.." class="table-search-filters">
Рядок 120: Рядок 32:
<table class="table_sort" id="custom-table" width=95% border="1" align="center" style="border-collapse:collapse" cellpadding="3">
<table class="table_sort" id="custom-table" width=95% border="1" align="center" style="border-collapse:collapse" cellpadding="3">
<thead>
<thead>
<tr><th>Id шаблону</th><th id="name-search">Назва шаблону</th><th id="age">Інстанція</th><th id="city">Категорія</th><th>Судочинство</th><th>Підкатегорія</th></thead></tr> <!--ряд с ячейками заголовков-->
<tr><th>Id шаблону</th><th id="name-search">name</th><th id="age">Інстанція</th><th id="city">Категорія</th><th>Судочинство</th><th>Підкатегорія</th></thead></tr> <!--ряд с ячейками заголовков-->
<tbody>
<tbody>
<tr><td width=5%> 1119 </td><td width=30%> Апеляційна скарга </td><td width=10%> Апеляційна інстанція </td><td width=10%> Заяви по справі </td><td width=25%> Судочинство у справах про адміністративні правопорушення </td><td width=20%> Заяви по суті справи </td></tr>
<tr><td width=5%> 1119 </td><td width=30%> Апеляційна скарга </td><td width=10%> Апеляційна інстанція </td><td width=10%> Заяви по справі </td><td width=25%> Судочинство у справах про адміністративні правопорушення </td><td width=20%> Заяви по суті справи </td></tr>