$bar = JToolbar::getInstance('toolbar');
$bar->appendButton('Popup', 'search', \JText::_('JGLOBAL_PREVIEW'), \JRoute::_($previewUrl), 800, 600);
The preview popup is 800x600 pixels.
The preview width and height aren't respected.
Joomla 3.6.4
I see that ISIS template.css set
.modal-body {
max-height: 400px;
}
that overrides my declared height, and respectively
.modal-body iframe {
width: 100%;
}
that overrides my declared width.
Labels |
Added:
?
|
Yup!
When Joomla 4 will be released?
administrator/includes/toolbar.php:
public static function preview($url = '', $updateEditors = false, $icon = 'preview', $widh = 800, $height = 600, $bodyHeight = null, $modalWidth = null)
{
$bar = JToolbar::getInstance('toolbar');
// Add a preview button.
$bar->appendButton('Popup', $icon, 'Preview', $url . '&task=preview', $width, $height, $bodyHeight, $modalWidth);
}
And libraries/cms/toolbar/button/popup.php
// Build the options array for the modal
$params = array();
$params['title'] = $options['title'];
$params['url'] = $options['doTask'];
$params['height'] = $iframeHeight;
$params['width'] = $iframeWidth;
$params['bodyHeight'] = $bodyHeight;
$params['modalWidth'] = $modalWidth;
if (isset($footer))
{
$params['footer'] = $footer;
}
$html[] = JHtml::_('bootstrap.renderModal', 'modal-' . $name, $params);
is all that needs to be changed
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-11-06 15:34:37 |
Closed_By | ⇒ | zero-24 |
@dgt41 - didn't we fix this in J4?