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');
}
'wesco' => 'Wesco',
'mopec' => 'Mopec',
'intex' => 'Intex',
- 'grosfillex'=>'Grosfillex'];
+ 'grosfillex' => 'Grosfillex'];
$options = array_flip($options);
ksort($options);
$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'));
$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',
['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);
$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;
public $allowsAnimation = true;
public $forceTexture = false;
public $letterspacing = 0;
+ public $backgroundColor=null;
protected $role = 'button';
$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"';