Commit bd1728c3 authored by merlinofchaos's avatar merlinofchaos

Redo some form stuff to make it easier to choose the next form when chaining;...

Redo some form stuff to make it easier to choose the next form when chaining; and add some new chaining options. This commit will require you to visit admin/build/modules to reset the menu or the UI will stop working.
parent 0a34677d
This diff is collapsed.
......@@ -54,7 +54,7 @@ function views_ajax_form_wrapper($form_id, &$form_state) {
$output = drupal_build_form($form_id, $form_state);
if (!empty($form_state['ajax']) && empty($form_state['executed'])) {
// If the form didn't executed and we're using ajax, build up a
// If the form didn't execute and we're using ajax, build up a
// json command object to render.
$object = new stdClass();
$object->display = '';
......
......@@ -55,6 +55,7 @@ function _views_fetch_data($table = NULL) {
if (isset($cache[$table])) {
return $cache[$table];
}
// Return an empty array if there is no match.
return array();
}
......
......@@ -1245,8 +1245,7 @@ class views_plugin_display extends views_plugin {
// send ajax form to options page if we use it.
if (!empty($plugin->definition['uses options'])) {
$form_state['next'] = 'style_options';
$form_state['regenerate form'] = TRUE;
views_ui_add_form_to_stack('display', $this->view, $this->display->id, array('row_options'));
}
}
}
......@@ -1265,8 +1264,7 @@ class views_plugin_display extends views_plugin {
// send ajax form to options page if we use it.
if (!empty($plugin->definition['uses options'])) {
$form_state['next'] = 'style_options';
$form_state['regenerate form'] = TRUE;
views_ui_add_form_to_stack('display', $this->view, $this->display->id, array('style_options'));
}
}
}
......
......@@ -123,50 +123,20 @@ function views_ui_menu() {
'page callback' => 'views_ui_add_display',
'page arguments' => array(3, 5),
);
$items['admin/build/views/%views_ui_js/remove-display/%views_ui_cache'] = $callback + array(
'page callback' => 'views_ui_remove_display',
'page arguments' => array(3, 5),
);
$items['admin/build/views/%views_ui_js/rearrange/%views_ui_cache'] = $callback + array(
'page callback' => 'views_ui_rearrange_type',
'page arguments' => array(3, 5),
);
$items['admin/build/views/%views_ui_js/config-type/%views_ui_cache'] = $callback + array(
'page callback' => 'views_ui_config_type',
'page arguments' => array(3, 5),
);
$items['admin/build/views/%views_ui_js/add-item/%views_ui_cache'] = $callback + array(
'page callback' => 'views_ui_add_item',
'page arguments' => array(3, 5),
);
$items['admin/build/views/%views_ui_js/config-item/%views_ui_cache'] = $callback + array(
'page callback' => 'views_ui_config_item',
'page arguments' => array(3, 5),
);
$items['admin/build/views/%views_ui_js/config-item-extra/%views_ui_cache'] = $callback + array(
'page callback' => 'views_ui_config_item_extra',
'page arguments' => array(3, 5),
);
// display specific parameters
$items['admin/build/views/%views_ui_js/display/%views_ui_cache'] = $callback + array(
'page callback' => 'views_ui_edit_display',
'page arguments' => array(3, 5),
);
// Special style plugin stuff for arguments
$items['admin/build/views/%views_ui_js/change-style/%views_ui_cache'] = $callback + array(
'page callback' => 'views_ui_change_style',
'page arguments' => array(3, 5),
);
$items['admin/build/views/%views_ui_js/config-style/%views_ui_cache'] = $callback + array(
'page callback' => 'views_ui_config_style',
'page arguments' => array(3, 5),
);
// Live preview
$items['admin/build/views/%views_ui_js/preview/%views_ui_cache'] = $callback + array(
'page callback' => 'views_ui_preview',
'page arguments' => array(3, 5),
);
// Generic ajax callback
// display specific parameters
$items['admin/build/views/%views_ui_js/%/%views_ui_cache'] = $callback + array(
'page callback' => 'views_ui_ajax_form',
'page arguments' => array(3, 4, 5),
);
// autocompletes for handlers and such
$items['admin/build/views/autocomplete/user'] = $callback + array(
'page callback' => 'views_ui_autocomplete_user',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment