From d18740065b636e118b274cc5a41e35fb73257bad Mon Sep 17 00:00:00 2001 From: Tuan Pham Ngoc Date: Sun, 15 Aug 2021 18:49:38 +0700 Subject: [PATCH] Remove behavior.modal with bootstrap modal --- .../com_weblinks/tmpl/category/default_items.php | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/components/com_weblinks/tmpl/category/default_items.php b/src/components/com_weblinks/tmpl/category/default_items.php index 8d7c78d..004b7f4 100644 --- a/src/components/com_weblinks/tmpl/category/default_items.php +++ b/src/components/com_weblinks/tmpl/category/default_items.php @@ -124,11 +124,18 @@ $listDirn = $this->escape($this->state->get('list.direction')); break; case 3: // Open in a modal window - HTMLHelper::_('behavior.modal', 'a.modal'); - echo '' . - $this->escape($item->title) . ' '; + $modalId = 'weblink-item-modal-' . $item->id; + $modalParams['title'] = $this->escape($item->title); + $modalParams['url'] = $link; + $modalParams['height'] = '100%'; + $modalParams['width'] = '100%'; + $modalParams['bodyHeight'] = 70; + $modalParams['modalWidth'] = 80; + echo HTMLHelper::_('bootstrap.renderModal', $modalId, $modalParams); + echo ''; break; - default: // Open in parent window echo '' .