Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions asset/js/custom_elements/carousel_tile_element.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,10 @@ class IpbCarouselTileElement extends IpbTileElement {

// update modal content
let itemElement = $(`.item[data-item-number="${this.iModalCurrentMessage}"]`, this.$Carousel);
let sTitleIcon = `<div class="ipb-tile--decoration ${itemElement.data('item-icon')}"><span class="ipb-tile--decoration--icon icon ${itemElement.data('item-icon-class')}"></span></div>`;
$('.modal-body', this.$Modal).html(itemElement.html());
$('.modal-title', this.$Modal).html(sTitleIcon + itemElement.data('item-title'));
$('.modal-title-decoration', this.$Modal)[0].className = `modal-title-decoration ipb-tile--decoration ${itemElement.data('item-icon')}`;
$('.modal-title-decoration-icon', this.$Modal)[0].className = `modal-title-decoration-icon ipb-tile--decoration--icon icon ${itemElement.data('item-icon-class')}`;
$('.modal-title-text', this.$Modal).text(itemElement.data('item-title'));
$('[data-role="carousel-modal--message-count"]', this.$Modal).html(itemElement.data('item-number') + ' / ' + this.iMessagesCount);

// update navigation buttons
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/CommunicationBrickController.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public function RenderTileAction(Request $oRequest, $sBrickId)
// set title and icon for the tile with the first message
if ($iCount > 0)
{
$oBrick->SetTitleHome($aData['messages'][0]->GetAsHTML('title'));
$oBrick->SetTitleHome($aData['messages'][0]->Get('title'));
$oBrick->SetDecorationClassHome($aData['messages'][0]->GetFontAwesomeIcon());
}

Expand Down
11 changes: 7 additions & 4 deletions view/tile_v3.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
<div class="carousel-inner" role="listbox">
{% for message in messages %}
<div class="ipb-tile-communication--item item{% if loop.index0 == 0 %} active{% endif %}"
data-item-title="{{ message.Get('title') }}"
data-item-icon="{{ message.Get('icon') }}"
data-item-icon-class="{{ message.GetFontAwesomeIcon() }}"
data-item-title="{{ message.Get('title')|e('html_attr') }}"
data-item-icon="{{ message.Get('icon')|e('html_attr') }}"
data-item-icon-class="{{ message.GetFontAwesomeIcon()|e('html_attr') }}"
data-item-number="{{ loop.index0 + 1 }}"
>
{{ message.GetAsHTML('message') | raw }}
Expand Down Expand Up @@ -66,7 +66,10 @@
<div class="modal-content">
<div class="modal-header">
<div class="modal-header-container">
<h4 class="modal-title"></h4>
<h4 class="modal-title">
<div class="modal-title-decoration"><span class="modal-title-decoration-icon"></span></div>
<span class="modal-title-text"></span>
</h4>
<div class="modal-actions">
<button class="btn btn-default alternative ipb-button--prev">
<span class="fas fa-chevron-left"></span>
Expand Down