Skip to content
Snippets Groups Projects
Commit ba47b70c authored by Frederico Pais's avatar Frederico Pais Committed by Pablo Grande
Browse files

Issue #3288251 by pgrandeg, Frederico Pais: Automated Drupal 10 compatibility fixes

parent f1230c56
No related branches found
No related tags found
1 merge request!11Issue #3288251 by pgrandeg, Frederico Pais: Automated Drupal 10 compatibility fixes
Showing
with 490 additions and 83 deletions
Source diff could not be displayed: it is too large. Options to address this: view the blob.
......@@ -3,7 +3,7 @@
* Layout Components behaviors.
*/
(function ($, Drupal) {
(function ($, Drupal, once) {
'use strict';
......@@ -12,10 +12,10 @@
behaviors.lcEditTooltip = {
attach: function (context) {
$(".lc_editor-link, .lc-lateral-info").once('tooltip').tooltip({
$(once('tooltip', '.lc_editor-link, .lc-lateral-info', context)).tooltip({
tooltipClass:"lc-tooltip"
});
}
}
})(jQuery, Drupal);
})(jQuery, Drupal, once);
name: Layout Components
type: module
description: Blocks for placing into layout builder.
core_version_requirement: ^8.8 || ^9
core_version_requirement: ^9 || ^10
configure: layoutcomponents.settings_general
package: LayoutComponents
dependencies:
......
......@@ -4,7 +4,7 @@
* @file
* Contains layoutcomponents.module.
*/
use Drupal\Core\Asset\AttachedAssetsInterface;
use Drupal\Core\Routing\RouteMatchInterface;
use Drupal\Core\Entity\Display\EntityViewDisplayInterface;
use Drupal\Core\Entity\EntityInterface;
......@@ -133,7 +133,7 @@ function layoutcomponents_entity_type_alter(array &$entity_types) {
/**
* Implements hook_css_alter().
*/
function layoutcomponents_css_alter(&$css, \Drupal\Core\Asset\AttachedAssetsInterface $assets) {
function layoutcomponents_css_alter(&$css, AttachedAssetsInterface $assets) {
$route = \Drupal::routeMatch()->getRouteObject();
$parameters = $route->getOption('parameters');
if (isset($parameters)) {
......
......@@ -30,7 +30,7 @@ function _layoutcomponents_preprocess_layout(array &$variables) {
// Dispatch the event.
$event = new LcPreprocessLayoutEvent($layout);
$event_dispatcher = \Drupal::service('event_dispatcher');
$event_dispatcher->dispatch(LcPreprocessLayoutEvent::LC_LAYOUT, $event);
$event_dispatcher->dispatch($event, LcPreprocessLayoutEvent::LC_LAYOUT);
$variables['lc_admin'] = FALSE;
$route = \Drupal::routeMatch()->getRouteObject();
......
......@@ -2,7 +2,7 @@ name: Layout Components - Commands
type: module
description: Include commands to export and import the blocks.
package: LayoutComponents
core_version_requirement: ^8.8 || ^9
core_version_requirement: ^9 || ^10
dependencies:
- drupal:layoutcomponents
- drupal:hal
......
......@@ -5,7 +5,7 @@
display: block;
}
#drupal-off-canvas ul li a.inline-block-list__item.simple_accordion:before {
#drupal-off-canvas-wrapper ul li a.inline-block-list__item.simple_accordion:before {
content: "\f03c";
font-family: FontAwesome;
font-size: 60px;
......
......@@ -2,7 +2,7 @@ name: Layout Components - Simple Accordion
type: module
description: Simple accordion block type
package: LayoutComponents
core_version_requirement: ^8.8 || ^9
core_version_requirement: ^9 || ^10
dependencies:
- drupal:layoutcomponents
- lc_simple_text:lc_simple_text
......
......@@ -12,6 +12,7 @@ body {
width: 25% !important;
left: 75% !important;
}
#drupal-off-canvas-wrapper,
#drupal-off-canvas {
background: #444;
padding: 20px 10px !important;
......
......@@ -15,15 +15,17 @@
<div {{ container.attributes }}>
<div id="accordion-{{ container.id }}" {{ attributes.addClass(classes) }}>
<div class="card">
{% for key, item in container.content.field_sa_accordion_item if key|first != '#' %}
{% if loop.first %}
{% set collapsed = '' %}
{% set show_accordion = ' show' %}
{% set aria = 'true' %}
{% else %}
{% set collapsed = 'collapsed' %}
{% set show_accordion = '' %}
{% set aria = 'false' %}
{% for key, item in container.content.field_sa_accordion_item %}
{% if key|first != '#' %}
{% if loop.first %}
{% set collapsed = '' %}
{% set show_accordion = ' show' %}
{% set aria = 'true' %}
{% else %}
{% set collapsed = 'collapsed' %}
{% set show_accordion = '' %}
{% set aria = 'false' %}
{% endif %}
{% endif %}
<div {{ item.header_attributes }}>
<h5 class="mb-0">
......
......@@ -2,6 +2,15 @@
opacity: 0.8;
}
#drupal-off-canvas-wrapper ul li a.inline-block-list__item.simple_button:before {
position: relative;
float: left;
content: url("../images/button.svg");
width: 60px;
height: 80px;
margin-top: 10px;
}
#drupal-off-canvas ul li a.inline-block-list__item.simple_button:before {
position: relative;
float: left;
......
......@@ -2,6 +2,6 @@ name: Layout Components - Simple Button
type: module
description: Simple button block type
package: LayoutComponents
core_version_requirement: ^8.8 || ^9
core_version_requirement: ^9 || ^10
dependencies:
- drupal:layoutcomponents
......@@ -7,6 +7,7 @@
}
}
}
#drupal-off-canvas-wrapper,
#drupal-off-canvas {
ul {
li {
......
.simple-card-grid-item {
width: 33.333%;
}
.simple-card-grid-item img {
margin-left: auto;
margin-right: auto;
......@@ -12,6 +11,7 @@
float: left;
}
#drupal-off-canvas-wrapper ul li a.inline-block-list__item.simple_card:before,
#drupal-off-canvas ul li a.inline-block-list__item.simple_card:before {
content: "\f2bb";
font-family: FontAwesome;
......
......@@ -2,7 +2,7 @@ name: Layout Components - Simple Card
type: module
description: Simple card block type
package: LayoutComponents
core_version_requirement: ^8.8 || ^9
core_version_requirement: ^9 || ^10
dependencies:
- drupal:image
- drupal:layoutcomponents
......@@ -13,6 +13,7 @@
float: left;
}
}
#drupal-off-canvas-wrapper,
#drupal-off-canvas {
ul {
li {
......
......@@ -2,6 +2,6 @@ name: Layout Components - Simple Card With Float Text
type: module
description: Simple card with float text
package: LayoutComponents
core_version_requirement: ^8.8 || ^9
core_version_requirement: ^9 || ^10
dependencies:
- layoutcomponents
#drupal-off-canvas-wrapper ul li a.inline-block-list__item.simple_countdown:before,
#drupal-off-canvas ul li a.inline-block-list__item.simple_countdown:before {
content: "\f254";
font-family: FontAwesome;
......
......@@ -2,7 +2,7 @@ name: Layout Components - Simple Countdown
type: module
description: Simple countdown block type
package: LayoutComponents
core_version_requirement: ^8.8 || ^9
core_version_requirement: ^9 || ^10
dependencies:
- drupal:layoutcomponents
- drupal:lc_simple_title
// out: ../css/lc_simple_countdown.css, compress: false, sourceMap: false, autoprefixer: false, groupmedia: false
// mixins variables
#drupal-off-canvas-wrapper,
#drupal-off-canvas {
ul {
li {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment