Lines 190-203
Link Here
|
190 |
$("#noticestable").on("click", ".notice-title", function (e) { |
190 |
$("#noticestable").on("click", ".notice-title", function (e) { |
191 |
e.preventDefault(); |
191 |
e.preventDefault(); |
192 |
var title = $(this).text(); |
192 |
var title = $(this).text(); |
|
|
193 |
$("#noticeModalLabel").text(title); |
194 |
|
193 |
var noticeid = $(this).data("noticeid"); |
195 |
var noticeid = $(this).data("noticeid"); |
194 |
var body = $("#notice" + noticeid).attr("srcdoc"); |
196 |
|
|
|
197 |
// Use shadow DOM for notice content preview |
198 |
var srcdoc = $("#notice" + noticeid).attr("srcdoc"); |
199 |
var shadowHost = document.createElement("div"); |
200 |
var shadowRoot = shadowHost.attachShadow({ mode: "open" }); |
201 |
shadowRoot.innerHTML = srcdoc; |
202 |
|
203 |
$("#noticeModal .modal-body").html(""); |
204 |
$("#noticeModal .modal-body")[0].appendChild(shadowHost); |
205 |
|
195 |
if ($("#resend_notice" + noticeid).length) { |
206 |
if ($("#resend_notice" + noticeid).length) { |
|
|
207 |
$("#resend-notice").data("noticeid", noticeid); |
196 |
$("#resend-notice").show(); |
208 |
$("#resend-notice").show(); |
197 |
} |
209 |
} |
198 |
$("#resend-notice").data("noticeid", noticeid); |
210 |
|
199 |
$("#noticeModalLabel").text(title); |
|
|
200 |
$("#noticeModal .modal-body").html(body); |
201 |
$("#noticeModal").modal("show"); |
211 |
$("#noticeModal").modal("show"); |
202 |
}); |
212 |
}); |
203 |
|
213 |
|
204 |
- |
|
|