Optimisation
This commit is contained in:
parent
3e0525d2fe
commit
8bd34f7b44
@ -1395,12 +1395,15 @@ class core extends common {
|
|||||||
if($output['redirect']) {
|
if($output['redirect']) {
|
||||||
// Redirection Lity
|
// Redirection Lity
|
||||||
if ($output['script'] === 'redirectdatality') {
|
if ($output['script'] === 'redirectdatality') {
|
||||||
$this->addOutput ([
|
$this->addOutput ([
|
||||||
'content' => '<a href="' . $output['redirect'] . '" class="displayNone" data-lity id="redirectdatality">Lien</a>',
|
|
||||||
'script' => '$(document).on("lity:close", function(event, instance) {
|
'script' => '$(document).on("lity:close", function(event, instance) {
|
||||||
location.replace("' . helper::baseURl() . '");
|
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 {
|
} else {
|
||||||
http_response_code(301);
|
http_response_code(301);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user