From 2b34275cef0e9b39949a3e1cc0f664c449a7624e Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Thu, 22 Oct 2020 17:14:55 +0000 Subject: [PATCH] wip #3462 @1 --- inc/ws/Controlleur/class.ws.ajax.php | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/inc/ws/Controlleur/class.ws.ajax.php b/inc/ws/Controlleur/class.ws.ajax.php index 0f4f4e37d..bb9c1477d 100644 --- a/inc/ws/Controlleur/class.ws.ajax.php +++ b/inc/ws/Controlleur/class.ws.ajax.php @@ -956,9 +956,11 @@ class wsAjax extends cubeAjax continue; } - $target = '_blank'; + $target = '_popupiframe'; $inline = false; $video_service = ''; + $image = null; + $infobulle = ''; // Find dimensions ratio $ratio = $book->parametres->width / $item['page_width']; @@ -974,7 +976,6 @@ class wsAjax extends cubeAjax if ($item['asset_type'] === '3') { // link $type = 2; - $target = '_blank'; $to = $item['asset_content']; $to = str_replace('.html ?', '.html?', $to); @@ -982,6 +983,10 @@ class wsAjax extends cubeAjax $f = $webvideo->filter($to); $infobulle = 'Voir le produit'; + if ($item['asset_name'] === 'Carte magique') { + $image = 'btn-cartemagique.gif'; + $infobulle = 'Découvrir ma carte magique'; + } if ($f !== $to || stripos($item['asset_name'], 'video') !== false) { if ($f !== $to) { $e = explode(':', $f); @@ -1005,10 +1010,19 @@ class wsAjax extends cubeAjax $e = explode('#', $item['asset_name']); $to = $e[1]; $infobulle = 'Ajouter à ma liste de cadeaux'; + } else if ($item['asset_type'] === '6') { + $image = ''; + $type = '15'; + $to = 'etoiles.gif'; + $infobulle = ''; + } + + if ($image === null) { + $image = $images[$type]; } $link = array( - 'page' => $page, 'image' => $images[$type], + 'page' => $page, 'image' => $image, 'left' => $item['x'] * $ratio, 'top' => $item['y'] * $ratio, 'width' => $item['width'] * $ratio, 'height' => $item['height'] * $ratio, 'rot' => '', 'type' => $type, 'to' => $to, 'target' => $target, 'video_width' => 1920, 'video_height' => 1080, 'infobulle' => $infobulle, 'numerotation' => 'virtual', 'display_area' => false, 'inline' => $inline, -- 2.39.5