From 0557a148f6302a855f29daf54a3b3e4228c117f1 Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Fri, 5 Jun 2020 12:42:33 +0000 Subject: [PATCH] wip #3679 @1 --- inc/ws/Metier/class.ws.book.parametres.php | 3 ++- inc/ws/Util/html5/master/class.ws.html5.compiler.php | 1 + inc/ws/Util/html5/master/class.ws.html5.links.php | 7 +++---- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/inc/ws/Metier/class.ws.book.parametres.php b/inc/ws/Metier/class.ws.book.parametres.php index 86ebf9a3d..355fe8a0e 100644 --- a/inc/ws/Metier/class.ws.book.parametres.php +++ b/inc/ws/Metier/class.ws.book.parametres.php @@ -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')]; diff --git a/inc/ws/Util/html5/master/class.ws.html5.compiler.php b/inc/ws/Util/html5/master/class.ws.html5.compiler.php index 7dabb7c02..a6e8e9aa9 100644 --- a/inc/ws/Util/html5/master/class.ws.html5.compiler.php +++ b/inc/ws/Util/html5/master/class.ws.html5.compiler.php @@ -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', diff --git a/inc/ws/Util/html5/master/class.ws.html5.links.php b/inc/ws/Util/html5/master/class.ws.html5.links.php index 817e80779..66044c464 100644 --- a/inc/ws/Util/html5/master/class.ws.html5.links.php +++ b/inc/ws/Util/html5/master/class.ws.html5.links.php @@ -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]; } } } -- 2.39.5