]> _ Git - cubeextranet.git/commitdiff
wip #4440 @2
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Thu, 29 Apr 2021 18:51:56 +0000 (18:51 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Thu, 29 Apr 2021 18:51:56 +0000 (18:51 +0000)
inc/ws/Metier/class.ws.book.parametres.php
inc/ws/Util/html5/master/class.ws.html5.links.php
inc/ws/Util/packager/class.ws.packager.html.php

index ea207076d8008540732d41fe98afe86f1e77550a..2c52bae6704ea24541567b6272840143bbbef9fe 100644 (file)
@@ -751,11 +751,12 @@ class wsBookParametres extends wsParametres
 
         $this->fields['forceCompileOnDownload'] = array('type' => 'boolean', 'default' => false, 'editable' => true, 'label' => __('Forcer la compilation lors du téléchargement'), 'grade' => 3);
         $this->fields['htmlExtension'] = array('type' => 'text', 'default' => 'html', 'editable' => true, 'label' => __('Extension des fichiers html'), 'grade' => 5, 'hint' => __('Ex : php, htm, html, phtml, asp'), 'grade' => 5);
+        $this->fields['actualHtmlExtension'] = array('type' => 'text', 'default' => 'html', 'editable' => false, 'label' => __('Extension des fichiers html réellement appliquée au fluidbook'), 'grade' => 5, 'hint' => __('Ex : php, htm, html, phtml, asp'), 'grade' => 5);
         $this->fields['htmlPrepend'] = array('type' => 'textarea', 'default' => '', 'editable' => true, 'label' => __('Code à insérer en tête des fichiers'), 'grade' => 5);
         $this->fields['baseUrl'] = array('type' => 'text', 'default' => '', 'editable' => true, 'label' => __('Base de l\'url'), 'grade' => 5,);
 
         $this->forms['package'] = array('label' => __('Option d\'export'),
-            'fieldsnames' => array('htmlExtension', 'htmlPrepend', 'baseUrl', 'forceCompileOnDownload'));
+            'fieldsnames' => array('htmlExtension', "actualHtmlExtension", 'htmlPrepend', 'baseUrl', 'forceCompileOnDownload'));
 
         $this->fields['disableDemo'] = array('type' => 'boolean', 'default' => false, 'editable' => true, 'label' => __('Désactiver le lien de démo'), 'grade' => 5);
         $this->fields['redirectDemo'] = array('type' => 'text', 'default' => '', 'editable' => true, 'label' => __('Rediriger le lien de démo vers'), 'grade' => 5);
index c66b2c630c44b2f404166349400502f99a67b43a..9b5ba33ffc3caf85e3de73a80de4b634ddb186c9 100644 (file)
@@ -1730,9 +1730,9 @@ class htmlMultimediaLink extends wsHTML5Link
                 $d = array('fdir' => $fdir, 'dir' => $dir);
                 $file = $this->compiler->wdir . '/' . $this->alternative;
                 $content = file_get_contents($file);
-                if (false && strpos($content, '<div id="lottie"></div>')) {
-                    return $this->getLottieContent($content, $this->width, $this->height);
-                }
+//                if (false && strpos($content, '<div id="lottie"></div>')) {
+//                    return $this->getLottieContent($content, $this->width, $this->height);
+//                }
                 $this->compiler->vdir->copy($this->compiler->wdir . '/' . $this->alternative, $d['dir'] . '/' . $this->alternative);
                 $this->_config = $this->getConfigHTML($d['dir'], $this->alternative);
                 $this->copyExternalFile($d['dir'] . '/' . $this->alternative);
index 5786692c01485b893648e678b5cf809a0f9070af..6a77db49c643cb9d2aa68e6c61236b06dffd3371 100644 (file)
@@ -35,6 +35,7 @@ class wsPackagerHTML extends wsPackager
         }
 
         $this->_ext = $this->book->parametres->htmlExtension;
+        $this->book->parametres->actualHtmlExtension = $this->_ext;
 
         $this->copyFluidbookFiles();
         $this->mergeJavascript();
@@ -307,6 +308,12 @@ class wsPackagerHTML extends wsPackager
             $rm->setArg(null, $dest . '/' . $f);
         }
         $rm->execute();
+
+        if ($this->_ext !== 'html') {
+            $e = $this->_ext;
+            `find $dest -type f -name "*.html" -exec rename 's/\.html$/.$e/' '{}' \;`;
+
+        }
     }
 
     public function makePackage($zip)