Gitlab@Informatics

Skip to content
Snippets Groups Projects
Commit aea70fe7 authored by Woraprat's avatar Woraprat
Browse files

update project search

parent 5f8bb7a0
No related branches found
No related tags found
No related merge requests found
......@@ -177,6 +177,10 @@ function create_table(data) {
$(".dataTables_length").css('margin-right', '20px');
$(".dataTables_info").css('clear', 'none');
$(".dataTables_info").css('padding-top', '1');
oTable = $('#myTable').DataTable(); //pay attention to capital D, which is mandatory to retrieve "api" datatables' object, as @Lionel said
$('#myInput').keyup(function(){
oTable.search($(this).val()).draw() ;
})
}
function create_option_year(data){
......@@ -195,7 +199,7 @@ function year_filter(){
var categoryIndex = 0;
$("#myTable th").each(function (i) {
if ($($(this)).html() == "Year") {
if ($($(this)).html() == "ปี") {
categoryIndex = i; return false;
}
});
......@@ -223,7 +227,7 @@ function graduation_filter(){
var table = $('#myTable').DataTable();
var categoryIndex = 0;
$("#myTable th").each(function (i) {
if ($($(this)).html() == "Graduation") {
if ($($(this)).html() == "ชั้นปี") {
categoryIndex = i; return false;
}
});
......
......@@ -176,6 +176,10 @@ function create_table(data) {
$(".dataTables_length").css('margin-right', '20px');
$(".dataTables_info").css('clear', 'none');
$(".dataTables_info").css('padding-top', '1');
oTable = $('#myTable').DataTable(); //pay attention to capital D, which is mandatory to retrieve "api" datatables' object, as @Lionel said
$('#myInput').keyup(function(){
oTable.search($(this).val()).draw() ;
})
}
function create_option_year(data){
......@@ -194,7 +198,7 @@ function year_filter(){
var categoryIndex = 0;
$("#myTable th").each(function (i) {
if ($($(this)).html() == "Year") {
if ($($(this)).html() == "ปี") {
categoryIndex = i; return false;
}
});
......@@ -222,7 +226,7 @@ function graduation_filter(){
var table = $('#myTable').DataTable();
var categoryIndex = 0;
$("#myTable th").each(function (i) {
if ($($(this)).html() == "Graduation") {
if ($($(this)).html() == "ชั้นปี") {
categoryIndex = i; return false;
}
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment