first commit

This commit is contained in:
2025-06-17 11:53:18 +02:00
commit 9f0f7ba12b
8804 changed files with 1369176 additions and 0 deletions

View File

@ -0,0 +1,45 @@
<?php
/**
* @package Joomla.Site
* @subpackage Layout
*
* @copyright (C) 2015 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
extract($displayData);
/**
* Layout variables
* -----------------
* @var string $selector Unique DOM identifier for the modal. CSS id without #
* @var array $params Modal parameters. Default supported parameters:
* - title string The modal title
* - backdrop mixed A boolean select if a modal-backdrop element should be included (default = true)
* The string 'static' includes a backdrop which doesn't close the modal on click.
* - keyboard boolean Closes the modal when escape key is pressed (default = true)
* - closeButton boolean Display modal close button (default = true)
* - animation boolean Fade in from the top of the page (default = true)
* - footer string Optional markup for the modal footer
* - url string URL of a resource to be inserted as an <iframe> inside the modal body
* - height string height of the <iframe> containing the remote resource
* - width string width of the <iframe> containing the remote resource
* - bodyHeight int Optional height of the modal body in viewport units (vh)
* - modalWidth int Optional width of the modal in viewport units (vh)
* @var string $body Markup for the modal body. Appended after the <iframe> if the URL option is set
*/
$bodyClass = 'modal-body';
$bodyHeight = isset($params['bodyHeight']) ? round((int) $params['bodyHeight'], -1) : '';
if ($bodyHeight && $bodyHeight >= 20 && $bodyHeight < 90) {
$bodyClass .= ' jviewport-height' . $bodyHeight;
}
?>
<div class="<?php echo $bodyClass; ?>">
<?php echo $body; ?>
</div>

View File

@ -0,0 +1,37 @@
<?php
/**
* @package Joomla.Site
* @subpackage Layout
*
* @copyright (C) 2015 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
extract($displayData);
/**
* Layout variables
* -----------------
* @var string $selector Unique DOM identifier for the modal. CSS id without #
* @var array $params Modal parameters. Default supported parameters:
* - title string The modal title
* - backdrop mixed A boolean select if a modal-backdrop element should be included (default = true)
* The string 'static' includes a backdrop which doesn't close the modal on click.
* - keyboard boolean Closes the modal when escape key is pressed (default = true)
* - closeButton boolean Display modal close button (default = true)
* - animation boolean Fade in from the top of the page (default = true)
* - footer string Optional markup for the modal footer
* - url string URL of a resource to be inserted as an <iframe> inside the modal body
* - height string height of the <iframe> containing the remote resource
* - width string width of the <iframe> containing the remote resource
* - bodyHeight int Optional height of the modal body in viewport units (vh)
* - modalWidth int Optional width of the modal in viewport units (vh)
* @var string $body Markup for the modal body. Appended after the <iframe> if the URL option is set
*/
?>
<div class="modal-footer">
<?php echo $params['footer']; ?>
</div>

View File

@ -0,0 +1,45 @@
<?php
/**
* @package Joomla.Site
* @subpackage Layout
*
* @copyright (C) 2015 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\Language\Text;
extract($displayData);
/**
* Layout variables
* -----------------
* @var string $selector Unique DOM identifier for the modal. CSS id without #
* @var array $params Modal parameters. Default supported parameters:
* - title string The modal title
* - backdrop mixed A boolean select if a modal-backdrop element should be included (default = true)
* The string 'static' includes a backdrop which doesn't close the modal on click.
* - keyboard boolean Closes the modal when escape key is pressed (default = true)
* - closeButton boolean Display modal close button (default = true)
* - animation boolean Fade in from the top of the page (default = true)
* - footer string Optional markup for the modal footer
* - url string URL of a resource to be inserted as an <iframe> inside the modal body
* - height string height of the <iframe> containing the remote resource
* - width string width of the <iframe> containing the remote resource
* - bodyHeight int Optional height of the modal body in viewport units (vh)
* - modalWidth int Optional width of the modal in viewport units (vh)
* @var string $body Markup for the modal body. Appended after the <iframe> if the URL option is set
*/
?>
<div class="modal-header">
<?php if (isset($params['title'])) : ?>
<h3 class="modal-title"><?php echo $params['title']; ?></h3>
<?php endif; ?>
<?php if (!isset($params['closeButton']) || $params['closeButton']) : ?>
<button type="button" class="btn-close novalidate" data-bs-dismiss="modal" aria-label="<?php echo Text::_('JLIB_HTML_BEHAVIOR_CLOSE'); ?>">
</button>
<?php endif; ?>
</div>

View File

@ -0,0 +1,53 @@
<?php
/**
* @package Joomla.Site
* @subpackage Layout
*
* @copyright (C) 2015 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
use Joomla\Utilities\ArrayHelper;
extract($displayData);
/**
* Layout variables
* -----------------
* @var string $selector Unique DOM identifier for the modal. CSS id without #
* @var array $params Modal parameters. Default supported parameters:
* - title string The modal title
* - backdrop mixed A boolean select if a modal-backdrop element should be included (default = true)
* The string 'static' includes a backdrop which doesn't close the modal on click.
* - keyboard boolean Closes the modal when escape key is pressed (default = true)
* - closeButton boolean Display modal close button (default = true)
* - animation boolean Fade in from the top of the page (default = true)
* - footer string Optional markup for the modal footer
* - url string URL of a resource to be inserted as an <iframe> inside the modal body
* - height string height of the <iframe> containing the remote resource
* - width string width of the <iframe> containing the remote resource
* @var string $body Markup for the modal body. Appended after the <iframe> if the URL option is set
*/
$iframeAttributes = [
'class' => 'iframe',
'src' => $params['url']
];
if (isset($params['title'])) {
$iframeAttributes['name'] = addslashes($params['title']);
$iframeAttributes['title'] = addslashes($params['title']);
}
if (isset($params['height'])) {
$iframeAttributes['height'] = $params['height'];
}
if (isset($params['width'])) {
$iframeAttributes['width'] = $params['width'];
}
?>
<iframe <?php echo ArrayHelper::toString($iframeAttributes); ?>></iframe>

View File

@ -0,0 +1,93 @@
<?php
/**
* @package Joomla.Site
* @subpackage Layout
*
* @copyright (C) 2015 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\Utilities\ArrayHelper;
extract($displayData);
/**
* Layout variables
* -----------------
* @var string $selector Unique DOM identifier for the modal. CSS id without #
* @var array $params Modal parameters. Default supported parameters:
* - title string The modal title
* - backdrop mixed A boolean select if a modal-backdrop element should be included (default = true)
* The string 'static' includes a backdrop which doesn't close the modal on click.
* - keyboard boolean Closes the modal when escape key is pressed (default = true)
* - closeButton boolean Display modal close button (default = true)
* - animation boolean Fade in from the top of the page (default = true)
* - url string URL of a resource to be inserted as an <iframe> inside the modal body
* - height string height of the <iframe> containing the remote resource
* - width string width of the <iframe> containing the remote resource
* - bodyHeight int Optional height of the modal body in viewport units (vh)
* - modalWidth int Optional width of the modal in viewport units (vh)
* - footer string Optional markup for the modal footer
* - modalCss string Optional CSS classes of the modal
* @var string $body Markup for the modal body. Appended after the <iframe> if the URL option is set
*/
$modalClasses = ['modal'];
if (!isset($params['animation']) || $params['animation']) {
$modalClasses[] = 'fade';
}
$modalWidth = isset($params['modalWidth']) ? round((int) $params['modalWidth'], -1) : '';
$modalDialogClass = 'modal-lg';
if ($modalWidth && $modalWidth > 0 && $modalWidth <= 100) {
$modalDialogClass .= ' jviewport-width' . $modalWidth;
}
if (!empty($params['modalCss'])) {
$modalDialogClass = $params['modalCss'];
}
$modalAttributes = [
'tabindex' => '-1',
'class' => 'joomla-modal ' . implode(' ', $modalClasses)
];
if (isset($params['backdrop'])) {
$modalAttributes['data-bs-backdrop'] = (is_bool($params['backdrop']) ? ($params['backdrop'] ? 'true' : 'false') : $params['backdrop']);
}
if (isset($params['keyboard'])) {
$modalAttributes['data-bs-keyboard'] = (is_bool($params['keyboard']) ? ($params['keyboard'] ? 'true' : 'false') : 'true');
}
if (isset($params['url'])) {
$url = 'data-url="' . $params['url'] . '"';
$iframeHtml = htmlspecialchars(LayoutHelper::render('libraries.html.bootstrap.modal.iframe', $displayData), ENT_COMPAT, 'UTF-8');
}
?>
<div id="<?php echo $selector; ?>" role="dialog" <?php echo ArrayHelper::toString($modalAttributes); ?> <?php echo $url ?? ''; ?> <?php echo isset($url) ? 'data-iframe="' . trim($iframeHtml) . '"' : ''; ?>>
<div class="modal-dialog <?php echo $modalDialogClass; ?>">
<div class="modal-content">
<?php
// Header
if (!isset($params['closeButton']) || isset($params['title']) || $params['closeButton']) {
echo LayoutHelper::render('libraries.html.bootstrap.modal.header', $displayData);
}
// Body
echo LayoutHelper::render('libraries.html.bootstrap.modal.body', $displayData);
// Footer
if (isset($params['footer'])) {
echo LayoutHelper::render('libraries.html.bootstrap.modal.footer', $displayData);
}
?>
</div>
</div>
</div>