$filtres[] = new commonFiltre(__('Administrateur'), 'admin_book', $settings['filtres']);
$filtres[] = new commonFiltre(__('Revendeur'), 'revendeur_book', $settings['filtres']);
}
- $res = '<script src="https://unpkg.com/@popperjs/core@2"></script>
-<script src="https://unpkg.com/tippy.js@6"></script>';
+ $res = '<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/2.11.6/umd/popper.min.js" integrity="sha512-6UofPqm0QupIL0kzS/UIzekR73/luZdC6i/kXDbWnLOJoqwklBK6519iUnShaYceJ0y4FaiPtX/hRnV/X/xlUQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/tippy.js/6.3.7/tippy-bundle.umd.min.js" integrity="sha512-gbruucq/Opx9jlHfqqZeAg2LNK3Y4BbpXHKDhRC88/tARL/izPOE4Zt2w6X9Sn1UeWaGbL38zW7nkL2jdn5JIw==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>';
$res .= commonPage::barre($filtres, 'filtreBooks', 'books', $shortcuts, wsDroits::creation());
$res .= commonPage::tMain(null, wsDroits::creation());
$res .= commonPage::bh();
parent::initFields();
$this->fields=[
+ 'title' => [
+ 'type' => 'text',
+ 'default' => '',
+ 'editable' => true,
+ 'label' => __('Titre de la publication'),
+ 'embed' => false,
+ ],
'mobileLVersion' => [
'type' => 'combo',
'default' => 'stable',
'label' => __('Version mobile'),
'grade' => 3,
'datas' => [
- __('Rediriger vers le PDF') => 'pdf',
__('Version HTML5 recommandée (vecteurs sur desktop)') => 'html5-desktop',
__('Version HTML5 vecteurs') => 'html5',
__('Version HTML5 en images') => 'html5-images',
],
],
- 'title' => [
- 'type' => 'text',
- 'default' => '',
- 'editable' => true,
- 'label' => __('Titre de la publication'),
- 'embed' => false,
- ],
'url_link' => [
'type' => 'text',
'default' => 'http://',
'type' => 'integer',
'default' => 0,
'editable' => true,
- 'label' => __('Marge supplémentaire horizontale'),
+ 'label' => __('Marge supplémentaire horizontale (Mobile)'),
'grade' => 3,
],
'extraYSpace' => [
'editable' => true,
'label' => __('Cacher le menu lors du zoom'),
],
+ 'zoomAreaDefaultZoomLevel' => [
+ 'type' => 'float',
+ 'default' => 2,
+ 'editable' => true,
+ 'label' => 'Niveau de zoom des zones de zoom',
+ ],
+ 'zoomAreaShowTexts' => [
+ 'type' => 'boolean',
+ 'default' => true,
+ 'editable' => true,
+ 'label' => 'Inclure la couche de texte dans les zones de zoom',
+ ],
'sliderImage' => [
'type' => 'freefile',
'default' => '',
'Remarkable' => 'Remarkable',
'Mopec' => 'Mopec',
'Puma' => 'Puma',
+ 'Puma South Europe' => 'Puma-SE',
'MIF' => 'MIF',
'Flexipan' => 'Flexipan',
'Zoom + lien produit (déprécié, utiliser la fonctionnalité "Zoom produits")' => 'ZoomProductLink',
'important' => [
'label' => __('Description de la publication'),
'fieldsnames' => [
- 0 => 'mobileLVersion',
- 1 => 'mobileVersion',
- 2 => 'title',
+ 0 => 'title',
+ 1 => 'mobileLVersion',
+ 2 => 'mobileVersion',
3 => 'url_link',
4 => 'signature',
],
3 => 'zoomw',
4 => 'zoomMouseMoveMode',
5 => 'hideHeaderOnZoom',
+ 6 => 'zoomAreaDefaultZoomLevel',
+ 7 => 'zoomAreaShowTexts',
],
],
'slider' => [
wsLinks::getLinksAndRulersFromFile($this->book_id, $links, $rulers);
}
-
- public function writePumaCart()
+ public function writePumaSECart()
{
- $this->lessVariables['import-cart-styles'] = 'puma';
+ $this->lessVariables['import-cart-styles'] = 'puma-se';
+ $this->addJsLib('puma-se', 'js/libs/fluidbook/cart/fluidbook.cart.puma-se.js');
+ $this->_commonPuma();
+ }
+
+ protected function _commonPuma(){
$this->addJsLib('parsley', 'js/libs/parsley.min.js');
$this->addJsLib('cookie', 'js/libs/jquery/jquery.cookie.js');
- $this->addJsLib('puma', 'js/libs/fluidbook/cart/fluidbook.cart.puma.js');
+
$this->addJsLib('html2pdf', 'js/libs/html2pdf/html2pdf.min.js');
$this->addJsLib('exceljs', 'js/libs/exceljs.min.js');
$this->addVideoJs();
}
}
+ public function writePumaCart()
+ {
+ $this->lessVariables['import-cart-styles'] = 'puma';
+ $this->addJsLib('puma', 'js/libs/fluidbook/cart/fluidbook.cart.puma.js');
+
+ $this->_commonPuma();
+ }
+
public function writeThirietCart()
{
return $this->writeFlexipanCart();
case 'Puma':
return $this->writePumaCart();
+ case 'Puma-SE':
+ return $this->writePumaSECart();
case 'MIF':
return $this->writeMIFCart();
case 'GrandVision':
}
case 7:
- if ($compiler->book->parametres->basketManager === 'Puma') {
+ if ($compiler->book->parametres->basketManager === 'Puma' || $compiler->book->parametres->basketManager === 'Puma-SE') {
return new pumaCartLink($id, $init, $compiler);
}
if ($compiler->book->parametres->basketManager === 'MIF') {
case 'ZoomProductLink':
case 'Flexipan':
case 'Puma':
+ case 'Puma-SE':
case 'MIF':
return new zoomProductLink($id, $init, $compiler);
default :
case 'page':
default:
$extras = self::parseExtras($init['extra']);
- $delay=$extras['delay']??0;
- $compiler->addTriggersLink($init['page'], $init['to'],$delay);
+ $delay = $extras['delay'] ?? 0;
+ $compiler->addTriggersLink($init['page'], $init['to'], $delay);
break;
}
break;
'height' => round($this->height),
'x' => round($this->left),
'y' => round($this->top),
+ 'texts' => $this->compiler->config->zoomAreaShowTexts,
];
}
}
public function init()
{
$this->compiler->addJsLib('fluidbook-zoom', 'js/libs/fluidbook/links/fluidbook.links.zoom.js');
+ $this->maxzoom_default = $this->compiler->config->zoomAreaDefaultZoomLevel ?: 2;
parent::init();
}
'y' => round($this->top),
'border' => $this->border,
'borderColor' => $this->borderColor,
+ 'texts' => $this->compiler->config->zoomAreaShowTexts,
];
}
{
$maxzoom = $attributes['maxzoom']; // Max zoom level might not always be set in the link editor
- $maxzoom = max(1, min($maxzoom, 4.166666667));
+ $maxzoom = max(1, min($maxzoom, 20));
if (!$maxzoom) {
$maxzoom = 2;
}
// The Poppler::extractArea function accepts a resolution setting and uses that to determine the
// scale factor on the extracted images. It does so by dividing by 72, so we can pass our own scale
// factor by setting the resolution to 72 * $maxzoom
- 'resolution' => round(150 * $maxzoom)
+ 'resolution' => round(150 * $maxzoom),
+ 'texts'=> $attributes['texts'] ?? true
];
// Round all link co-ordinates because there seems to be a problem with the the Workshop link editor
class zoomProductLink extends zoomLink
{
- protected $maxzoom_default = 2.5;
-
public function __construct($id, $init, &$compiler)
{
$init['group'] = $init['to'];