From: vincent@cubedesigners.com Date: Thu, 17 Mar 2022 08:57:36 +0000 (+0000) Subject: wip #5162 @2 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=2f027ffaf31e42c274e65b53e0a78ce38933bd50;p=cubeextranet.git wip #5162 @2 --- diff --git a/inc/ws/Controlleur/class.ws.flash.php b/inc/ws/Controlleur/class.ws.flash.php index 01c6ee41a..72ec397a2 100644 --- a/inc/ws/Controlleur/class.ws.flash.php +++ b/inc/ws/Controlleur/class.ws.flash.php @@ -290,14 +290,14 @@ class wsFlash extends cubeFlashGateway break; case 'svg': // Optimize & rasterize SVG -// $orig = str_replace('.svg', '.o.svg', $dest); -// rename($dest, $orig); -// $png = str_replace('.svg', '.png', $dest); -// `/usr/local/bin/svgcleaner $orig $dest`; -// if (!file_exists($dest)) { -// copy($orig, $dest); -// } -// `convert -background none $dest $png`; + $orig = str_replace('.svg', '.o.svg', $dest); + rename($dest, $orig); + $png = str_replace('.svg', '.png', $dest); + `/usr/local/bin/svgcleaner $orig $dest`; + if (!file_exists($dest)) { + copy($orig, $dest); + } + `convert -background none $dest $png`; break; default: break; @@ -672,7 +672,7 @@ class wsFlash extends cubeFlashGateway $daoTheme = new wsDAOTheme($this->con); $theme = $daoTheme->getThemeOfBook($this->args['book_id'], true); - $specials = array('backgroundImage' => 'background', 'afterSearch' => 'aftersearch', 'externalArchives' => 'archives'); + $specials = array('backgroundImage' => 'background', 'afterSearch' => 'aftersearch', 'externalArchives' => 'archives', 'sliderImage' => 'slider'); foreach ($specials as $tparam => $sname) { $this->_addSpecialInfos($book, $theme, $tparam, $sname); @@ -681,15 +681,17 @@ class wsFlash extends cubeFlashGateway protected function _addSpecialInfos($book, $theme, $param, $specialName) { - if ($specialName == 'archives') { + if ($specialName == 'archives' || $specialName==='slider') { + $inBook=true; $p = $book->parametres; } else { + $inBook=false; $p = $theme->parametres; } if ($p->$param != '') { - if ($specialName != 'archives') { + if (!$inBook) { $themeRoot = WS_THEMES . '/' . $theme->theme_id . '/'; $dim = CubeIT_Image::getimagesize($themeRoot . $p->$param); $url = 'https://' . $_SERVER['HTTP_HOST'] . WEBROOT . '/fluidbook/themes/' . $theme->theme_id . '/' . $p->$param; diff --git a/inc/ws/Metier/class.ws.book.parametres.php b/inc/ws/Metier/class.ws.book.parametres.php index 26353077a..803f35ff3 100644 --- a/inc/ws/Metier/class.ws.book.parametres.php +++ b/inc/ws/Metier/class.ws.book.parametres.php @@ -460,6 +460,13 @@ class wsBookParametres extends wsParametres 'fieldsnames' => array('zoomWheel', '|', 'zoom', 'zoomw')); // . + $this->fields['sliderImage'] = array('type' => 'freefile', 'default' => '', 'editable' => true, + 'label' => __('Image pour le slider'), 'grade' => 3, 'fileFilter' => $imageExtraFilter); + + $this->forms['slider'] = ['label' => __('Slider'), + 'fieldsnames' => ['sliderImage'], + ]; + $this->fields['stats_score'] = array('type' => 'boolean', 'default' => true, 'editable' => true, 'label' => __('Afficher les scores dans les rapports'), 'grade' => 5); $this->fields['stats_exclude_ip'] = array('type' => 'textarea', 'default' => '', 'editable' => true, 'label' => __('Exclure les IP suivantes des statistiques'), 'grade' => 3, 'hint' => sprintf(__('Indiquer une adresse ip de la forme %s par ligne'), 'www.xxx.yyy.zzz')); $this->fields['relay_url_params'] = ['type' => 'text', 'default' => '', 'editable' => true, 'label' => __('Relayer les paramètres d\'url dans les liens sortants'), 'grade' => 3]; @@ -836,7 +843,7 @@ class wsBookParametres extends wsParametres __('SCORM 1.2') => '1.2', __('SCORM 2004 3rd edition') => '2004.3', __('SCORM 2004 4th edition') => '2004', - ) + ) ); $this->fields['scorm_id'] = array('type' => 'text', 'default' => '', 'editable' => true, 'label' => __('Identifiant SCORM'), 'grade' => 5); $this->fields['scorm_org'] = array('type' => 'text', 'default' => 'ACME-ORG-1350650111249', 'editable' => true, 'label' => __('Organisation SCORM'), 'grade' => 5); 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 da22b71f9..07231e8aa 100644 --- a/inc/ws/Util/html5/master/class.ws.html5.compiler.php +++ b/inc/ws/Util/html5/master/class.ws.html5.compiler.php @@ -2145,12 +2145,16 @@ height="0" width="0" style="display:none;visibility:hidden"> if (in_array($linkData['type'], $ignore)) { continue; } + if ($linkData['uid'] === 'slider') { + $linkData['page'] = 'background'; + } $linkData['hidden'] = in_array($linkData['uid'], $hiddenLinks); if ($linkData['type'] == 28) { $this->addSEOArticle('#/page/' . $linkData['page'], $linkData['to'], $linkData['extra'], $linkData['image']); continue; } + $link = wsHTML5Link::getInstance($this->base62($i), $linkData, $this); if (is_null($link) || $link->ignore()) { continue; 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 137cae33a..a46a704ba 100644 --- a/inc/ws/Util/html5/master/class.ws.html5.links.php +++ b/inc/ws/Util/html5/master/class.ws.html5.links.php @@ -611,7 +611,7 @@ class wsHTML5Link // } if ($this->allowsAnimation) { - if (stristr($this->image_rollover, 'type=') && $this instanceof contentLink) { + if ($this instanceof contentLink && stristr($this->image_rollover, 'type=')) { $animations = self::parseAnimations($this->image_rollover); } else { $animations = self::parseAnimationsInExtra($this->extraraw); diff --git a/swf/_src/composerLibrary.swc b/swf/_src/composerLibrary.swc index 950610477..731a3a81a 100644 Binary files a/swf/_src/composerLibrary.swc and b/swf/_src/composerLibrary.swc differ diff --git a/swf/_src/wsComposerLibrary.fla b/swf/_src/wsComposerLibrary.fla index dfd3fbd50..8d17e33e9 100644 Binary files a/swf/_src/wsComposerLibrary.fla and b/swf/_src/wsComposerLibrary.fla differ