Skip to content

Commit

Permalink
Issue #2575: Structural changes to displayvalue html.
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanhaerter committed Oct 24, 2023
1 parent 6d8264d commit 5c30f3a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@
# execute IFrame JS asynchronously. Otherwise it could happen before our API was loaded
# Use the HTML5 sandbox attribute to prevent plugins and scripts from being executed in the browser.
# Set 'allow-popups' to allow IE10+ to open links. ref: http://www.w3.org/html/wg/wiki/ChangeProposals/sandbox_allow_popups
<iframe sandbox="allow-same-origin allow-popups allow-popups-to-escape-sandbox" class="OverlayDynamicFieldRichTextiFrame" width="100%" frameborder="0" id="Iframe[% Data.FieldName | html %]" srcdoc='[% Data.Value %]'></iframe>
<iframe sandbox="allow-same-origin allow-popups allow-popups-to-escape-sandbox" class="OverlayDynamicFieldRichTextiFrame" frameborder="0" id="Iframe[% Data.FieldName | html %]" srcdoc='[% Data.Value %]'></iframe>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@
# execute IFrame JS asynchronously. Otherwise it could happen before our API was loaded
# Use the HTML5 sandbox attribute to prevent plugins and scripts from being executed in the browser.
# Set 'allow-popups' to allow IE10+ to open links. ref: http://www.w3.org/html/wg/wiki/ChangeProposals/sandbox_allow_popups
<iframe sandbox="allow-same-origin allow-popups allow-popups-to-escape-sandbox" class="OverlayDynamicFieldRichTextiFrame" width="100%" frameborder="0" id="Iframe[% Data.FieldName | html %]" srcdoc='[% Data.Value %]'></iframe>
<iframe sandbox="allow-same-origin allow-popups allow-popups-to-escape-sandbox" class="Customer OverlayDynamicFieldRichTextiFrame" frameborder="0" id="Iframe[% Data.FieldName | html %]" srcdoc='[% Data.Value %]'></iframe>
</div>
6 changes: 6 additions & 0 deletions Kernel/System/DynamicField/Driver/RichText.pm
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,12 @@ sub DisplayValueRender {
:
'DynamicField/Agent/RichTextDisplayValue';

$Value = $Param{CustomerInterface}
?
'<div class="Content">' . $Value . '</div>'
:
$Value;

my $JSCode = <<"EOF";
\$('a#ShowDynamicFieldRichText_$FieldName').off('click').on('click', function(Event) {
Event.preventDefault();
Expand Down

0 comments on commit 5c30f3a

Please sign in to comment.