]> _ Git - cubeextranet.git/commitdiff
wip #3679 @1
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Fri, 5 Jun 2020 12:42:33 +0000 (12:42 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Fri, 5 Jun 2020 12:42:33 +0000 (12:42 +0000)
inc/ws/Metier/class.ws.book.parametres.php
inc/ws/Util/html5/master/class.ws.html5.compiler.php
inc/ws/Util/html5/master/class.ws.html5.links.php

index 86ebf9a3d20b7c2d5774a0a44f8b713ac936a8e0..355fe8a0ee17106d9ea19c82a9aff23427cd074c 100644 (file)
@@ -431,6 +431,7 @@ class wsBookParametres extends wsParametres
 
         $this->fields['product_zoom_references'] = array('type' => 'freefile', 'default' => '', 'editable' => true,
             'label' => __('Références produits'), 'grade' => 3, 'fileFilter' => $basketFilter, 'hint' => __('Fichier contenant les références produits'), 'dir' => 'commerce');
+        $this->fields['product_zoom_buttons_order'] = ['type' => 'combo', 'datas' => [__('De la droite vers la gauche') => 'right', __('De la gauche vers la droite') => 'left'], 'editable' => true, 'grade' => 3, 'default' => 'right', 'label' => __('Order des boutons')];
         $icons = [__('Aucune') => 'none', __('Partage') => 'nav-share', __('Ecran') => 'icon-site', __('Télécharger') => 'nav-download', 'PDF' => 'icon-pdf', 'Video' => 'icon-video', __('Lien') => 'icon-link', __('Code') => 'icon-code', __('QR code') => 'icon-qr'];
         $actions = [__('Ouvrir un lien') => 'link', __('Copier un contenu') => 'copy', __('Vidéo') => 'video'];
         $f = [];
@@ -450,7 +451,7 @@ class wsBookParametres extends wsParametres
         $this->fields['product_email_title'] = array('type' => 'text', 'default' => '', 'editable' => true, 'label' => __("Titre de l'email") . ' "' . __('Envoyer à un ami') . '"');
         $this->fields['product_email_body'] = array('type' => 'textarea', 'default' => '', 'editable' => true, 'label' => __("Corps de l'email") . ' "' . __('Envoyer à un ami') . '"');
         $this->fields['product_tweet'] = array('type' => 'textarea', 'default' => '%short%', 'editable' => true, 'label' => __("Contenu Partage court"), 'hint' => __('Contenu du partagé sur les partages courts'));
-        $this->forms['product_zoom'] = ['label' => __('Zooms produits'), 'fieldsnames' => array_merge(["product_zoom_references"], $f, ['|','product_share_enabled', 'product_share_link', 'product_email_title', 'product_email_body', 'product_tweet'])];
+        $this->forms['product_zoom'] = ['label' => __('Zooms produits'), 'fieldsnames' => array_merge(["product_zoom_references", '|', 'product_zoom_buttons_order'], $f, ['|', 'product_share_enabled', 'product_share_link', 'product_email_title', 'product_email_body', 'product_tweet'])];
 
         $this->fields['audiodescriptionTexts'] = ['type' => 'freefile', 'default' => '', 'editable' => true, 'label' => __('Contenus textuels pour l\'audiodescription'), 'fileFilter' => $seoFilter];
         $this->fields['audiodescriptionVoice'] = ['type' => 'combo', 'datas' => wsDroits::getTTSVoices(), 'editable' => true, 'default' => true, 'label' => __('Voix pour l\'audiodescription')];
index 7dabb7c02538572395aee1c814b1275c5b509f52..a6e8e9aa945063c35aaee95829944dbdb88b9b5b 100644 (file)
@@ -50,6 +50,7 @@ class wsHTML5Compiler
                 'js/libs/gsap/plugins/RaphaelPlugin.min.js'],
         'countup' =>
             ['js/libs/countup/countup.min.js'],
+        'clipboard' => ['js/libs/clipboard.min.js'],
         'fluidbook' =>
             ['js/libs/fluidbook/fluidbook.utils.js',
                 'js/libs/fluidbook/fluidbook.networkcontrol.js',
index 817e8077924c67097beb083b2d94672e65aa580d..66044c46463195da50118d51eca0b959950bc13f 100644 (file)
@@ -1829,7 +1829,7 @@ class zoomLink extends normalLink
 
         // Set data attributes
         foreach ($attributes as $key => $val) {
-            $res .= ' data-' . $key . '="' . $val . '"';
+            $res .= ' data-' . $key . '="' . htmlspecialchars($val, ENT_QUOTES) . '"';
         }
 
         $this->generateImage();
@@ -1946,11 +1946,10 @@ class zoomProductLink extends zoomLink
         );
         if ($url) {
             $res['shareurl'] = $url[0];
-            $res['producturl'] = $url[0];
             $n = count($url);
-            for ($i = 1; $i < $n; $i++) {
+            for ($i = 0; $i < $n; $i++) {
                 if (isset($url[$i]) && $url[$i]) {
-                    $res['extra-' . $i] = $url[$i];
+                    $res['d-' . $i] = $url[$i];
                 }
             }
         }