Created
May 31, 2016 05:43
-
-
Save ka215/bd84a89ac0b89e0084ab04d941ac4f6a to your computer and use it in GitHub Desktop.
In the dynamic table layout of Custom DataBase Table plugin, how to cancel a draggable table.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function table_layout_fixed( $component_options, $shortcode_name, $table ){ | |
if ( 'cdbt-view' === $shortcode_name && 'your_table_name' === $table ) { | |
$component_options['customAfterRender'] = <<<EJS | |
$('#'+options.tableId).css({tableLayout:'auto'}).parent('.panel-table-wrapper').kinetic('detach'); | |
EJS; | |
} | |
return $component_options; | |
} | |
add_filter( 'cdbt_shortcode_custom_component_options', 'table_layout_fixed', 10, 3 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment