$seoFilter->name = __('Fichier Excel') . ' (.xlsx)';
$seoFilter->extensions = '*.xlsx';
+ $cssFilter = new stdClass();
+ $cssFilter->name = __('Feuille de style') . ' (.css)';
+ $cssFilter->extensions = '*.css';
+
$branches = array('master : git (stable)' => 'stable',
'master : local (dev)' => 'dev');
$gitbranches = json_decode(file_get_contents(WS_CACHE . '/activebranches'));
$this->fields['brightcovePlayerSecret'] = array('type' => 'text', 'default' => '', 'editable' => true, 'label' => __('Brightcove Player Secret'), 'grade' => 3);
$this->fields['inlineSlideshowTransitionDuration'] = array('type' => 'float', 'default' => 0.75, 'editable' => true, 'label' => __('Durée de la transition des diaporamas intégrés aux pages (s)'));
$this->fields['inlineSlideshowDuration'] = array('type' => 'float', 'default' => 7, 'editable' => true, 'label' => __('Temps d\'attente des diaporamas intégrés aux pages (s)'));
+ $this->fields['textPopupStylesheet'] = ['type' => 'freefile', 'default' => '', 'editable' => true, 'label' => __('Feuille de style des popups de texte'), 'fileFilter' => $cssFilter];
+ $this->fields['textPopupWidth'] = ['type' => 'integer', 'default' => '600', 'editable' => true, 'label' => __('Largeur optimale des popups')];
$this->forms['multimedia'] = array('label' => __('Liens et multimédia'),
- 'fieldsnames' => array('permanentLinks', 'linkBlinkTime', 'customLinkClass', 'ignoreLinksTypes', 'linkTooltipManager', 'linkCornerSize', 'linkTooltipMaxWidth', '|', 'linkTracker', 'linkTrackerRegexp', '|', 'linkFilePrefix', '|', 'linkMultimediaPerformanceMode', 'linkMultimediaQuality', '|', 'inlineSlideshowTransitionDuration', 'inlineSlideshowDuration', '|', 'videoReset', 'videoBigPlay', '|', 'brightcovePlayerId', 'brightcovePlayerSecret'));
+ 'fieldsnames' => array('permanentLinks', 'linkBlinkTime', 'customLinkClass', 'ignoreLinksTypes', 'linkTooltipManager', 'linkCornerSize', 'linkTooltipMaxWidth', '|', 'linkTracker', 'linkTrackerRegexp', '|', 'linkFilePrefix', '|', 'linkMultimediaPerformanceMode', 'linkMultimediaQuality', '|', 'inlineSlideshowTransitionDuration', 'inlineSlideshowDuration', '|', 'videoReset', 'videoBigPlay', '|', 'brightcovePlayerId', 'brightcovePlayerSecret', '|', 'textPopupWidth', 'textPopupStylesheet'));
//.
$this->fields['externalArchives'] = array('type' => 'freefile', 'default' => '', 'editable' => true,
'label' => __('Archives'), 'grade' => 3, 'fileFilter' => $imageFilter);
$this->writeExtras();
$this->log('Extras written');
$this->populateConfig();
- $this->writeCSS('data/style/style_%d.css', $linksCSS);
+ $this->writeCSS($linksCSS);
$this->log('CSS written');
$this->writeIndex();
$this->log('Index written');
return $val ? 'true' : 'false';
}
- protected function writeCSS($file, $links)
+ protected function writeCSS($links)
{
$res = array();
# ZoomPopup close button background
$res[] = '.zoomPopupClose {background-color:' . wsHTML5::colorToCSS($this->theme->parametres->couleurB) . ';}';
+ if ($this->book->parametres->textPopupStylesheet) {
+ $res[] = file_get_contents($this->wdir . '/' . $this->book->parametres->textPopupStylesheet);
+ }
$this->_writeLess($lessVariables, $lessContents);
-
- $res = array_chunk($res, 3500);
- foreach ($res as $k => $css) {
- $this->stylesheets[] = 'data/style/style_' . $k . '.css';
- $this->vdir->file_put_contents(sprintf($file, $k), implode("\n", $css));
- $this->log('Write CSS ' . sprintf($file, $k));
- }
- return count($res);
+ $this->stylesheets[] = 'data/style/style.css';
+ $this->vdir->file_put_contents('data/style/style.css', implode("\n", $res));
+ $this->log('Write CSS');
}
protected function _writeLess($variables, $lessContents = '')