$this->fields['preload'] = array('type' => 'integer', 'default' => 16, 'editable' => true, 'label' => __('Nombre de pages à précharger'), 'grade' => 3);
+ $this->fields['menuPosition'] = array('type' => 'combo', 'default' => 'right', 'editable' => true, 'label' => __("Position du menu"),
+ 'datas' => array(__('Droite') => 'right',
+ __('Gauche') => 'left'));
+
$this->fields['navOrder'] = array('type' => 'textarea', 'default' => 'index, chapters, print, friend, bookmark, pdf, archives, basket, fullscreen, sound, 3d, lang, help', 'editable' => true, 'label' => __('Ordre des icônes dans la nav'), 'grade' => 3);
$this->fields['tooltipTimer'] = array('type' => 'float', 'default' => 3, "editable" => true, 'label' => __("Temps maximum d'apparition des infos-bulles (en secondes)"));
$this->forms['general'] = array('label' => __('Fonctionnalités générales'),
- 'fieldsnames' => array('navOrder', 'tooltipTimer', 'preload', 'pages', 'width', 'height'));
+ 'fieldsnames' => array('menuPosition', 'navOrder', 'tooltipTimer', 'preload', 'pages', 'width', 'height'));
//.
//
'fieldsnames' => array('transparentBackground', '|', 'backgroundColor', '|', 'backgroundImage',\r
'repeat', 'backgroundHAlign', 'backgroundVAlign', '|', 'displayBackgroundDuringLoading'));\r
/* Menu bar */\r
- $this->fields['menuHeight'] = array('type' => 'integer', 'default' => 39, 'editable' => true,\r
+ $this->fields['menuHeight'] = array('type' => 'integer', 'default' => 60, 'editable' => true,\r
'label' => __('Hauteur (en pixels)'));\r
$this->fields['menuColor'] = array('type' => 'couleurAlpha', 'default' => 'ffffffff', 'editable' => true,\r
'label' => __("Couleur du fond"));\r
'js/libs/gal/gal.js',
'js/libs/gal/gal.filesystem.js',
'js/libs/interact.js',
+ 'js/libs/hammer.js',
'js/libs/fluidbook/forms/fluidbook.form.bulle.js',
'js/libs/fluidbook/fluidbook.utils.js',
'js/libs/fluidbook/fluidbook.links.js',
protected $additionalConfig = array();
protected $fontScale = 1;
protected $cache = array();
- protected $backgroundsPrefix = 'p';
+ protected $backgroundsPrefix = array();
protected $svg = true;
protected $config = array();
protected $assets = '';
$this->book = $this->daoBook->selectById($book_id);
$this->pages = $this->daoBook->getPagesOfBook($book_id);
- if ($this->book->parametres->mobileVersion == 'html5-images') {
- $this->backgroundsPrefix = 't';
- $this->svg = false;
+ switch ($this->book->parametres->mobileVersion) {
+ case 'html5-desktop':
+ $this->backgroundsPrefix = array('t', 'p');
+ $svg = true;
+ break;
+ case 'html5-images':
+ $this->backgroundsPrefix = array('t');
+ $svg = false;
+ break;
+ default:
+ $this->backgroundsPrefix = array('p');
+ $svg = true;
+ break;
}
$daoTheme = new wsDAOTheme($core->con);
}
}
}
+ $this->config->rasterizePages = cubeArray::parseRange($this->config->rasterizePages);
return 'var DATAS=' . json_encode($this->config) . ';' . "\n";
}
foreach ($this->getResolutions() as $r) {
mkdir($this->vdir . '/data/background/' . $r, 0777, true);
}
- $srcPrefix = $this->backgroundsPrefix;
- if ($this->backgroundsPrefix == 'p') {
- $srcPrefix = 'h';
- }
+
$thumbs = array();
foreach ($this->pages as $page => $infos) {
$docdir = wsDocument::getDir($infos['document_id']);
}
foreach ($this->getResolutions() as $r) {
- $ok = $this->copy($docdir . 'html/' . $srcPrefix . $r . '-' . $infos['document_page'] . '.jpg', $this->vdir . '/data/background/' . $r . '/' . $this->backgroundsPrefix . $page . '.jpg');
- if (!$ok && $r = 300) {
- $this->maxRes = 150;
+ foreach ($this->backgroundsPrefix as $backgroundsPrefix) {
+ $srcPrefix = $backgroundsPrefix;
+ if ($backgroundsPrefix == 'p') {
+ $srcPrefix = 'h';
+ }
+ $ok = $this->copy($docdir . 'html/' . $srcPrefix . $r . '-' . $infos['document_page'] . '.jpg', $this->vdir . '/data/background/' . $r . '/' . $backgroundsPrefix . $page . '.jpg');
+ if (!$ok && $r = 300) {
+ $this->maxRes = 150;
+ }
}
- $this->copy(WS_DOCS . '/' . $infos['document_id'] . '/p' . $infos['document_page'] . '.jpg', $this->vdir . '/data/thumbnails/p' . $page . '.jpg');
+ $this->copy(WS_DOCS . '/' . $infos['document_id'] . '/p' . $infos['document_page'] . '.jpg', $this->vdir . '/data/thumbnails/p' . $page . '.jpg');
}
$thumb = false;
$res[] = '#shadow>div{' . wsHTML5::writeCSSUA('box-shadow', '0 0 20px ' . $shadowColor) . '}';
}
- $lessVariables['links-color']=wsHTML5::colorToCSS($this->theme->parametres->linksColor);
+ $lessVariables['links-color'] = wsHTML5::colorToCSS($this->theme->parametres->linksColor);
// Links Styles
$res = array_merge($res, $links);