first commit
This commit is contained in:
45
layouts/libraries/html/bootstrap/modal/body.php
Normal file
45
layouts/libraries/html/bootstrap/modal/body.php
Normal 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>
|
||||
37
layouts/libraries/html/bootstrap/modal/footer.php
Normal file
37
layouts/libraries/html/bootstrap/modal/footer.php
Normal 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>
|
||||
45
layouts/libraries/html/bootstrap/modal/header.php
Normal file
45
layouts/libraries/html/bootstrap/modal/header.php
Normal 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>
|
||||
53
layouts/libraries/html/bootstrap/modal/iframe.php
Normal file
53
layouts/libraries/html/bootstrap/modal/iframe.php
Normal 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>
|
||||
93
layouts/libraries/html/bootstrap/modal/main.php
Normal file
93
layouts/libraries/html/bootstrap/modal/main.php
Normal 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>
|
||||
21
layouts/libraries/html/bootstrap/tab/addtab.php
Normal file
21
layouts/libraries/html/bootstrap/tab/addtab.php
Normal file
@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage Layout
|
||||
*
|
||||
* @copyright (C) 2013 Open Source Matters, Inc. <https://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
$id = empty($displayData['id']) ? '' : $displayData['id'];
|
||||
$active = empty($displayData['active']) ? '' : $displayData['active'];
|
||||
$title = empty($displayData['title']) ? '' : $displayData['title'];
|
||||
?>
|
||||
<div id="<?php echo preg_replace('/^[\.#]/', '', $id); ?>"
|
||||
class="tab-pane<?php echo $active; ?>"
|
||||
data-active="<?php echo trim(htmlspecialchars($active, ENT_COMPAT, 'UTF-8')); ?>"
|
||||
data-id="<?php echo htmlspecialchars($id, ENT_COMPAT, 'UTF-8'); ?>"
|
||||
data-title="<?php echo htmlspecialchars($title, ENT_COMPAT, 'UTF-8'); ?>">
|
||||
15
layouts/libraries/html/bootstrap/tab/endtab.php
Normal file
15
layouts/libraries/html/bootstrap/tab/endtab.php
Normal file
@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage Layout
|
||||
*
|
||||
* @copyright (C) 2013 Open Source Matters, Inc. <https://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
?>
|
||||
|
||||
</div>
|
||||
15
layouts/libraries/html/bootstrap/tab/endtabset.php
Normal file
15
layouts/libraries/html/bootstrap/tab/endtabset.php
Normal file
@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage Layout
|
||||
*
|
||||
* @copyright (C) 2013 Open Source Matters, Inc. <https://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
?>
|
||||
|
||||
</div>
|
||||
17
layouts/libraries/html/bootstrap/tab/starttabset.php
Normal file
17
layouts/libraries/html/bootstrap/tab/starttabset.php
Normal file
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage Layout
|
||||
*
|
||||
* @copyright (C) 2013 Open Source Matters, Inc. <https://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
$selector = empty($displayData['selector']) ? '' : $displayData['selector'];
|
||||
?>
|
||||
|
||||
<ul class="joomla-tabs nav nav-tabs" id="<?php echo preg_replace('/^[\.#]/', '', $selector); ?>Tabs" role="tablist"></ul>
|
||||
<div class="tab-content" id="<?php echo $selector; ?>Content">
|
||||
Reference in New Issue
Block a user