Skip to content
This repository has been archived by the owner on Jul 1, 2022. It is now read-only.

[OYPD-584] Misc fixes. #751

Merged
merged 5 commits into from Aug 22, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/Content structure/Content Types/Landing Page.md
Expand Up @@ -5,7 +5,7 @@ Landing Page content type is used for adding landing pages on the site.
| Name | Machine name | Required | Description |
| ------------- | ------------- | ------------- | ------------- |
| Title | drupal's default | Yes | Title of the landing page item. |
| Layout | field\_lp_layout | Yes | Select list with the options: <ul><li>one\_column\_clean\|One Column - Full width</li><li>one\_column\|One Column</li><li>two\_column\|Two Column</li><li>two\_column\_fixed\|Two column with fixed sidebar</li></ul> |
| Layout | field\_lp_layout | Yes | Select list with the options: <ul><li>one\_column\_clean\|One Column - Full width</li><li>one\_column\|One Column</li><li>two\_column\|Two Columns</li><li>two\_column\_fixed\|Two Columns with fixed sidebar (sticky at the top)</li></ul> |
| Meta Tags | field\_meta_tags | No | A meta tags field allows us to provide structured metadata and Graph meta tags for Facebook, Pinterest, LinkedIn and other social networking sites. |
| **Header Area** | Field group |||
| Content | field\_header_content | No | A paragraph embed field that will allow us to add various flexible content modules, from the predefined list of paragraph types. |
Expand Down
Expand Up @@ -31,7 +31,7 @@ tips:
id: layout
plugin: text
label: 'Layout Drop'
body: 'Here a user can decide the page layout one column full width, one or two column or two column with a sidebar. [openy_tour:click:.field--name-field-header-content]'
body: 'Here a user can decide the page layout one column full width, one or two columns or two columns with a sidebar. [openy_tour:click:.field--name-field-header-content]'
location: bottom
weight: 3
attributes:
Expand Down
Expand Up @@ -18,10 +18,10 @@ settings:
label: 'One Column'
-
value: two_column
label: 'Two Column'
label: 'Two Columns'
-
value: two_column_fixed
label: 'Two column with fixed sidebar'
label: 'Two Columns with fixed sidebar (sticky at the top)'
allowed_values_function: ''
module: options
locked: false
Expand Down
Expand Up @@ -186,3 +186,18 @@ function openy_node_landing_update_8007() {
'third_party_settings.field_group.group_header_area.format_settings.description'
);
}

/**
* Update sidebar option text.
*/
function openy_node_landing_update_8008() {
$config_importer = \Drupal::service('openy_upgrade_tool.param_updater');
$config = drupal_get_path('module', 'openy_node_landing');
$config .= '/config/install/';
$config .= 'field.storage.node.field_lp_layout.yml';
$config_importer->update(
$config,
'field.storage.node.field_lp_layout',
'settings.allowed_values'
);
}
Expand Up @@ -13,7 +13,7 @@ function openy_node_landing_field_group_build_pre_render_alter(&$element) {
return;
}
// Set visible states for Landing page form Group Sidebar Area when Layout has
// a two column option selected.
// a two columns option selected.
$element['group_sidebar_area']['#states'] = [
'visible' => [
[
Expand Down
Expand Up @@ -13,6 +13,14 @@ function openy_taxonomy_views_data_alter(&$data) {
'group' => t('OpenY Content'),
'title' => t('Has taxonomy term ID. AND query support.'),
'help' => t('Display content if it has the selected taxonomy terms. AND query support'),
'argument' => [
'id' => 'taxonomy_index_tid',
'name table' => 'taxonomy_term_field_data',
'name field' => 'name',
'empty field name' => t('Uncategorized'),
'numeric' => TRUE,
'skip base' => 'taxonomy_term_field_data',
],
'filter' => [
'title' => t('Has taxonomy terms'),
'id' => 'better_taxonomy_index_tid',
Expand Down
50 changes: 23 additions & 27 deletions tests/features/paragraphs/groupex_pro_paragraphs.feature
Expand Up @@ -40,41 +40,36 @@ Feature: GroupEx Pro paragraphs
# And I wait 45 seconds
And I should see text matching "8:30am 60 min"
And I should see text matching "Chisel Studio 1"
And I should see text matching "Jennifer K."
And I should see text matching "Lucy T."
And I should see text matching "11:00am 60 min"
And I should see text matching "Yoga GX2"
And I should see text matching "John F."
And I should see text matching "7:00pm 60 min"
And I should see text matching "3D XTREME"
And I should see text matching "Melissa T."
Then I click "a:contains('Jennifer K.')" element
Then I click "a:contains('Lucy T.')" element
Then I wait for AJAX to finish
And I should see an ".groupex-pdf-link-container a:contains('Download PDF')" element
And I should see text matching "9:00am 60 min"
And I should see text matching "3D XTREME"
And I should see text matching "Jennifer K."
And I should see text matching "8:30am 60 min"
And I should see text matching "Chisel"
And I should see text matching "Studio 1"
And I should see text matching "Jennifer K."
And I should see text matching "5:45am 45 min"
And I should see text matching "Indoor Cycling"
And I should see text matching "Cycle"
And I should see text matching "Lucy T."
And I should see text matching "7:00am 60 min"
And I should see text matching "Strike!"
And I should see text matching "GX1"
And I should see text matching "Lucy T."
And I should see text matching "8:30am 60 min"
And I should see text matching "Chisel"
And I should see text matching "Studio 1"
And I should see text matching "Jennifer K."
And I should see text matching "1:30pm 60 min"
And I should see text matching "Barre Above"
And I should see text matching "Jennifer K."
And I should see text matching "7:00am 60 min"
And I should see text matching "U-Jam Fitness®"
And I should see text matching "GX1"
And I should see text matching "Jennifer K."
And I should see text matching "Lucy T."
Then I click "a:contains('Chisel')" element
Then I wait for AJAX to finish
And I should see an ".groupex-pdf-link-container a:contains('Download PDF')" element
And I should see text matching "A full body strength workout. Using weights, tubing, body bars and more! For all levels."
And I should see text matching "Chisel"
And I should see text matching "Studio 1"
And I should see text matching "Jennifer K."
And I should see text matching "Lisa W."
And I should see text matching "Lucy T."

Scenario: Verify Embedded GroupEx Schedules is working.
Given I view node "behat_embedded_groupexpro_schedules"
Expand All @@ -91,15 +86,16 @@ Feature: GroupEx Pro paragraphs
And I should see an "#GXPThursday" element
And I should see an "#GXPFriday" element
And I should see an "#GXPSaturday" element
And I should see text matching "5:00am-9:00am"
And I should see text matching "Open Swim"
# And I wait 100 seconds
And I should see text matching "8:00am-9:00am"
And I should see text matching "Combo Cardio/Strength"
And I should see text matching "John F."
And I should see text matching "Open Swim"
And I should see text matching "GXP Club - Reilly"
Then I select "5506" from "categories"
And I should see text matching "GX1"
And I should see text matching "GXP Club - Fable"
Then I select "469" from "categories"
Then I wait for AJAX to finish
And I should see text matching "5:00am-9:00am"
And I should see text matching "Open Swim"
And I should see text matching "8:00am-9:00am"
And I should see text matching "Combo Cardio/Strength"
And I should see text matching "John F."
And I should see text matching "Open Swim"
And I should see text matching "GXP Club - Reilly"
And I should see text matching "GX1"
And I should see text matching "GXP Club - Fable"
18 changes: 13 additions & 5 deletions themes/openy_themes/openy_rose/css/styles.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion themes/openy_themes/openy_rose/css/styles.css.map

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions themes/openy_themes/openy_rose/scripts/openy_rose_landing.js
@@ -1,24 +1,24 @@
(function ($) {
"use strict";
'use strict';
Drupal.behaviors.openy_rose_fixed_sidbar = {
attach: function (context, settings) {
function sidebarAffix() {
var contentHeight = $(".main-region").outerHeight();
var sidebarHeight = $(".sidebar-region").outerHeight();
var contentHeight = $('.main-region').outerHeight();
var sidebarHeight = $('.sidebar-region').outerHeight();

if (contentHeight > sidebarHeight) {
var $sidebar = $(".landing-sidebar.two-column-fixed>div");
var $sidebar = $('.landing-sidebar.two-column-fixed>.wrapper-field-sidebar-content');
$sidebar.unbind();
var top_offset = $('.nav-global').outerHeight(true) + $('.site-alert--header').outerHeight(true) + $('.landing-header').outerHeight(true) + $('#block-tabs').outerHeight(true);
var bottom_offset = $(".footer").outerHeight(true) + 40;
var top_offset = $('.header-alerts-list').outerHeight(true) + $('.wrapper-field-header-content').outerHeight(true) + 48;
var bottom_offset = $('.footer').outerHeight(true) + $('.wrapper-field-bottom-content').outerHeight(true) + $('.site-alert--footer').outerHeight(true);
$sidebar.affix({
offset: {
top: top_offset,
bottom: bottom_offset
}
});
$sidebar.on("affixed.bs.affix", function () {
$sidebar.attr("style", "");
$sidebar.on('affixed.bs.affix', function () {
$sidebar.attr('style', '');
});
}
}
Expand Down
33 changes: 18 additions & 15 deletions themes/openy_themes/openy_rose/scss/modules/_landing.scss
@@ -1,18 +1,21 @@
.two-column-fixed .affix {
top: 126px;
position: static;
@include breakpoint($screen-sm) {
width: 220px;
position: fixed;
}
@include breakpoint($screen-md) {
width: 294px;
}
@include breakpoint($screen-lg) {
width: 360px;
}
.toolbar-fixed & {
top: 166px;
.two-column-fixed {
.affix,
.affix-bottom {
top: 126px;
position: static;
@include breakpoint($screen-sm) {
width: 220px;
position: fixed;
}
@include breakpoint($screen-md) {
width: 294px;
}
@include breakpoint($screen-lg) {
width: 360px;
}
.toolbar-fixed & {
top: 166px;
}
}
}

Expand Down
4 changes: 4 additions & 0 deletions themes/openy_themes/openy_rose/scss/paragraphs/_lto.scss
Expand Up @@ -59,4 +59,8 @@
text-transform: uppercase;
}
}

.wrapper-field-bottom-content & {
margin: 0;
}
}