You are here

function views_ui_regenerate_tab in Views (for Drupal 7) 7.3

Regenerate the current tab for AJAX updates.

1 call to views_ui_regenerate_tab()
views_ui_ajax_form in includes/admin.inc
Generic entry point to handle forms.

File

includes/admin.inc, line 2536
Provides the Views' administrative interface.

Code

function views_ui_regenerate_tab(&$view, &$output, $display_id) {
  if (!$view
    ->set_display('default')) {
    return;
  }

  // Regenerate the main display area.
  $build = views_ui_get_display_tab($view, $display_id);
  views_ui_add_microweights($build);
  $output[] = ajax_command_html('#views-tab-' . $display_id, drupal_render($build));

  // Regenerate the top area so changes to display names and order will appear.
  $build = views_ui_render_display_top($view, $display_id);
  views_ui_add_microweights($build);
  $output[] = ajax_command_replace('#views-display-top', drupal_render($build));
}