function ctools_ajax_sample_tablenix in Chaos Tool Suite (ctools) 6
Same name and namespace in other branches
- 7 ctools_ajax_sample/ctools_ajax_sample.module \ctools_ajax_sample_tablenix()
Nix a row from a table and restripe.
1 string reference to 'ctools_ajax_sample_tablenix'
- ctools_ajax_sample_menu in ctools_ajax_sample/
ctools_ajax_sample.module - Implementation of hook_menu()
File
- ctools_ajax_sample/
ctools_ajax_sample.module, line 180 - Sample AJAX functionality so people can see some of the CTools AJAX features in use.
Code
function ctools_ajax_sample_tablenix($js, $row) {
if (!$js) {
// We don't support degrading this from js because we're not
// using the server to remember the state of the table.
return MENU_ACCESS_DENIED;
}
ctools_include('ajax');
$commands = array();
$commands[] = ctools_ajax_command_remove("tr.ajax-sample-row-{$row}");
$commands[] = ctools_ajax_command_restripe("table.ajax-sample-table");
ctools_ajax_render($commands);
}