From 2ac82d31185e441fc118a8d45b84c30e765d2b62 Mon Sep 17 00:00:00 2001 From: Shelane French <38005-shelane@users.noreply.drupalcode.org> Date: Fri, 10 May 2024 21:35:04 +0000 Subject: [PATCH] Issue #3446584: Fix code check issues --- js/views-bootstrap.js | 16 +++++----------- .../views/style/ViewsBootstrapAccordion.php | 2 +- .../views/style/ViewsBootstrapCarousel.php | 2 +- templates/views-bootstrap-media-object.html.twig | 2 +- views_bootstrap.theme.inc | 4 ++-- 5 files changed, 10 insertions(+), 16 deletions(-) diff --git a/js/views-bootstrap.js b/js/views-bootstrap.js index fb645de..befd0ef 100644 --- a/js/views-bootstrap.js +++ b/js/views-bootstrap.js @@ -1,20 +1,14 @@ (function ($) { - - 'use strict'; - /** * Attaches the behavior to bootstrap carousel view. */ Drupal.behaviors.views_bootstrap_carousel = { - attach: function (context, settings) { - $('.carousel-inner').each(function() { + attach(context, settings) { + $('.carousel-inner').each(function () { if ($(this).children('div').length === 1) { $(this).siblings('.carousel-control, .carousel-indicators').hide(); } }); - } - } - - - -}(jQuery)); \ No newline at end of file + }, + }; +})(jQuery); diff --git a/src/Plugin/views/style/ViewsBootstrapAccordion.php b/src/Plugin/views/style/ViewsBootstrapAccordion.php index d8f9ab3..06cefe2 100644 --- a/src/Plugin/views/style/ViewsBootstrapAccordion.php +++ b/src/Plugin/views/style/ViewsBootstrapAccordion.php @@ -61,7 +61,7 @@ class ViewsBootstrapAccordion extends StylePluginBase { '#options' => $this->displayHandler->getFieldLabels(TRUE), '#required' => TRUE, '#default_value' => $this->options['panel_title_field'], - '#description' => $this->t('Select the field that will be used as the accordian panel titles.'), + '#description' => $this->t('Select the field that will be used as the accordion panel titles.'), ]; } $options_select = [ diff --git a/src/Plugin/views/style/ViewsBootstrapCarousel.php b/src/Plugin/views/style/ViewsBootstrapCarousel.php index d4dd292..4966d2a 100644 --- a/src/Plugin/views/style/ViewsBootstrapCarousel.php +++ b/src/Plugin/views/style/ViewsBootstrapCarousel.php @@ -78,7 +78,7 @@ class ViewsBootstrapCarousel extends StylePluginBase { $form['ride'] = [ '#type' => 'checkbox', '#title' => $this->t('Ride (Autoplay)'), - '#description' => $this->t('Autoplays the carousel on load.'), + '#description' => $this->t('Autoplay the carousel on load.'), '#default_value' => $this->options['ride'], ]; diff --git a/templates/views-bootstrap-media-object.html.twig b/templates/views-bootstrap-media-object.html.twig index 80b6393..de39473 100644 --- a/templates/views-bootstrap-media-object.html.twig +++ b/templates/views-bootstrap-media-object.html.twig @@ -1,4 +1,4 @@ -{# @todo: add more control to images and positoning #} +{# @todo: add more control to images and positioning #} <div{{ attributes.addClass(classes) }} id="{{ id }}"> {% for key, row in rows -%} diff --git a/views_bootstrap.theme.inc b/views_bootstrap.theme.inc index 7ff97b0..b731f1d 100644 --- a/views_bootstrap.theme.inc +++ b/views_bootstrap.theme.inc @@ -32,7 +32,7 @@ function template_preprocess_views_bootstrap_accordion(array &$vars) { } } else { - // @todo This would be better as valdiation errors on the style plugin options form. + // @todo This would be better as validation errors on the style plugin options form. \Drupal::messenger()->addWarning(t('@style style will not display without the "@field" setting.', [ '@style' => $view->style_plugin->definition['title'], @@ -230,7 +230,7 @@ function template_preprocess_views_bootstrap_tab(array &$vars) { } } else { - // @todo This would be better as valdiation errors on the style plugin options form. + // @todo This would be better as validation errors on the style plugin options form. \Drupal::messenger()->addWarning(t('@style style will not display without the "@field" setting.', [ '@style' => $view->style_plugin->definition['title'], -- GitLab