File tree Expand file tree Collapse file tree 3 files changed +13
-20
lines changed
Expand file tree Collapse file tree 3 files changed +13
-20
lines changed Original file line number Diff line number Diff line change 1010
1111defined ('_JEXEC ' ) or die;
1212
13- use Joomla \CMS \HTML \HTMLHelper ;
14- use Joomla \CMS \Language \Text ;
13+ use Joomla \CMS \Factory ;
1514use Joomla \CMS \Router \Route ;
1615
1716extract ($ displayData );
5150 * @var array $dataAttributes Miscellaneous data attributes for eg, data-*.
5251 */
5352
54- echo HTMLHelper::_ (
55- 'bootstrap.renderModal ' ,
56- 'versionsModal ' ,
57- [
58- 'url ' => Route::_ ($ link ),
59- 'title ' => $ label ,
60- 'height ' => '100% ' ,
61- 'width ' => '100% ' ,
62- 'modalWidth ' => '80 ' ,
63- 'bodyHeight ' => '60 ' ,
64- 'footer ' => '<button type="button" class="btn btn-secondary" data-bs-dismiss="modal" aria-hidden="true"> '
65- . Text::_ ('JLIB_HTML_BEHAVIOR_CLOSE ' ) . '</button> '
66- ]
67- );
53+ /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
54+ $ wa = Factory::getApplication ()->getDocument ()->getWebAssetManager ();
55+ $ wa ->useScript ('joomla.dialog-autocreate ' );
56+
57+ $ dialogOptions = [
58+ 'popupType ' => 'iframe ' ,
59+ 'src ' => Route::_ ($ link , false ),
60+ 'textHeader ' => $ label ,
61+ ];
6862
6963?>
7064<button
7165 type="button"
7266 class="btn btn-secondary"
73- data-bs-toggle="modal"
74- data-bs-target="#versionsModal"
67+ data-joomla-dialog="<?php echo $ this ->escape (json_encode ($ dialogOptions , JSON_UNESCAPED_SLASHES )); ?> "
7568 <?php echo $ dataAttribute ; ?> >
7669 <span class="icon-code-branch" aria-hidden="true"></span>
7770 <?php echo $ label ; ?>
Original file line number Diff line number Diff line change 5252<joomla-toolbar-button id="toolbar-versions">
5353 <button
5454 class="btn btn-primary"
55- data-joomla-dialog="<?php echo $ this ->escape (json_encode ($ dialogOptions )); ?> "
55+ data-joomla-dialog="<?php echo $ this ->escape (json_encode ($ dialogOptions, JSON_UNESCAPED_SLASHES )); ?> "
5656 type="button">
5757 <span class="icon-code-branch" aria-hidden="true"></span>
5858 <?php echo $ title ; ?>
Original file line number Diff line number Diff line change 8181 <jdoc:include type="styles" />
8282 <jdoc:include type="scripts" />
8383</head>
84- <body class="<?php echo $ this ->direction === 'rtl ' ? 'rtl ' : '' ; ?> ">
84+ <body class="contentpane component <?php echo $ this ->direction === 'rtl ' ? 'rtl ' : '' ; ?> ">
8585 <jdoc:include type="message" />
8686 <jdoc:include type="component" />
8787</body>
You can’t perform that action at this time.
0 commit comments