forked from Michel2/wp-jquery-datatable
Change into file for searching related issue
This commit is contained in:
@@ -280,8 +280,8 @@ function wp_jdt_shortcode( $atts, $content = "" ) {
|
|||||||
$wp_jdt_script .= "jQuery(document).ready(function() { \n";
|
$wp_jdt_script .= "jQuery(document).ready(function() { \n";
|
||||||
|
|
||||||
$wp_jdt_script .= "jQuery('#$atts[id]').DataTable({ \n";
|
$wp_jdt_script .= "jQuery('#$atts[id]').DataTable({ \n";
|
||||||
$wp_jdt_script .= "'info': '$atts[info]', \n";
|
$wp_jdt_script .= "'info': $atts[info], \n";
|
||||||
$wp_jdt_script .= "'paging': '$atts[paging]', \n";
|
$wp_jdt_script .= "'paging': $atts[paging], \n";
|
||||||
if($atts['page_length'] > 0) {
|
if($atts['page_length'] > 0) {
|
||||||
$wp_jdt_script .= "'pageLength': $atts[page_length], \n";
|
$wp_jdt_script .= "'pageLength': $atts[page_length], \n";
|
||||||
}
|
}
|
||||||
@@ -290,10 +290,10 @@ function wp_jdt_shortcode( $atts, $content = "" ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$wp_jdt_script .= "'pagingType': '$atts[paging_type]', \n";
|
$wp_jdt_script .= "'pagingType': '$atts[paging_type]', \n";
|
||||||
$wp_jdt_script .= "'bLengthChange': '$atts[b_length_change]', \n";
|
$wp_jdt_script .= "'bLengthChange': $atts[b_length_change], \n";
|
||||||
$wp_jdt_script .= "'ordering': '$atts[ordering]', \n";
|
$wp_jdt_script .= "'ordering': $atts[ordering], \n";
|
||||||
$wp_jdt_script .= "'order': [$atts[order_row_number],'$atts[order_row_number_sort]'], \n";
|
$wp_jdt_script .= "'order': [$atts[order_row_number],'$atts[order_row_number_sort]'], \n";
|
||||||
$wp_jdt_script .= "'searching': '$atts[searching]', \n";
|
$wp_jdt_script .= "'searching': $atts[searching], \n";
|
||||||
$wp_jdt_script .= "} ); \n";
|
$wp_jdt_script .= "} ); \n";
|
||||||
|
|
||||||
$wp_jdt_script .= "jQuery('#$atts[id]_wrapper select').prepend('<option value=$atts[page_length]>Select</option>').val('');
|
$wp_jdt_script .= "jQuery('#$atts[id]_wrapper select').prepend('<option value=$atts[page_length]>Select</option>').val('');
|
||||||
|
|||||||
Reference in New Issue
Block a user