View | Details | Raw Unified | Return to bug 41053
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/notices.tt (-8 / +2 lines)
Lines 16-26 Link Here
16
    [% END %]</title
16
    [% END %]</title
17
>
17
>
18
[% INCLUDE 'doc-head-close.inc' %]
18
[% INCLUDE 'doc-head-close.inc' %]
19
<style>
20
    .notice {
21
        display: none;
22
    }
23
</style>
24
</head>
19
</head>
25
20
26
<body id="pat_notices" class="pat">
21
<body id="pat_notices" class="pat">
Lines 70-76 Link Here
70
                                    href="/cgi-bin/koha/members/notices.pl?borrowernumber=[% borrowernumber | uri %]&amp;noticeid=[% QUEUED_MESSAGE.message_id | uri %]"
65
                                    href="/cgi-bin/koha/members/notices.pl?borrowernumber=[% borrowernumber | uri %]&amp;noticeid=[% QUEUED_MESSAGE.message_id | uri %]"
71
                                    >[% QUEUED_MESSAGE.subject | html %]</a
66
                                    >[% QUEUED_MESSAGE.subject | html %]</a
72
                                >
67
                                >
73
                                <iframe class="notice" id="notice[% QUEUED_MESSAGE.message_id | html %]" srcdoc="[% QUEUED_MESSAGE.html_content | html %]"></iframe>
68
                                <div style="display:none;" class="notice" id="notice[% QUEUED_MESSAGE.message_id | html %]">[% QUEUED_MESSAGE.html_content | html %]</div>
74
                            </td>
69
                            </td>
75
                            <td>
70
                            <td>
76
                                [% IF ( QUEUED_MESSAGE.message_transport_type == 'email' ) %]
71
                                [% IF ( QUEUED_MESSAGE.message_transport_type == 'email' ) %]
Lines 195-201 Link Here
195
                var noticeid = $(this).data("noticeid");
190
                var noticeid = $(this).data("noticeid");
196
191
197
                // Use shadow DOM for notice content preview
192
                // Use shadow DOM for notice content preview
198
                var srcdoc = $("#notice" + noticeid).attr("srcdoc");
193
                var srcdoc = $("#notice" + noticeid).text();
199
                var shadowHost = document.createElement("div");
194
                var shadowHost = document.createElement("div");
200
                var shadowRoot = shadowHost.attachShadow({ mode: "open" });
195
                var shadowRoot = shadowHost.attachShadow({ mode: "open" });
201
                shadowRoot.innerHTML = srcdoc;
196
                shadowRoot.innerHTML = srcdoc;
202
- 

Return to bug 41053