function 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 240

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[] = ajax_command_remove("tr.ajax-sample-row-{$row}");
    $commands[] = ajax_command_restripe("table.ajax-sample-table");
    print ajax_render($commands);
    exit;
}