]> _ Git - cubeextranet.git/commitdiff
wip #5162 @2
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Thu, 17 Mar 2022 08:57:36 +0000 (08:57 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Thu, 17 Mar 2022 08:57:36 +0000 (08:57 +0000)
inc/ws/Controlleur/class.ws.flash.php
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
swf/_src/composerLibrary.swc
swf/_src/wsComposerLibrary.fla

index 01c6ee41acbc077525b5220073598a8a3583c50b..72ec397a21493b8d8f6aefc72bec8df2aeb0f23d 100644 (file)
@@ -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;
index 26353077a971a09e929809b1e56bf68b08ede182..803f35ff3c106caa813070c93f1577d728946f6d 100644 (file)
@@ -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);
index da22b71f9df838d5d73072c36adf1399599c5db0..07231e8aa3f52852e532ee1c51dae417e00999cc 100644 (file)
@@ -2145,12 +2145,16 @@ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
             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;
index 137cae33a420ff0e64ca101c930be8b677c145ac..a46a704bac8f456cb4c744ebeb808dbb285247c0 100644 (file)
@@ -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);
index 9506104772022d420d1501d163dba9c840f41c5b..731a3a81a90a022e1fe4db1020183f497fbf6a04 100644 (file)
Binary files a/swf/_src/composerLibrary.swc and b/swf/_src/composerLibrary.swc differ
index dfd3fbd50bb224de48c148f2b02c4505eaf7fe72..8d17e33e9aa8b387149a24baf3ca7da3549f7bf7 100644 (file)
Binary files a/swf/_src/wsComposerLibrary.fla and b/swf/_src/wsComposerLibrary.fla differ