From bbbdbfc39c89294d85ad3952e4f305051f1074a0 Mon Sep 17 00:00:00 2001 From: jlbellido Date: Thu, 2 Feb 2017 23:01:37 +0100 Subject: [PATCH] #190: Added infinite scrcoll on mobile. --- composer.json | 3 +- composer.lock | 38 +++++++++++++++++-- ...tity_view_display.node.sponsor.default.yml | 9 +++++ config/sync/core.extension.yml | 1 + config/sync/views.view.attendees.yml | 9 +++-- 5 files changed, 52 insertions(+), 8 deletions(-) diff --git a/composer.json b/composer.json index 83f1af8..f6d36e7 100644 --- a/composer.json +++ b/composer.json @@ -29,7 +29,8 @@ "drupal/pathauto": "~8.1", "drupal/block_visibility_groups": "~8.1", "drupal/imagemagick": "~8.1", - "drupal/field_group": "~8.0" + "drupal/field_group": "~8.0", + "drupal/views_infinite_scroll": "^8.1" }, "require-dev": { "behat/mink": "~1.7", diff --git a/composer.lock b/composer.lock index ca3690d..772b3ab 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "752c56ad6d6413cc6b01d5ab1b36d995", - "content-hash": "89b8a822547c26918a71781d6d501035", + "hash": "6caf87edd771bce7754b117cb4e022a2", + "content-hash": "26ca9bc7a64a9e74ef44e8f65d1b5f95", "packages": [ { "name": "alchemy/zippy", @@ -1347,7 +1347,7 @@ "dist": { "type": "zip", "url": "https://ftp.drupal.org/files/projects/field_group-8.x-1.0-rc6.zip", - "reference": null, + "reference": "acd3aaef1d0c9822b81ce7fdff8a12ef3844b4e1", "shasum": null }, "require": { @@ -1542,6 +1542,38 @@ "homepage": "https://www.drupal.org/project/token", "time": "2017-01-01 16:26:13" }, + { + "name": "drupal/views_infinite_scroll", + "version": "8.1.3", + "source": { + "type": "git", + "url": "https://git.drupal.org/project/views_infinite_scroll", + "reference": "0c65e46bab9640303656880ec5db32267ee0580b" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/views_infinite_scroll-8.x-1.3.zip", + "reference": null, + "shasum": null + }, + "require": { + "drupal/core": "8.*", + "drupal/views": "8.*" + }, + "type": "drupal-module", + "extra": { + "branch-alias": { + "dev-8.x-1.x": "8.1.x-dev" + } + }, + "notification-url": "https://packagist.drupal-composer.org/downloads/", + "license": [ + "GPL-2.0+" + ], + "description": "A pager which allows an infinite scroll effect for views.", + "homepage": "https://www.drupal.org/project/views_infinite_scroll", + "time": "2016-11-04 08:21:07" + }, { "name": "drush/drush", "version": "8.1.3", diff --git a/config/sync/core.entity_view_display.node.sponsor.default.yml b/config/sync/core.entity_view_display.node.sponsor.default.yml index 06ea6a7..622f915 100644 --- a/config/sync/core.entity_view_display.node.sponsor.default.yml +++ b/config/sync/core.entity_view_display.node.sponsor.default.yml @@ -25,6 +25,15 @@ content: weight: 101 settings: { } third_party_settings: { } + created: + label: hidden + type: timestamp + weight: 0 + settings: + date_format: medium + custom_date_format: '' + timezone: '' + third_party_settings: { } field_logo: weight: 103 label: above diff --git a/config/sync/core.extension.yml b/config/sync/core.extension.yml index 93e4729..7837c62 100644 --- a/config/sync/core.extension.yml +++ b/config/sync/core.extension.yml @@ -41,6 +41,7 @@ module: update: 0 user: 0 views: 0 + views_infinite_scroll: 0 views_ui: 0 pathauto: 1 minimal: 1000 diff --git a/config/sync/views.view.attendees.yml b/config/sync/views.view.attendees.yml index a96a22f..5c8b69f 100644 --- a/config/sync/views.view.attendees.yml +++ b/config/sync/views.view.attendees.yml @@ -7,6 +7,7 @@ dependencies: - user.role.attendee module: - user + - views_infinite_scroll id: attendees label: Attendees module: views @@ -48,7 +49,7 @@ display: sort_asc_label: Asc sort_desc_label: Desc pager: - type: full + type: infinite_scroll options: items_per_page: 20 offset: 0 @@ -57,8 +58,6 @@ display: tags: previous: ‹‹ next: ›› - first: '« First' - last: 'Last »' expose: items_per_page: false items_per_page_label: 'Items per page' @@ -67,7 +66,9 @@ display: items_per_page_options_all_label: '- All -' offset: false offset_label: Offset - quantity: 9 + views_infinite_scroll: + button_text: 'Load More' + automatically_load_content: true style: type: html_list row: