diff --git a/CHANGELOG.md b/CHANGELOG.md index 055beca06777be940c486ec94d9df4790cb253cb..d11b1098d6eae46f87ec4abef3eaf1ca32c8cd7d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,61 +4,54 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [2.4.0] - 26-02-2019 -### Fixed -- Issue with Preview Card styling not loading on Preview List -- Error when placing date format under date in Preview Card + +## [2.5.0] - 25-04-2019 + +- Fixed issue of plus/minus signs in FAQ-list pattern +- Fixed issue of active trail in 2nd level menu -### Added -- Color for preview-list titles -- Text-shadow on Preview Cards' elements +## [2.4.0] - 26-02-2019 -### Changed +- Fixed issue of Preview Card styling not loading on Preview List +- Fixed error when placing date format under date in Preview Card +- Added color for preview-list titles +- Added text-shadow on Preview Cards' elements - Removed top margin from Preview List component ## [2.3.2] - 31-01-2019 -### Fixed -- Issue that video resources are displayed very slim + +- Fixed issue of video resources are displayed very slim ## [2.3.1] - 30-01-2019 -### Changed + - Decreased the number of permitted chars for Preview cards from 65 to 45 ## [2.3.0] - 21-01-2019 -### Fixed -- Applying 'CDS-loading-error' to all thumbnail items instead of only affected images -- Issue with Preview cards overflowing under mega menu -### Added -- Text shadow for Hero Frames titles and subtitles +- Applied 'CDS-loading-error' to all thumbnail items instead of only affected images +- Fixed issue og Preview cards overflowing under mega menu +- Added text shadow for Hero Frames titles and subtitles ## [2.2.2] - 16-01-2019 -### Fixed -- Overflowing text in Preview Cards when the card had icon + +- Fixed overflowing text in Preview Cards when the card had icon ## [2.2.1] - 10-12-2018 -### Fixed + - Added styling for "+More" link in mega menu ## [2.2.0] - 06-12-2018 -### Fixed -- FAQ List pattern not holding 100% of the width -- Cut scroll button on mobile chrome -- Image Gallery stretching - -### Added -- Responsive version in Preview List pattern -- Border around Preview List images -- New twig function that returns current language - - -### Changed -- Design of FAQ List pattern - -### Removed -- Avatar from "opinion" pieces +- Fixed FAQ List pattern not holding 100% of the width +- Fixed scroll button being cut on mobile chrome +- Fixed image Gallery stretching +- Added responsive version in Preview List pattern +- Added border around Preview List images +- Added new twig function that returns current language +- Changed design of FAQ List pattern +- Removed avatar from "opinion" pieces + diff --git a/cern_components.info.yml b/cern_components.info.yml index 5e44f1cbd4ed29d8e8df75abb67c6f673687e96f..2bd5e970d09a7ee8767e99cc5ab9d0c3703a7278 100755 --- a/cern_components.info.yml +++ b/cern_components.info.yml @@ -2,7 +2,7 @@ name: "CERN Components" type: module description: "Provides all the necessary modules regarding CERN Web Components." core: 8.x -version: 2.4.0 +version: 2.5.0 package: CERN Components dependencies: - components:components (>=8.x-1.1-alpha1) diff --git a/patterns/molecules/faq-list/js/faq-list.component.js b/patterns/molecules/faq-list/js/faq-list.component.js index 22fac7f664f4bbb0b9939b2c055a7e06272cbb84..b044aef3b0e9265ba619eef5bf26fb5e55354841 100644 --- a/patterns/molecules/faq-list/js/faq-list.component.js +++ b/patterns/molecules/faq-list/js/faq-list.component.js @@ -4,23 +4,15 @@ Drupal.behaviors.CERNComponentsFAQList = { attach: function (context) { - - jQuery('body').once().on('click', '.collapseManager', function(){ - if (jQuery(this).text() == '+') { - jQuery(this).text('-'); - jQuery(this).css('top', 'auto'); - jQuery(this).css('bottom', '-32px'); - jQuery(this).css('font-size', '42px'); + jQuery('.panel-title').once().on('click', function(){ + var link = jQuery(this).children('a'); + if (link.hasClass("is-open")) { + link.removeClass('is-open'); } else { - jQuery(this).text('+'); - jQuery(this).css('top', '0'); - jQuery(this).css('bottom', 'auto'); - jQuery(this).css('font-size', '30px'); + link.addClass('is-open'); } - jQuery(this).closest('.faq-list-content-title').next('.faq-list-content-body').toggleClass('hidden'); }); - } }; -})(jQuery, Drupal); \ No newline at end of file +})(jQuery, Drupal); \ No newline at end of file diff --git a/patterns/molecules/menu/js/menu.component.js b/patterns/molecules/menu/js/menu.component.js index 4d44d68812ed1b8b1bece79ee73047f7180c1396..dab2931c0089a3b192202be96621dd8f296cfb6a 100644 --- a/patterns/molecules/menu/js/menu.component.js +++ b/patterns/molecules/menu/js/menu.component.js @@ -103,17 +103,20 @@ if (("/"+currentlang) == previous_path) { break; } - matched_links = $('li.cern-dropdown').find('a[href^="'+ previous_path +'"]'); - if ((matched_links.length > 1 && current_search != '') || matched_links.length == 1) { + + matched_links = jQuery('li.cern-dropdown').find('a[href^="'+ previous_path +'"]'); + if ((matched_links.length > 1 && current_search != '') || matched_links.length == 1) { + jQuery('li.cern-dropdown').find('a[href^="'+ previous_path + current_search + '"]').closest('.cern-submenu').find('.cernmenu-level-0 a').addClass('active-trail'); + jQuery('li.cern-dropdown').find('a[href^="'+ previous_path + current_search + '"]').addClass('active-trail'); break; + } else { + if (i==0) { + matched_links.closest('.cern-submenu').find('.cernmenu-level-0 a').addClass('active-trail'); + } } - current_path.pop(); + current_path.pop(); } - - /*if (matched_links.length > 1 && current_search != '') { - var matched_links = $('li.cern-dropdown').find('a[href^="'+ previous_path + current_search +'"]'); - }*/ - + if (matched_links.length == 1) { // make a row children link active matched_links.eq(0).addClass('active-trail'); @@ -124,7 +127,6 @@ matched_links.eq(0).closest('.cern-dropdown').find('a.dropdown-toggle').eq(0).addClass('active-trail'); } } - /** END ACTIVE TRAIL */ })(jQuery, Drupal);