summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Pott2014-12-05 20:02:10 +0000
committerAlex Pott2014-12-05 20:02:10 +0000
commita8a42e62312dd66f6f4d748ddc8fefba9e0db4a4 (patch)
tree1418983f89f55af800b06a704af7c3d820f014de
parent8790ec0d1fad484895d3ec68ec7e7753fd7a0fa2 (diff)
Issue #2331793 by olli, Gábor Hojtsy: Changing pager settings for this display only also changes pager settings for other display
-rw-r--r--core/modules/views/config/schema/views.data_types.schema.yml9
-rw-r--r--core/modules/views/src/Plugin/views/display/DisplayPluginBase.php9
-rw-r--r--core/modules/views/src/Tests/Plugin/PagerTest.php6
3 files changed, 8 insertions, 16 deletions
diff --git a/core/modules/views/config/schema/views.data_types.schema.yml b/core/modules/views/config/schema/views.data_types.schema.yml
index c2c2ffc..f371e12 100644
--- a/core/modules/views/config/schema/views.data_types.schema.yml
+++ b/core/modules/views/config/schema/views.data_types.schema.yml
@@ -154,9 +154,6 @@ views_display:
exposed_form:
type: boolean
label: 'Exposed form style'
- exposed_form_options:
- type: boolean
- label: 'Exposed form options'
link_display:
type: boolean
label: 'Link display'
@@ -190,9 +187,6 @@ views_display:
filter_groups:
type: boolean
label: 'Filter groups'
- pager_options:
- type: boolean
- label: 'Pager options'
header:
type: boolean
label: 'Header'
@@ -234,9 +228,6 @@ views_display:
link_url:
type: string
label: 'Link URL'
- pager_options:
- type: boolean
- label: 'Pager options'
header:
type: sequence
label: 'Header'
diff --git a/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php b/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php
index 7386c00..e471d8a 100644
--- a/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php
+++ b/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php
@@ -469,11 +469,9 @@ abstract class DisplayPluginBase extends PluginBase {
'style' => array('style', 'row'),
'row' => array('style', 'row'),
- 'pager' => array('pager', 'pager_options'),
- 'pager_options' => array('pager', 'pager_options'),
+ 'pager' => array('pager'),
- 'exposed_form' => array('exposed_form', 'exposed_form_options'),
- 'exposed_form_options' => array('exposed_form', 'exposed_form_options'),
+ 'exposed_form' => array('exposed_form'),
// These guys are special
'header' => array('header'),
@@ -695,9 +693,6 @@ abstract class DisplayPluginBase extends PluginBase {
);
if (!$this->usesPager()) {
- $options['defaults']['default']['use_pager'] = FALSE;
- $options['defaults']['default']['items_per_page'] = FALSE;
- $options['defaults']['default']['offset'] = FALSE;
$options['defaults']['default']['pager'] = FALSE;
$options['pager']['contains']['type']['default'] = 'some';
}
diff --git a/core/modules/views/src/Tests/Plugin/PagerTest.php b/core/modules/views/src/Tests/Plugin/PagerTest.php
index 20e0718..46e75bc 100644
--- a/core/modules/views/src/Tests/Plugin/PagerTest.php
+++ b/core/modules/views/src/Tests/Plugin/PagerTest.php
@@ -103,6 +103,12 @@ class PagerTest extends PluginTestBase {
$this->assertText('10 items', 'The default value has been changed.');
$this->drupalGet('admin/structure/views/view/test_store_pager_settings/edit/page_1');
$this->assertText('20 items', 'The original value remains unchanged.');
+
+ // Test that the override element is only displayed on pager plugin selection form.
+ $this->drupalGet('admin/structure/views/nojs/display/test_store_pager_settings/page_1/pager');
+ $this->assertFieldByName('override[dropdown]', 'page_1', 'The override element is displayed on plugin selection form.');
+ $this->drupalGet('admin/structure/views/nojs/display/test_store_pager_settings/page_1/pager_options');
+ $this->assertNoFieldByName('override[dropdown]', NULL, 'The override element is not displayed on plugin settings form.');
}
/**