Optimisation

This commit is contained in:
fredtempez 2019-12-01 16:50:17 +01:00
parent 3e0525d2fe
commit 8bd34f7b44

View File

@ -1396,11 +1396,14 @@ class core extends common {
// Redirection Lity
if ($output['script'] === 'redirectdatality') {
$this->addOutput ([
'content' => '<a href="' . $output['redirect'] . '" class="displayNone" data-lity id="redirectdatality">Lien</a>',
'script' => '$(document).on("lity:close", function(event, instance) {
location.replace("' . helper::baseURl() . '");
});
document.getElementById("redirectdatality").click();'
// Open a URL in a lightbox
var lightbox = lity("'. $output['redirect'] .'");
// Bind as an event handler
$(document).on("click", "[data-lightbox]", lity);'
]);
} else {
http_response_code(301);