Commit b68d6ce6 authored by merlinofchaos's avatar merlinofchaos

Remove all references to ctools_dependent_process, plus fix some missing items on field checkboxes.

parent 4e58d236
......@@ -229,7 +229,6 @@ class views_handler_argument extends views_handler {
'#size' => 20,
'#default_value' => $this->options['exception']['title'],
'#description' => t('Override the view and other argument titles. Use "%1" for the first argument, "%2" for the second, etc.'),
'#process' => array('ctools_dependent_process'),
'#dependency' => array(
'edit-options-exception-title-enable' => array('1'),
),
......@@ -265,7 +264,6 @@ class views_handler_argument extends views_handler {
'#title_display' => 'invisible',
'#default_value' => $this->options['title'],
'#description' => t('Override the view and other argument titles. Use "%1" for the first argument, "%2" for the second, etc.'),
'#process' => array('ctools_dependent_process'),
'#dependency' => array(
'edit-options-title-enable' => array('1'),
),
......@@ -284,7 +282,6 @@ class views_handler_argument extends views_handler {
'#title_display' => 'invisible',
'#default_value' => $this->options['breadcrumb'],
'#description' => t('Enter a breadcrumb name you would like to use. See "Title" for percent substitutions.'),
'#process' => array('ctools_dependent_process'),
'#dependency' => array(
'edit-options-breadcrumb-enable' => array('1'),
),
......@@ -308,7 +305,6 @@ class views_handler_argument extends views_handler {
'#type' => 'select',
'#title' => t('Validator'),
'#default_value' => $this->options['validate']['type'],
'#process' => array('ctools_dependent_process'),
'#dependency' => array(
'edit-options-specify-validation' => array('1'),
),
......@@ -345,7 +341,6 @@ class views_handler_argument extends views_handler {
'#suffix' => '</div>',
'#type' => 'item',
'#input' => TRUE, // trick it into checking input to make #process run
'#process' => array('ctools_dependent_process'),
'#dependency' => array(
'edit-options-specify-validation' => array('1'),
'edit-options-validate-type' => array($id),
......@@ -368,7 +363,6 @@ class views_handler_argument extends views_handler {
'#title' => t('Action to take if filter value does not validate'),
'#default_value' => $this->options['validate']['fail'],
'#options' => $validate_options,
'#process' => array('ctools_dependent_process'),
'#dependency' => array(
'edit-options-specify-validation' => array('1'),
),
......@@ -502,7 +496,7 @@ class views_handler_argument extends views_handler {
'#id' => 'edit-options-default-argument-type',
'#title' => t('Type'),
'#default_value' => $this->options['default_argument_type'],
'#process' => array('ctools_dependent_process'),
'#dependency' => array('radio:options[default_action]' => array('default')),
// Views custom key, moves this element to the appropriate container
// under the radio button.
......@@ -522,8 +516,6 @@ class views_handler_argument extends views_handler {
'#suffix' => '</div>',
'#id' => 'edit-options-argument-default-options-' . $id,
'#type' => 'item',
'#input' => TRUE, // trick it into checking input to make #process run
'#process' => array('ctools_dependent_process'),
'#dependency' => array(
'radio:options[default_action]' => array('default'),
'edit-options-default-argument-type' => array($id)
......@@ -565,7 +557,6 @@ class views_handler_argument extends views_handler {
'#title' => t('Sort order'),
'#options' => array('asc' => t('Ascending'), 'desc' => t('Descending')),
'#default_value' => $this->options['summary']['sort_order'],
'#process' => array('form_process_radios', 'ctools_dependent_process'),
'#dependency' => array('radio:options[default_action]' => array('summary')),
);
$form['summary']['number_of_records'] = array(
......@@ -576,7 +567,6 @@ class views_handler_argument extends views_handler {
0 => $this->get_sort_name(),
1 => t('Number of records')
),
'#process' => array('form_process_radios', 'ctools_dependent_process'),
'#dependency' => array('radio:options[default_action]' => array('summary')),
);
......@@ -585,7 +575,6 @@ class views_handler_argument extends views_handler {
'#title' => t('Format'),
'#options' => $format_options,
'#default_value' => $this->options['summary']['format'],
'#process' => array('form_process_radios', 'ctools_dependent_process'),
'#dependency' => array('radio:options[default_action]' => array('summary')),
);
......@@ -601,7 +590,6 @@ class views_handler_argument extends views_handler {
'#id' => 'edit-options-summary-options-' . $id,
'#type' => 'item',
'#input' => TRUE, // trick it into checking input to make #process run
'#process' => array('ctools_dependent_process'),
'#dependency' => array(
'radio:options[default_action]' => array('summary'),
'radio:options[summary][format]' => array($id),
......
......@@ -52,7 +52,6 @@ class views_handler_argument_string extends views_handler_argument {
'#title' => t('Character limit'),
'#description' => t('How many characters of the filter value to filter against. If set to 1, all fields starting with the first letter in the filter value would be matched.'),
'#default_value' => $this->options['limit'],
'#process' => array('ctools_dependent_process'),
'#dependency' => array('edit-options-glossary' => array(TRUE)),
'#fieldset' => 'more',
);
......
This diff is collapsed.
......@@ -13,7 +13,6 @@ class views_handler_field_counter extends views_handler_field {
'#title' => t('Starting value'),
'#default_value' => $this->options['counter_start'],
'#description' => t('Specify the number the counter should start at.'),
//'#process' => array('ctools_dependent_process'),
'#size' => 2,
);
......
......@@ -38,7 +38,6 @@ class views_handler_field_date extends views_handler_field {
'#title' => t('Custom date format'),
'#description' => t('If "Custom", see <a href="http://us.php.net/manual/en/function.date.php" target="_blank">the PHP docs</a> for date formats. If "Time ago" this is the the number of different units to display, which defaults to two.'),
'#default_value' => isset($this->options['custom_date_format']) ? $this->options['custom_date_format'] : '',
'#process' => array('ctools_dependent_process'),
'#dependency' => array('edit-options-date-format' => array('custom', 'raw time ago', 'time ago', 'raw time span', 'time span', 'raw time span', 'inverse time span', 'time span')),
);
......
......@@ -38,7 +38,6 @@ class views_handler_field_numeric extends views_handler_field {
'#title' => t('Precision'),
'#default_value' => $this->options['precision'],
'#description' => t('Specify how many digits to print after the decimal point.'),
'#process' => array('ctools_dependent_process'),
'#dependency' => array('edit-options-set-precision' => array(TRUE)),
'#size' => 2,
);
......@@ -68,7 +67,6 @@ class views_handler_field_numeric extends views_handler_field {
'#title' => t('Singular form'),
'#default_value' => $this->options['format_plural_singular'],
'#description' => t('Text to use for the singular form.'),
'#process' => array('ctools_dependent_process'),
'#dependency' => array('edit-options-format-plural' => array(TRUE)),
);
$form['format_plural_plural'] = array(
......@@ -76,7 +74,6 @@ class views_handler_field_numeric extends views_handler_field {
'#title' => t('Plural form'),
'#default_value' => $this->options['format_plural_plural'],
'#description' => t('Text to use for the plural form, @count will be replaced with the value.'),
'#process' => array('ctools_dependent_process'),
'#dependency' => array('edit-options-format-plural' => array(TRUE)),
);
$form['prefix'] = array(
......
......@@ -36,7 +36,6 @@ class views_handler_field_prerender_list extends views_handler_field {
'#type' => 'textfield',
'#title' => t('Separator'),
'#default_value' => $this->options['separator'],
'#process' => array('ctools_dependent_process'),
'#dependency' => array('radio:options[type]' => array('separator')),
);
parent::options_form($form, $form_state);
......
<?php
class views_handler_field_serialized extends views_handler_field {
function option_definition() {
$options = parent::option_definition();
$options['format'] = array('default' => 'unserialized');
......@@ -28,7 +28,6 @@ class views_handler_field_serialized extends views_handler_field {
'#type' => 'textfield',
'#title' => t('Which key should be displayed'),
'#default_value' => $this->options['key'],
'#process' => array('ctools_dependent_process'),
'#dependency' => array('edit-options-format' => array('key')),
);
}
......
......@@ -302,7 +302,6 @@ class views_handler_filter extends views_handler {
'#title' => t('Operator identifier'),
'#size' => 40,
'#description' => t('This will appear in the URL after the ? to identify this operator.'),
'#process' => array('ctools_dependent_process'),
'#dependency' => array(
'edit-options-expose-use-operator' => array(1)
),
......
......@@ -215,7 +215,6 @@ class views_handler_filter_in_operator extends views_handler_filter {
$form['value']['#prefix'] = '<div id="edit-options-value-wrapper">';
$form['value']['#suffix'] = '</div>';
}
$process[] = 'ctools_dependent_process';
$form['value']['#dependency'] = array($source => $this->operator_values(1));
}
if (!empty($process)) {
......
......@@ -147,7 +147,6 @@ class views_handler_filter_numeric extends views_handler_filter {
'#title' => empty($form_state['exposed']) ? t('Value') : '',
'#size' => 30,
'#default_value' => $this->value['value'],
'#process' => array('ctools_dependent_process'),
'#dependency' => array($source => $this->operator_values(1)),
);
if (!empty($form_state['exposed']) && !isset($form_state['input'][$identifier]['value'])) {
......@@ -183,7 +182,6 @@ class views_handler_filter_numeric extends views_handler_filter {
);
if ($which == 'all') {
$dependency = array(
'#process' => array('ctools_dependent_process'),
'#dependency' => array($source => $this->operator_values(2)),
);
$form['value']['min'] += $dependency;
......
......@@ -191,7 +191,6 @@ class views_handler_filter_string extends views_handler_filter {
if ($which == 'all') {
$form['value'] += array(
'#process' => array('ctools_dependent_process'),
'#dependency' => array($source => $this->operator_values(1)),
);
}
......
......@@ -29,14 +29,7 @@ Everyone who used it can extend from views_handler_sort, too.
<h3>Ctools dependency</h3>
Views requires ctools now, so it can use the dependency system of ctools.
The only thing you have to do is to replace
<pre>
'#process' => array('views_process_dependency')
</pre>
with
<pre>
'#process' => array('ctools_dependent_process'),
</pre>
The only thing you have to do is to remove views_process_dependency.
<h3>Changed add_where api</h3>
If your field is a plain sql field:
......
......@@ -20,7 +20,6 @@ class views_plugin_argument_default_php extends views_plugin_argument_default {
'#type' => 'textarea',
'#title' => t('PHP contextual filter code'),
'#default_value' => $this->options['code'],
'#process' => array('ctools_dependent_process'),
'#description' => t('Enter PHP code that returns a value to use for this filter. Do not use &lt;?php ?&gt;. You must return only a single value for just this filter.'),
);
......
......@@ -152,7 +152,6 @@ class views_plugin_display_feed extends views_plugin_display_page {
'#default_value' => $this->get_option('sitename_title'),
);
$form['title'] = $title;
$form['title']['#process'] = array('ctools_dependent_process');
$form['title']['#dependency'] = array('edit-sitename-title' => array(FALSE));
break;
case 'displays':
......
......@@ -335,7 +335,6 @@ class views_plugin_display_page extends views_plugin_display {
'#type' => 'textfield',
'#default_value' => $menu['title'],
'#description' => t('If set to normal or tab, enter the text to use for the menu item.'),
'#process' => array('ctools_dependent_process'),
'#dependency' => array('radio:menu[type]' => array('normal', 'tab', 'default tab')),
);
$form['menu']['description'] = array(
......@@ -343,7 +342,6 @@ class views_plugin_display_page extends views_plugin_display {
'#type' => 'textfield',
'#default_value' => $menu['description'],
'#description' => t("If set to normal or tab, enter the text to use for the menu item's description."),
'#process' => array('ctools_dependent_process'),
'#dependency' => array('radio:menu[type]' => array('normal', 'tab', 'default tab')),
);
......@@ -355,7 +353,6 @@ class views_plugin_display_page extends views_plugin_display {
'#options' => menu_get_menus(),
'#default_value' => $menu['name'],
'#description' => t('Insert item into an available menu.'), //
'#process' => array('form_process_select', 'ctools_dependent_process'),
'#dependency' => array('radio:menu[type]' => array('normal')),
);
}
......@@ -374,7 +371,6 @@ class views_plugin_display_page extends views_plugin_display {
'#type' => 'textfield',
'#default_value' => isset($menu['weight']) ? $menu['weight'] : 0,
'#description' => t('The lower the weight the higher/further left it will appear.'),
'#process' => array('ctools_dependent_process'),
'#dependency' => array('radio:menu[type]' => array('normal', 'tab', 'default tab')),
);
break;
......@@ -408,7 +404,6 @@ class views_plugin_display_page extends views_plugin_display {
'#type' => 'textfield',
'#default_value' => $tab_options['title'],
'#description' => t('If creating a parent menu item, enter the title of the item.'),
'#process' => array('ctools_dependent_process'),
'#dependency' => array('radio:tab_options[type]' => array('normal', 'tab')),
);
$form['tab_options']['description'] = array(
......@@ -416,7 +411,6 @@ class views_plugin_display_page extends views_plugin_display {
'#type' => 'textfield',
'#default_value' => $tab_options['description'],
'#description' => t('If creating a parent menu item, enter the description of the item.'),
'#process' => array('ctools_dependent_process'),
'#dependency' => array('radio:tab_options[type]' => array('normal', 'tab')),
);
// Only display the menu selector if menu module is enabled.
......@@ -427,7 +421,6 @@ class views_plugin_display_page extends views_plugin_display {
'#options' => menu_get_menus(),
'#default_value' => $tab_options['name'],
'#description' => t('Insert item into an available menu.'),
'#process' => array('form_process_select', 'ctools_dependent_process'),
'#dependency' => array('radio:tab_options[type]' => array('normal')),
);
}
......@@ -447,7 +440,6 @@ class views_plugin_display_page extends views_plugin_display {
'#default_value' => $tab_options['weight'],
'#size' => 5,
'#description' => t('If the parent menu item is a tab, enter the weight of the tab. The lower the number, the more to the left it will be.'),
'#process' => array('ctools_dependent_process'),
'#dependency' => array('radio:tab_options[type]' => array('tab')),
);
break;
......
......@@ -56,7 +56,6 @@ class views_plugin_exposed_form extends views_plugin {
'#dependency' => array(
'edit-exposed-form-options-reset-button' => array(1)
),
'#process' => array('ctools_dependent_process'),
);
$form['exposed_sorts_label'] = array(
......
......@@ -89,7 +89,6 @@ class views_plugin_pager_full extends views_plugin_pager {
'#required' => TRUE,
'#description' => t('Label to use in the exposed items per page form element.'),
'#default_value' => $this->options['expose']['items_per_page_label'],
'#process' => array('ctools_dependent_process'),
'#dependency' => array(
'edit-pager-options-expose-items-per-page' => array(1)
),
......@@ -101,7 +100,6 @@ class views_plugin_pager_full extends views_plugin_pager {
'#required' => TRUE,
'#description' => t('Set between which values the user can choose when determining the items per page. Separated by comma.'),
'#default_value' => $this->options['expose']['items_per_page_options'],
'#process' => array('ctools_dependent_process'),
'#dependency' => array(
'edit-pager-options-expose-items-per-page' => array(1)
),
......@@ -120,7 +118,6 @@ class views_plugin_pager_full extends views_plugin_pager {
'#title' => t('All items label'),
'#description' => t('Which label will be used to display all items'),
'#default_value' => $this->options['expose']['items_per_page_options_all_label'],
'#process' => array('ctools_dependent_process'),
'#dependency' => array(
'edit-items-per-page-options-all' => array(1),
),
......@@ -139,7 +136,6 @@ class views_plugin_pager_full extends views_plugin_pager {
'#required' => TRUE,
'#description' => t('Label to use in the exposed offset form element.'),
'#default_value' => $this->options['expose']['offset_label'],
'#process' => array('ctools_dependent_process'),
'#dependency' => array(
'edit-pager-options-expose-offset' => array(1)
),
......
......@@ -56,7 +56,6 @@ class views_plugin_style_rss extends views_plugin_style {
'#title' => t('RSS description'),
'#default_value' => $this->options['description'],
'#description' => t('This will appear in the RSS feed itself.'),
'#process' => array('ctools_dependent_process'),
'#dependency' => array('edit-style-options-override' => array(FALSE)),
);
}
......
......@@ -52,7 +52,6 @@ class views_plugin_style_summary extends views_plugin_style {
'#type' => 'textfield',
'#title' => t('Items to display'),
'#default_value' => $this->options['items_per_page'],
'#process' => array('ctools_dependent_process'),
'#dependency' => array('edit-style-options-override' => array(TRUE)),
);
}
......
......@@ -203,14 +203,12 @@ class views_plugin_style_table extends views_plugin_style {
$form['info'][$field]['sortable'] = array(
'#type' => 'checkbox',
'#default_value' => !empty($this->options['info'][$field]['sortable']),
'#process' => array('form_process_checkbox', 'ctools_dependent_process'),
'#dependency' => array($id => array($field)),
);
$form['info'][$field]['default_sort_order'] = array(
'#type' => 'select',
'#options' => array('asc' => t('Ascending'), 'desc' => t('Descending')),
'#default_value' => !empty($this->options['info'][$field]['default_sort_order']) ? $this->options['info'][$field]['default_sort_order'] : 'asc',
'#process' => array('ctools_dependent_process'),
'#dependency_count' => 2,
'#dependency' => array($id => array($field), 'edit-style-options-info-' . $safe . '-sortable' => array(1)),
);
......@@ -224,7 +222,6 @@ class views_plugin_style_table extends views_plugin_style {
// because 'radio' doesn't fully support '#id' =(
'#attributes' => array('id' => $radio_id),
'#default_value' => $default,
'#process' => array('ctools_dependent_process'),
'#dependency' => array($id => array($field)),
);
}
......@@ -237,14 +234,12 @@ class views_plugin_style_table extends views_plugin_style {
'views-align-center' => t('Center'),
'views-align-right' => t('Right'),
),
'#process' => array('form_process_select', 'ctools_dependent_process'),
'#dependency' => array($id => array($field)),
);
$form['info'][$field]['separator'] = array(
'#type' => 'textfield',
'#size' => 10,
'#default_value' => isset($this->options['info'][$field]['separator']) ? $this->options['info'][$field]['separator'] : '',
'#process' => array('ctools_dependent_process'),
'#dependency' => array($id => array($field)),
);
......
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