Same name in other branches
  1. 8.x-1.x quicktabs.admin.inc \_quicktabs_replace_view_displays_callback()

Ajax callback, triggered when view is changed.

1 string reference to '_quicktabs_replace_view_displays_callback'
QuickViewContent::optionsForm in plugins/QuickViewContent.inc
Method for returning the form elements to display for this tab type on the admin form.

File

./quicktabs.admin.inc, line 572

Code

function _quicktabs_replace_view_displays_callback($form, $form_state) {
    $view_name = $form_state['triggering_element']['#value'];
    $delta = $form_state['triggering_element']['#parents'][1];
    $display_options = _quicktabs_get_views_displays($view_name);
    $form['qt_wrapper']['tabs'][$delta]['view']['display']['#options'] = $display_options;
    $commands = array();
    // Replace the view display dropdown.
    $commands[] = ajax_command_replace("#view-display-dropdown-{$delta}", drupal_render($form['qt_wrapper']['tabs'][$delta]['view']['display']));
    return array(
        '#type' => 'ajax',
        '#commands' => $commands,
    );
}