]> _ Git - cubeextranet.git/commitdiff
wip #3462 @1
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Thu, 22 Oct 2020 17:14:55 +0000 (17:14 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Thu, 22 Oct 2020 17:14:55 +0000 (17:14 +0000)
inc/ws/Controlleur/class.ws.ajax.php

index 0f4f4e37d2ad327fc31c3a1e38256616d8d12b6c..bb9c1477d5aa86abfb5123c9be984099ce99cc2f 100644 (file)
@@ -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,