]> _ Git - cubeextranet.git/commitdiff
wait #5241 @1.25
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Thu, 21 Apr 2022 17:36:05 +0000 (17:36 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Thu, 21 Apr 2022 17:36:05 +0000 (17:36 +0000)
inc/commons/class.common.tools.php
inc/ws/Metier/class.ws.book.parametres.php
inc/ws/Metier/class.ws.document.php
inc/ws/Util/html5/master/class.ws.html5.compiler.php
inc/ws/Util/html5/master/class.ws.html5.links.php

index 67a6cc8816f0c38732a6cc7b91a8aaa589bfabfb..e31ae80f085a2ecc3d29d00d345f565695df0c62 100644 (file)
@@ -968,25 +968,7 @@ class commonTools
 
     public static function createGitRepos()
     {
-        commonDroits::min(0.5);
-        global $core;
-
-        $res = commonPage::barre();
-        $res .= commonPage::tMain();
-        $res .= commonPage::bh();
-        $res .= '<form action="createGitRepos" method="post">';
-        $res .= '<div id="res">';
-        $res .= '<table class="liste">';
-        $res .= '<tr><th colspan="2"><strong>' . __('Création d\'un dépôt git') . '</strong></th></tr>';
-        $res .= '<tr><td>' . __('Dépôt') . '</td><td>git@git.cubedesigners.com:' . form::field('repos', 20, 512) . '.git</td></tr>';
-        $res .= '<tr><td class="right" colspan="2"><a href="#" class="submit">' . $core->typo->BoutonOK(__('Création')) . '</a></td></td>';
-        $res .= '</table>';
-        $res .= '</div>';
-        $res .= '</form>';
-        $res .= '</div>';
-        $res .= commonPage::bf();
-        $res .= commonPage::bMain();
-        return $res;
+        header('Location: https://toolbox.fluidbook.com/tools/gitreposcreate');
     }
 
 
@@ -1189,7 +1171,7 @@ class commonTools
             'wesco' => 'Wesco',
             'mopec' => 'Mopec',
             'intex' => 'Intex',
-            'grosfillex'=>'Grosfillex'];
+            'grosfillex' => 'Grosfillex'];
 
         $options = array_flip($options);
         ksort($options);
index 02b66ee79d440d63cb4e3fb3ddf9e280b06eaa4f..9da5a797e85440f8a72212445a33ad4b2c015b4b 100644 (file)
@@ -556,7 +556,6 @@ class wsBookParametres extends wsParametres
         $this->fields['linkTooltipMaxWidth'] = array('type' => 'integer', 'default' => 140, 'editable' => true, 'label' => __('Largeur max des infobulles des liens de type "infobulle"'));
         $this->fields['openLinkAtStartup'] = ['type' => 'text', 'default' => '', 'editable' => true, 'label' => __('Déclencher un lien à l\'ouverture du fluidbook')];
 
-
         $this->fields['mobileIgnoreBackgroundLinks'] = array('type' => 'boolean', 'default' => false, 'editable' => true, 'label' => __('Ignorer les liens de background'));
         $this->forms['links'] = array('label' => __('Liens'),
             'fieldsnames' => array('permanentLinks', 'mobileLinksRevealAnim', 'linkBlinkTime', 'linkBlinkRepetition', '|', 'openLinkAtStartup', '|', 'customLinkClass', 'ignoreLinksTypes', 'mobileIgnoreBackgroundLinks', 'linkTooltipManager', 'linkCornerSize', 'linkTooltipMaxWidth', '|', 'linkTracker', 'linkTrackerRegexp', '|', 'linkFilePrefix'));
@@ -571,11 +570,15 @@ class wsBookParametres extends wsParametres
         $this->forms['multimedia'] = ['label' => __('Multimedia'),
             'fieldsnames' => ['textPopupStylesheet', 'textPopupWidth', '|', 'iframePopupMaxWidth', '|', 'OAMChromeFactor', 'OAMIEFactor']];
 
-        $this->fields['PDFRenderer'] = ['type' => 'combo', 'datas' => [__('Navigateur') => 'native', 'PDF.js' => 'pdfjs', 'PDF.js (legacy)' => 'pdfjs-legacy'], 'default' => 'native', 'editable' => true, 'label' => __('Rendu des PDF par')];
+        $pdfRendererOptions = [__('Navigateur') => 'native', 'PDF.js' => 'pdfjs', 'PDF.js (legacy)' => 'pdfjs-legacy'];
+        $pdfRenderOptionsIframe = array_merge($pdfRendererOptions, [__('Ecraser en SVG') => 'svg']);
+
+        $this->fields['PDFRenderer'] = ['type' => 'combo', 'datas' => $pdfRendererOptions, 'default' => 'native', 'editable' => true, 'label' => __('Rendu des PDF (téléchargement)')];
+        $this->fields['PDFRendererIframe'] = ['type' => 'combo', 'datas' => $pdfRenderOptionsIframe, 'default' => 'native', 'editable' => true, 'label' => __('Rendu des PDF (iframes)')];
         $this->fields['PDFJSCSS'] = ['type' => 'textarea', 'default' => '', 'editable' => true, 'label' => 'Styles PDF.js'];
 
         $this->forms['pdf'] = ['label' => 'PDF',
-            'fieldsnames' => ['PDFRenderer', 'PDFJSCSS']];
+            'fieldsnames' => ['PDFRenderer', 'PDFRendererIframe', '|', 'PDFJSCSS']];
 
         $slideshowPopupLibraries = [
             'Splide (' . __('défaut') . ')' => 'splide',
index 81569f1d3922d7e314a16d5a8c570f13f6e7152b..3abc5a99a112c55f20de2005aca8915731df9055 100644 (file)
@@ -62,7 +62,7 @@ class wsDocument extends cubeMetier
         ['name' => 'vincent', 'host' => 'paris.cubedesigners.com', 'port' => 22923, 'weight' => 1],
         ['name' => 'godzilla', 'host' => 'godzilla.cubedesigners.com', 'weight' => 3],
         ['name' => 'dracula', 'host' => 'dracula.cubedesigners.com', 'weight' => 3],
-        ['name' => 'her', 'host' => 'her.cubedesigners.com', 'weight' => 4],
+        ['name' => 'her', 'host' => 'her.cubedesigners.com', 'port' => 22022, 'weight' => 4],
     ];
 
     protected static $resolution2multiply = array(72 => 2, 100 => 2, 150 => 3, 200 => 3, 300 => 3, 450 => 4, 600 => 5);
index 890920a9ea15f3b340b0fd9d0aaf007ad441606a..fbe8af54fc773244a0fd0c1e0b16b501fe477277 100644 (file)
@@ -2036,7 +2036,20 @@ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
 
         $linksCopy = $links;
 
+
         foreach ($linksCopy as $k => $linkData) {
+            if ($this->book->parametres->PDFRendererIframe === 'svg' && $linkData['type'] == 31 && stristr($linkData['to'], '.pdf')) {
+                $ofile = $this->wdir . '/' . $linkData['to'];
+                $dfile = $this->wdir . '/' . $linkData['to'] . '.svg';
+                if (!file_exists($dfile) || filemtime($dfile) < filemtime($ofile)) {
+                    $cmd="pdftocairo -svg -f 1 -l 1 $ofile $dfile";
+                    `$cmd`;
+                }
+                $linkData['type'] = 6;
+                $linkData['to'] = $linkData['alternative'] = $linkData['to'] . '.svg';
+                $linkData['backgroundColor'] = '#fff';
+                $links[$k] = $linkData;
+            }
             if ($linkData['type'] == 26 || $linkData == 40) {
                 $linkData['to'] = anchorLink::normalizeAnchor($linkData['to']);
                 $anchorExists[$linkData['to']] = $linkData;
index ece0f0ad868b3b002001d1bd0222a81c40808620..7f79bfaa24e59adfd76736dde655f9cbe8858770 100644 (file)
@@ -56,6 +56,7 @@ class wsHTML5Link
     public $allowsAnimation = true;
     public $forceTexture = false;
     public $letterspacing = 0;
+    public $backgroundColor=null;
 
     protected $role = 'button';
 
@@ -1146,7 +1147,9 @@ class htmlMultimediaPopupImage extends normalLink
         $res = parent::getAdditionnalContent();
         $dim = CubeIT_Image::getimagesize($this->wdir . '/' . $this->alternative);
 
-        $markup = '<div class="multimediaContainer" data-click-to-close="' . $this->clickToClose . '"><img data-width="' . $dim[0] . '" data-height="' . $dim[1] . '" src="' . wsHTML5Link::getUniversalLocation($this->alternative) . '" width="' . $dim[0] . '" height="' . $dim[1] . '" class="multimedia" /></div>';
+        $bg=null===$this->backgroundColor?'':' style="background-color:'.$this->backgroundColor.';"';
+
+        $markup = '<div class="multimediaContainer" data-click-to-close="' . $this->clickToClose . '"><img'.$bg.' data-width="' . $dim[0] . '" data-height="' . $dim[1] . '" src="' . wsHTML5Link::getUniversalLocation($this->alternative) . '" width="' . $dim[0] . '" height="' . $dim[1] . '" class="multimedia" /></div>';
         $read = '';
         if ($this->read_mode) {
             $read = ' data-readmode="1"';