Joomla CMS  3.10.11 (avec JPlatform 13.1 inclus)
Documentation des API du CMS Joomla en version 3.10.11 et du framework Joomla Platform intégré
Référence du fichier main.php

Espaces de nommage

 Joomla\Site
 

Variables

 $modalClasses = array('modal', 'hide')
 
if(!isset($params['animation'])|| $params['animation']) $modalWidth = isset($params['modalWidth']) ? round((int) $params['modalWidth'], -1) : ''
 
if($modalWidth && $modalWidth > 0 && $modalWidth<=100) $modalAttributes
 
if(isset($params['backdrop'])) if(isset($params['keyboard'])) $script [] = "jQuery(document).ready(function($) {"
 
if(isset($params['url'])) else
 
 if (!isset( $params[ 'closeButton'])||isset( $params[ 'title'])||$params[ 'closeButton'])
 

Documentation des variables

◆ $modalAttributes

if ( $modalWidth &&$modalWidth > 0 &&$modalWidth<=100) $modalAttributes
Valeur initiale :
= array(
'tabindex' => '-1',
'class' => implode(' ', $modalClasses)
)
$modalClasses
Definition: main.php:40

◆ $modalClasses

$modalClasses = array('modal', 'hide')

Layout variables

Paramètres
string$selectorUnique DOM identifier for the modal. CSS id without #
array$paramsModal 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
string$bodyMarkup for the modal body. Appended after the <iframe> if the URL option is set

◆ $modalWidth

if (!isset( $params[ 'animation'])||$params[ 'animation']) $modalWidth = isset($params['modalWidth']) ? round((int) $params['modalWidth'], -1) : ''

◆ $script

$script[] = "jQuery(document).ready(function($) {"

These lines below are for disabling scrolling of parent window. $('body').addClass('modal-open'); $('body').removeClass('modal-open')

Scrolling inside bootstrap modals on small screens (adapt to window viewport and avoid modal off screen).

  • max-height .modal-body Max-height for the modal body When height of the modal is too high for the window viewport height.
  • max-height .iframe Max-height for the iframe (Deducting the padding of the modal-body) When URL option is set and height of the iframe is higher than max-height of the modal body.

Fix iOS scrolling inside bootstrap modals

  • overflow-y .modal-body When max-height is set for modal-body

Specific hack for Bootstrap 2.3.x

◆ else

if (isset( $params[ 'url'])) else
Valeur initiale :
{
$script[] = " $('.modalTooltip').each(function(){;"
if(isset($params['backdrop'])) if(isset($params['keyboard'])) $script[]
Definition: main.php:85

◆ if

if(!isset($params['closeButton'])||isset($params['title'])|| $params['closeButton'])