diff --git a/src/UI/Implementation/Component/Popover/Renderer.php b/src/UI/Implementation/Component/Popover/Renderer.php index 71337ff7ee2d..0834082ae76e 100755 --- a/src/UI/Implementation/Component/Popover/Renderer.php +++ b/src/UI/Implementation/Component/Popover/Renderer.php @@ -18,11 +18,11 @@ class Renderer extends AbstractComponentRenderer { /** * @inheritdoc */ - public function render(Component\Component $component, RendererInterface $default_renderer) { - $this->checkComponent($component); + public function render(Component\Component $popover, RendererInterface $default_renderer) { + $this->checkComponent($popover); $tpl = $this->getTemplate('tpl.popover.html', true, true); $tpl->setVariable('FORCE_RENDERING', ''); - /** @var Component\Popover\Popover $component */ + /** @var Component\Popover\Popover $popover */ $replacement = array( '"'=> '\"', @@ -32,22 +32,22 @@ public function render(Component\Component $component, RendererInterface $defaul ); $options = array( - 'title' => $this->escape($component->getTitle()), - 'placement' => $component->getPosition(), + 'title' => $this->escape($popover->getTitle()), + 'placement' => $popover->getPosition(), 'multi' => true, 'template' => str_replace(array_keys($replacement), array_values($replacement), $tpl->get()), ); - $is_async = $component->getAsyncContentUrl(); + $is_async = $popover->getAsyncContentUrl(); if ($is_async) { $options['type'] = 'async'; - $options['url'] = $component->getAsyncContentUrl(); + $options['url'] = $popover->getAsyncContentUrl(); } - $show = $component->getShowSignal(); - $replace = $component->getReplaceContentSignal(); + $show = $popover->getShowSignal(); + $replace = $popover->getReplaceContentSignal(); - $component = $component->withAdditionalOnLoadCode(function($id) use ($options, $show, $replace, $is_async) { + $popover = $popover->withAdditionalOnLoadCode(function($id) use ($options, $show, $replace, $is_async) { if (!$is_async) { $options["url"] = "#{$id}"; } @@ -62,17 +62,17 @@ public function render(Component\Component $component, RendererInterface $defaul });"; }); - $id = $this->bindJavaScript($component); + $id = $this->bindJavaScript($popover); - if ($component->getAsyncContentUrl()) { + if ($popover->getAsyncContentUrl()) { return ''; } - if ($component instanceof Component\Popover\Standard) { - return $this->renderStandardPopover($component, $default_renderer, $id); + if ($popover instanceof Component\Popover\Standard) { + return $this->renderStandardPopover($popover, $default_renderer, $id); } else { - if ($component instanceof Component\Popover\Listing) { - return $this->renderListingPopover($component, $default_renderer, $id); + if ($popover instanceof Component\Popover\Listing) { + return $this->renderListingPopover($popover, $default_renderer, $id); } } diff --git a/src/UI/templates/default/Popover/popover.less b/src/UI/templates/default/Popover/popover.less index 7e963657194f..3acd288fa49c 100644 --- a/src/UI/templates/default/Popover/popover.less +++ b/src/UI/templates/default/Popover/popover.less @@ -8,7 +8,7 @@ @popover-arrow-width: @il-popover-arrow-width; @popover-arrow-color: @il-popover-arrow-background-color; @popover-z-index: @il-popover-z-index; - +@popover-max-height: @il-popover-max-height; @popover-border-radius-base: 0px; @popover-border-radius-large: 0px; @popover-border-radius-small: 0px; @@ -18,6 +18,10 @@ .webui-popover-content > div:first-child { width: 100%; } + .il-popover-inner { + max-height: @popover-max-height; + overflow: scroll; + } i.icon-refresh { background: url("@{uibase}/../../libs/node_modules/webui-popover/img/loading.gif") no-repeat; height: 30px; @@ -35,5 +39,7 @@ } } - + &.webui-popover-fixed { + position: fixed; + } } \ No newline at end of file