Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.0] update Bootstrap to beta 2 #32378

Merged
merged 7 commits into from
Feb 11, 2021
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
<?php endif; ?>
</div>
<?php if($item->isMissingDownloadKey): ?>
<?php HTMLHelper::_('bootstrap.popover', 'span.hasPopover'); ?>
<?php HTMLHelper::_('bootstrap.popover', 'span.hasPopover', ['trigger' => 'hover focus']); ?>
<span class="badge bg-warning text-dark">
<span class="hasPopover"
title="<?php echo Text::_('COM_INSTALLER_DOWNLOADKEY_MISSING_LABEL') ?>"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
use Joomla\CMS\Router\Route;

HTMLHelper::_('behavior.multiselect');
HTMLHelper::_('bootstrap.popover', 'span.hasPopover');
HTMLHelper::_('bootstrap.popover', 'span.hasPopover', ['trigger' => 'hover focus']);

$user = Factory::getApplication()->getIdentity();
$userId = $user->get('id');
Expand Down
4 changes: 1 addition & 3 deletions layouts/joomla/button/action-button.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@

use Joomla\CMS\HTML\HTMLHelper;

HTMLHelper::_('bootstrap.popover');

extract($displayData, EXTR_OVERWRITE);

/**
Expand All @@ -31,7 +29,7 @@

if ($tip)
{
HTMLHelper::_('bootstrap.popover', '.hasPopover');
HTMLHelper::_('bootstrap.popover', '.hasPopover', ['trigger' => 'hover focus']);
}
?>
<button type="submit" class="tbody-icon data-state-<?php echo $this->escape($value ?? ''); ?><?php echo $tip ? ' hasPopover' : ''; ?>"
Expand Down
6 changes: 2 additions & 4 deletions layouts/joomla/button/transition-button.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;

HTMLHelper::_('bootstrap.popover');

extract($displayData, EXTR_OVERWRITE);

/**
Expand All @@ -33,7 +31,7 @@

if ($tip)
{
HTMLHelper::_('bootstrap.popover', '.hasPopover');
HTMLHelper::_('bootstrap.popover', '.hasPopover', ['trigger' => 'hover focus']);
}
?>
<?php if ($only_icon || $disabled) : ?>
Expand All @@ -51,7 +49,7 @@
<?php endif; ?>
</div>
<?php else : ?>
<?php HTMLHelper::_('bootstrap.popover', '.hasPopover'); ?>
<?php HTMLHelper::_('bootstrap.popover', '.hasPopover', ['trigger' => 'hover focus']); ?>
<button type="button" class="tbody-icon align-self-start me-1 data-state-<?php echo $this->escape($value ?? ''); ?> <?php echo $tip ? 'hasPopover' : ''; ?>"
title="<?php echo HTMLHelper::_('tooltipText', $tipTitle ?: $title, '', 0); ?>"
data-bs-content="<?php echo HTMLHelper::_('tooltipText', $tipContent, '', 0); ?>"
Expand Down
2 changes: 1 addition & 1 deletion layouts/plugins/system/privacyconsent/label.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
// If a description is specified, use it to build a tooltip.
if (!empty($description))
{
HTMLHelper::_('bootstrap.popover', '.hasPopover');
HTMLHelper::_('bootstrap.popover', '.hasPopover', ['trigger' => 'hover focus']);
$label .= ' title="' . htmlspecialchars(trim($text, ':'), ENT_COMPAT, 'UTF-8') . '"';
$label .= ' data-bs-content="' . htmlspecialchars(
$translateDescription ? Text::_($description) : $description,
Expand Down
2 changes: 1 addition & 1 deletion layouts/plugins/user/terms/label.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
// If a description is specified, use it to build a tooltip.
if (!empty($description))
{
HTMLHelper::_('bootstrap.popover', '.hasPopover');
HTMLHelper::_('bootstrap.popover', '.hasPopover', ['trigger' => 'hover focus']);
$label .= ' title="' . htmlspecialchars(trim($text, ':'), ENT_COMPAT, 'UTF-8') . '"';
$label .= ' data-bs-content="' . htmlspecialchars(
$translateDescription ? Text::_($description) : $description,
Expand Down
3 changes: 2 additions & 1 deletion libraries/src/HTML/Helpers/Bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -318,13 +318,14 @@ public static function popover($selector = '[data-bs-toggle="popover"]', $option
$opt['animation'] = isset($options['animation']) ? (bool) $options['animation'] : true;
$opt['container'] = isset($options['container']) ? $options['container'] : 'body';
$opt['content'] = isset($options['content']) ? $options['content'] : null;
$opt['delay'] = isset($options['delay']) ? (int) $options['delay'] : 0;
$opt['delay'] = isset($options['delay']) ? (int) $options['delay'] : [ 'show' => 50, 'hide' => 200 ];
$opt['html'] = isset($options['html']) ? (bool) $options['html'] : true;
$opt['placement'] = isset($options['placement']) ? $options['placement'] : null;
$opt['selector'] = isset($options['selector']) ? $options['selector'] : false;
$opt['template'] = isset($options['template']) ? $options['template'] : null;
$opt['title'] = isset($options['title']) ? $options['title'] : null;
$opt['trigger'] = isset($options['trigger']) ? $options['trigger'] : 'click';
$opt['offset'] = isset($options['offset']) ? $options['offset'] : [0, 10];
$opt['fallbackPlacement'] = isset($options['fallbackPlacement']) ? $options['fallbackPlacement'] : null;
$opt['boundary'] = isset($options['boundary']) ? $options['boundary'] : 'scrollParent';
$opt['customClass'] = isset($options['customClass']) ? $options['customClass'] : null;
Expand Down
2 changes: 1 addition & 1 deletion libraries/src/HTML/Helpers/Grid.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ abstract class Grid
public static function sort($title, $order, $direction = 'asc', $selected = '', $task = null, $newDirection = 'asc', $tip = '', $form = null)
{
HTMLHelper::_('behavior.core');
HTMLHelper::_('bootstrap.popover', '.hasPopover');
HTMLHelper::_('bootstrap.popover', '.hasPopover', ['trigger' => 'hover focus']);

$direction = strtolower($direction);
$icon = array('arrow-up-3', 'arrow-down-3');
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"@webcomponents/webcomponentsjs": "^2.5.0",
"accessibility": "^3.0.10",
"awesomplete": "1.1.5",
"bootstrap": "^5.0.0-beta1",
"bootstrap": "^5.0.0-beta2",
"choices.js": "^9.0.1",
"chosen-js": "^1.8.7",
"codemirror": "^5.59.2",
Expand Down