?
avatar fede91it
fede91it
4 Nov 2016

Steps to reproduce the issue

$bar = JToolbar::getInstance('toolbar');
$bar->appendButton('Popup', 'search', \JText::_('JGLOBAL_PREVIEW'), \JRoute::_($previewUrl), 800, 600);

Expected result

The preview popup is 800x600 pixels.

Actual result

The preview width and height aren't respected.

System information (as much as possible)

Joomla 3.6.4

Additional comments

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.

avatar fede91it fede91it - open - 4 Nov 2016
avatar joomla-cms-bot joomla-cms-bot - change - 4 Nov 2016
Labels Added: ?
avatar fede91it fede91it - change - 4 Nov 2016
The description was changed
avatar fede91it fede91it - edited - 4 Nov 2016
avatar C-Lodder
C-Lodder - comment - 5 Nov 2016

@dgt41 - didn't we fix this in J4?

avatar dgt41
dgt41 - comment - 6 Nov 2016

Yup!

avatar fede91it
fede91it - comment - 6 Nov 2016

When Joomla 4 will be released?

avatar zero-24
zero-24 - comment - 6 Nov 2016

I guess this can be backported @dgt41 @c-lodder ?

avatar dgt41
dgt41 - comment - 6 Nov 2016

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

avatar zero-24 zero-24 - change - 6 Nov 2016
Status New Closed
Closed_Date 0000-00-00 00:00:00 2016-11-06 15:34:37
Closed_By zero-24
avatar zero-24 zero-24 - close - 6 Nov 2016
avatar zero-24
zero-24 - comment - 6 Nov 2016

@fede91it please try this one: #12788

Add a Comment

Login with GitHub to post a comment