\r
parent::initFields();\r
/* Navigation */\r
+ $this->fields['arrowsTheme'] = array('type' => 'boolean', "default" => false, "editable" => true, "label" => __('Nouveau thème'));\r
$this->fields['couleurA'] = array('type' => 'couleurAlpha', 'default' => 'ff000000', 'editable' => true,\r
- 'label' => __("Couleur de fond"));\r
+ 'label' => __("Couleur de fond"));\r
$this->fields['arrowsColor'] = array('type' => 'couleur', 'default' => 'ffffff', 'editable' => true,\r
- 'label' => __('Couleur des flèches'));\r
+ 'label' => __('Couleur des flèches'));\r
$this->fields['shadeOnArrows'] = array('type' => 'boolean', 'default' => true, 'editable' => true, 'label' => __('Ombre portée sous les flèches'));\r
\r
+\r
$this->forms['bouton'] = array('label' => __('Personnalisation des boutons'),\r
- 'fieldsnames' => array('couleurA', 'arrowsColor', 'shadeOnArrows'));\r
+ 'fieldsnames' => array('couleurA', 'arrowsColor', 'shadeOnArrows', 'arrowsTheme'));\r
/* Submenus */\r
$this->fields['couleurB'] = array('type' => 'couleurAlpha', 'default' => 'ff000000', 'editable' => true,\r
- 'label' => __("Couleur de fond"));\r
+ 'label' => __("Couleur de fond"));\r
$this->fields['subTextColor'] = array('type' => 'couleur', 'default' => 'ffffffff', 'editable' => true,\r
- 'label' => __("Couleur du texte"));\r
+ 'label' => __("Couleur du texte"));\r
$this->fields['subSelectColor'] = array('type' => 'couleurAlpha', 'default' => 'ffffffff', 'editable' => true,\r
- 'label' => __("Couleur des zones de sélection"));\r
+ 'label' => __("Couleur des zones de sélection"));\r
$this->fields['subTextSelectColor'] = array('type' => 'couleur', 'default' => '000000', 'editable' => true,\r
- 'label' => __("Couleur des textes des zones de sélection"));\r
+ 'label' => __("Couleur des textes des zones de sélection"));\r
$this->fields['subTextFieldColor'] = array('type' => 'couleur', 'default' => '000000', 'editable' => true,\r
- 'label' => __("Couleur des textes des champs d'édition"));\r
+ 'label' => __("Couleur des textes des champs d'édition"));\r
$this->fields['subFieldColor'] = array('type' => 'couleurAlpha', 'default' => 'ffffffff', 'editable' => true,\r
- 'label' => __("Couleur des champs d'édition"));\r
+ 'label' => __("Couleur des champs d'édition"));\r
$this->fields['subStrokeWidth'] = array('type' => 'integer', 'default' => 0, "editable" => true, 'label' => __('Largeur du contour'));\r
$this->fields['subStrokeColor'] = array('type' => 'couleur', 'default' => 'ffffff', "editable" => true, 'label' => __('Couleur du contour'));\r
$this->fields['subShade'] = array('type' => 'couleurAlpha', 'default' => '00000000', "editable" => true, 'label' => __('Ombre sous le sous-menu'));\r
$this->fields['subButtonDecoration'] = array('type' => 'couleur', 'default' => '797979', 'editable' => true, 'label' => __('Couleur des décorations'));\r
\r
$this->forms['menu'] = array('label' => __('Personnalisation des menus'),\r
- 'fieldsnames' => array('couleurB', 'subTextColor', '|', 'subSelectColor', 'subTextSelectColor', '|', 'subTextFieldColor', 'subFieldColor',\r
- '|', 'subStrokeWidth', 'subStrokeColor', 'subShade', 'subRound',\r
- '|', 'subButtonCustom', 'subButtonBackground', 'subButtonColor', 'subButtonDecoration'));\r
+ 'fieldsnames' => array('couleurB', 'subTextColor', '|', 'subSelectColor', 'subTextSelectColor', '|', 'subTextFieldColor', 'subFieldColor',\r
+ '|', 'subStrokeWidth', 'subStrokeColor', 'subShade', 'subRound',\r
+ '|', 'subButtonCustom', 'subButtonBackground', 'subButtonColor', 'subButtonDecoration'));\r
\r
/* Search */\r
$this->fields['couleurS'] = array('type' => 'couleur', 'default' => '000000', 'editable' => true,\r
- 'label' => __("Couleur du texte"));\r
+ 'label' => __("Couleur du texte"));\r
$this->fields['searchFieldColor'] = array('type' => 'couleur', 'default' => 'ffffff', 'editable' => true,\r
- 'label' => __("Couleur du champs de saisie"));\r
+ 'label' => __("Couleur du champs de saisie"));\r
$this->fields['searchShadeAlpha'] = array('type' => 'integer', 'default' => 0, 'editable' => true,\r
- 'label' => __("Intensité de l'ombre dans le champ de saisie"),\r
- 'min' => 0, 'max' => 100);\r
+ 'label' => __("Intensité de l'ombre dans le champ de saisie"),\r
+ 'min' => 0, 'max' => 100);\r
$this->fields['highlightColor'] = array('type' => 'couleur', 'default' => '00ff00', 'editable' => true,\r
- 'label' => __("Couleur du surlignage des résultats"));\r
+ 'label' => __("Couleur du surlignage des résultats"));\r
$this->fields['searchFieldWidth'] = array('type' => 'integer', 'default' => 230, 'editable' => true,\r
- 'label' => __("Largeur du champ de recherche"));\r
+ 'label' => __("Largeur du champ de recherche"));\r
$this->fields['searchIndexNoResultColor'] = array('type' => 'couleurAlpha', 'default' => 'CC000000', 'editable' => true,\r
- 'label' => __("Couleur de l'overlay (aucun résultat)"),\r
- 'grade' => 5);\r
+ 'label' => __("Couleur de l'overlay (aucun résultat)"),\r
+ 'grade' => 5);\r
\r
$this->forms['search'] = array('label' => __('Personnalisation de la recherche'),\r
- 'fieldsnames' => array('couleurS', 'searchFieldColor', 'searchShadeAlpha', 'searchFieldWidth', '|', 'highlightColor', '|', 'searchIndexNoResultColor'));\r
+ 'fieldsnames' => array('couleurS', 'searchFieldColor', 'searchShadeAlpha', 'searchFieldWidth', '|', 'highlightColor', '|', 'searchIndexNoResultColor'));\r
/* Icones */\r
$this->fields['iconSet'] = array('type' => 'icones', 'default' => 1, 'editable' => true,\r
- 'label' => __("Jeu d'icônes"));\r
+ 'label' => __("Jeu d'icônes"));\r
$this->fields['colorizeIcons'] = array('type' => 'boolean', 'default' => false, 'editable' => true,\r
- 'label' => __('Colorier les icônes'));\r
+ 'label' => __('Colorier les icônes'));\r
$this->fields['couleurI'] = array('type' => 'couleur', 'default' => '$couleurA', 'editable' => true,\r
- 'label' => __("Couleur des icônes"));\r
+ 'label' => __("Couleur des icônes"));\r
$this->fields['iconShadeColor'] = array('type' => 'couleurAlpha', 'default' => '00000000', 'editable' => true,\r
- 'label' => __("Couleur de l'effet de rollover"));\r
+ 'label' => __("Couleur de l'effet de rollover"));\r
$this->fields['iconsHMargin'] = array('type' => 'integer', 'default' => 15, 'editable' => true,\r
- 'label' => __('Espace entre les icônes'), 'min' => 0, 'max' => 50);\r
+ 'label' => __('Espace entre les icônes'), 'min' => 0, 'max' => 50);\r
\r
$this->fields['fontKit'] = array('type' => 'combo', 'default' => 'auto', 'editable' => true,\r
- 'label' => __('Police de caractères'), 'datas' => array(__('Automatique') => 'auto',\r
- 'VAG Rounded' => 'vagrounded',\r
- 'Gill'=>'gill'));\r
+ 'label' => __('Police de caractères'), 'datas' => array(__('Automatique') => 'auto',\r
+ 'VAG Rounded' => 'vagrounded',\r
+ 'Gill' => 'gill'));\r
\r
$this->forms['icones'] = array('label' => __('Personnalisation des icônes'),\r
- 'fieldsnames' => array('iconSet', 'iconShadeColor', '|', 'iconsHMargin', '|', 'colorizeIcons', 'couleurI', '|', 'fontKit'));\r
+ 'fieldsnames' => array('iconSet', 'iconShadeColor', '|', 'iconsHMargin', '|', 'colorizeIcons', 'couleurI', '|', 'fontKit'));\r
\r
/* Book */\r
$this->fields['bookShadeColor'] = array('type' => 'couleurAlpha', 'default' => '66000000', 'editable' => true,\r
- 'label' => __("Couleur de l'ombre sous la publication"));\r
+ 'label' => __("Couleur de l'ombre sous la publication"));\r
$this->fields['shadeAlpha'] = array('type' => 'integer', 'default' => 100, 'editable' => true,\r
- 'label' => __('Transparence des ombres et reflets sur les pages'),\r
- 'min' => 0, 'max' => 100);\r
+ 'label' => __('Transparence des ombres et reflets sur les pages'),\r
+ 'min' => 0, 'max' => 100);\r
$this->fields['pageReflection'] = array('type' => 'boolean', 'default' => false, 'editable' => true,\r
- 'label' => __("Afficher le reflet sur la page"));\r
+ 'label' => __("Afficher le reflet sur la page"));\r
$this->fields['usePageEdges'] = array('type' => 'boolean', 'default' => true, 'editable' => true,\r
- 'label' => __("Afficher la bordure des pages"));\r
+ 'label' => __("Afficher la bordure des pages"));\r
$this->fields['displayPageNumber'] = array('type' => 'boolean', 'default' => true, 'editable' => true,\r
- 'label' => __('Afficher les numéros de page'));\r
+ 'label' => __('Afficher les numéros de page'));\r
$this->fields['colorPageNumber'] = array('type' => 'couleur', 'default' => 'ffffff', 'editable' => true,\r
- 'label' => __('Couleur des numéros de page'));\r
+ 'label' => __('Couleur des numéros de page'));\r
$this->fields['linksColor'] = array('type' => 'couleur', 'default' => '$couleurA', 'editable' => true,\r
- 'label' => __('Couleur des liens'));\r
+ 'label' => __('Couleur des liens'));\r
$this->fields['videoBackgroundColor'] = array('type' => 'couleur', 'default' => '000000', 'editable' => true,\r
- 'label' => __('Couleur de fond des videos'));\r
+ 'label' => __('Couleur de fond des videos'));\r
$this->fields['popupVideoOverlay'] = array('type' => 'couleurAlpha', 'default' => '00000000', 'editable' => true,\r
- 'label' => __('Overlay placé sous les vidéos en popup'));\r
+ 'label' => __('Overlay placé sous les vidéos en popup'));\r
$this->fields['pageEdgeColor'] = array('type' => 'couleur', 'default' => 'dddddd', 'editable' => true,\r
- 'label' => __('Couleur de la bordure'));\r
+ 'label' => __('Couleur de la bordure'));\r
$this->fields['pageEdgeThickness'] = array('type' => 'integer', 'default' => 100, 'editable' => true,\r
- 'label' => __('Epaisseur de la bordure'));\r
+ 'label' => __('Epaisseur de la bordure'));\r
$this->fields['tooltipBackColor'] = array('type' => 'couleurAlpha', 'default' => 'CC000000', 'editable' => true,\r
- 'label' => __("Couleur de fond des infobulles"));\r
+ 'label' => __("Couleur de fond des infobulles"));\r
$this->fields['tooltipTextColor'] = array('type' => 'couleur', 'default' => 'ffffff', 'editable' => true,\r
- 'label' => __("Couleur du texte des infobulles"));\r
+ 'label' => __("Couleur du texte des infobulles"));\r
$this->fields['bookmarkBackgroundColor'] = array('type' => 'couleurAlpha', 'default' => 'ffadadad', 'editable' => true,\r
- 'label' => __("Couleur de fond des marques-pages"));\r
+ 'label' => __("Couleur de fond des marques-pages"));\r
$this->fields['bookmarkStarDisabledColor'] = array('type' => 'couleurAlpha', 'default' => '00ffffff', 'editable' => true,\r
- 'label' => __("Couleur de l'étoile désactivée"));\r
+ 'label' => __("Couleur de l'étoile désactivée"));\r
$this->fields['bookmarkStarEnabledColor'] = array('type' => 'couleur', 'default' => 'ff7700', 'editable' => true,\r
- 'label' => __("Couleur de l'étoile activée"));\r
+ 'label' => __("Couleur de l'étoile activée"));\r
\r
$this->forms['book'] = array('label' => __('Personnalisation de la publication'),\r
- 'fieldsnames' => array('pageReflection', 'shadeAlpha',\r
- '|', 'usePageEdges', 'pageEdgeColor', 'pageEdgeThickness',\r
- '|', 'bookShadeColor',\r
- '|', 'displayPageNumber', 'colorPageNumber',\r
- '|', 'linksColor', 'videoBackgroundColor', 'popupVideoOverlay',\r
- '|', 'tooltipBackColor', 'tooltipTextColor',\r
- '|', 'bookmarkBackgroundColor', 'bookmarkStarDisabledColor', 'bookmarkStarEnabledColor'));\r
+ 'fieldsnames' => array('pageReflection', 'shadeAlpha',\r
+ '|', 'usePageEdges', 'pageEdgeColor', 'pageEdgeThickness',\r
+ '|', 'bookShadeColor',\r
+ '|', 'displayPageNumber', 'colorPageNumber',\r
+ '|', 'linksColor', 'videoBackgroundColor', 'popupVideoOverlay',\r
+ '|', 'tooltipBackColor', 'tooltipTextColor',\r
+ '|', 'bookmarkBackgroundColor', 'bookmarkStarDisabledColor', 'bookmarkStarEnabledColor'));\r
/* Credits */\r
$this->fields['creditsColor'] = array('type' => 'couleurAlpha', 'default' => '80ffffff', 'editable' => true,\r
- 'label' => __("Couleur du texte"));\r
+ 'label' => __("Couleur du texte"));\r
\r
$this->forms['credits'] = array('label' => __('Personnalisation des crédits'),\r
- 'fieldsnames' => array('creditsColor'));\r
+ 'fieldsnames' => array('creditsColor'));\r
/* Background */\r
$this->fields['transparentBackground'] = array('type' => 'boolean', 'default' => false, 'editable' => true,\r
- 'label' => __('Fond transparent'), 'hint' => __("Si cette option est cochée, aucun fond ne sera pris en compte (ni l'image, ni la couleur)"));\r
+ 'label' => __('Fond transparent'), 'hint' => __("Si cette option est cochée, aucun fond ne sera pris en compte (ni l'image, ni la couleur)"));\r
$this->fields['backgroundColor'] = array('type' => 'couleur', 'default' => 'ffffff', 'editable' => true,\r
- 'label' => __("Couleur du fond"));\r
+ 'label' => __("Couleur du fond"));\r
$this->fields['backgroundImage'] = array('type' => 'file', 'default' => 'backgroundImg.jpg', 'editable' => true,\r
- 'label' => __('Image de fond'),\r
- 'path' => $themeRoot,\r
- 'uploadURL' => SITE_PATH . 'flash/uploadThemeFile/?theme_id=' . $this->parent->theme_id);\r
+ 'label' => __('Image de fond'),\r
+ 'path' => $themeRoot,\r
+ 'uploadURL' => SITE_PATH . 'flash/uploadThemeFile/?theme_id=' . $this->parent->theme_id);\r
$this->fields['repeat'] = array('type' => 'combo',\r
- 'datas' => array(__('Etirer') => wsTheme::STRETCH,\r
- __('Etirer le fond en conservant les proportions') => wsTheme::RATIO,\r
- __("Répéter") => wsTheme::REPEAT,\r
- __('Ne pas répéter ni étirer') => wsTheme::NONE),\r
- 'default' => 0, 'editable' => true, 'label' => __('Affichage du fond'));\r
+ 'datas' => array(__('Etirer') => wsTheme::STRETCH,\r
+ __('Etirer le fond en conservant les proportions') => wsTheme::RATIO,\r
+ __("Répéter") => wsTheme::REPEAT,\r
+ __('Ne pas répéter ni étirer') => wsTheme::NONE),\r
+ 'default' => 0, 'editable' => true, 'label' => __('Affichage du fond'));\r
$this->fields['backgroundHAlign'] = array('type' => 'combo',\r
- 'datas' => array(__('Centré') => wsTheme::CENTER,\r
- __('Gauche') => wsTheme::LEFT,\r
- __("Droite") => wsTheme::RIGHT),\r
- 'default' => wsTheme::CENTER, 'editable' => true, 'label' => __('Alignement Horizontal'));\r
+ 'datas' => array(__('Centré') => wsTheme::CENTER,\r
+ __('Gauche') => wsTheme::LEFT,\r
+ __("Droite") => wsTheme::RIGHT),\r
+ 'default' => wsTheme::CENTER, 'editable' => true, 'label' => __('Alignement Horizontal'));\r
$this->fields['backgroundVAlign'] = array('type' => 'combo',\r
- 'datas' => array(__('Milieu') => wsTheme::MIDDLE,\r
- __('Haut') => wsTheme::TOP,\r
- __("Bas") => wsTheme::BOTTOM),\r
- 'default' => wsTheme::MIDDLE, 'editable' => true, 'label' => __('Alignement Vertical'));\r
+ 'datas' => array(__('Milieu') => wsTheme::MIDDLE,\r
+ __('Haut') => wsTheme::TOP,\r
+ __("Bas") => wsTheme::BOTTOM),\r
+ 'default' => wsTheme::MIDDLE, 'editable' => true, 'label' => __('Alignement Vertical'));\r
$this->fields['displayBackgroundDuringLoading'] = array('type' => 'boolean', 'default' => true, 'editable' => true,\r
- 'label' => __('Afficher le fond pendant le chargement'), 'hint' => __("Si cette option est désactivée, le fond ne sera affiché qu'à la fin du chargement"));\r
+ 'label' => __('Afficher le fond pendant le chargement'), 'hint' => __("Si cette option est désactivée, le fond ne sera affiché qu'à la fin du chargement"));\r
\r
$this->forms['background'] = array('label' => __('Personnalisation du fond'),\r
- 'fieldsnames' => array('transparentBackground', '|', 'backgroundColor', '|', 'backgroundImage',\r
- 'repeat', 'backgroundHAlign', 'backgroundVAlign', '|', 'displayBackgroundDuringLoading'));\r
+ '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
- 'label' => __('Hauteur (en pixels)'));\r
+ 'label' => __('Hauteur (en pixels)'));\r
$this->fields['menuColor'] = array('type' => 'couleurAlpha', 'default' => 'ffffffff', 'editable' => true,\r
- 'label' => __("Couleur du fond"));\r
+ 'label' => __("Couleur du fond"));\r
$this->fields['shadeOnMenu'] = array('type' => 'boolean', 'default' => true, 'editable' => true,\r
- 'label' => __('Ombre portée sous la barre du menu'));\r
+ 'label' => __('Ombre portée sous la barre du menu'));\r
$this->fields['menuImage'] = array('type' => 'file', 'default' => 'menu_back.png', 'editable' => true,\r
- 'label' => __('Image de fond'),\r
- 'path' => $themeRoot,\r
- 'uploadURL' => SITE_PATH . 'flash/uploadThemeFile/?theme_id=' . $this->parent->theme_id);\r
+ 'label' => __('Image de fond'),\r
+ 'path' => $themeRoot,\r
+ 'uploadURL' => SITE_PATH . 'flash/uploadThemeFile/?theme_id=' . $this->parent->theme_id);\r
$this->fields['invertMenuPosition'] = array('type' => 'boolean', 'default' => false, 'editable' => true,\r
- 'label' => __("Intervertir le menu et le logo"));\r
+ 'label' => __("Intervertir le menu et le logo"));\r
\r
$this->fields['topBar'] = array('type' => 'file', 'default' => '', 'editable' => true,\r
- 'label' => __('Top Bar'),\r
- 'path' => $themeRoot,\r
- 'uploadURL' => SITE_PATH . 'flash/uploadThemeFile/?theme_id=' . $this->parent->theme_id);\r
+ 'label' => __('Top Bar'),\r
+ 'path' => $themeRoot,\r
+ 'uploadURL' => SITE_PATH . 'flash/uploadThemeFile/?theme_id=' . $this->parent->theme_id);\r
$this->fields['topBarAlign'] = array('type' => 'combo',\r
- 'datas' => array(__('Centré') => wsTheme::CENTER,\r
- __('Gauche') => wsTheme::LEFT,\r
- __("Droite") => wsTheme::RIGHT),\r
- 'default' => wsTheme::LEFT, 'editable' => true, 'label' => __('Alignement Horizontal de la Top Bar'));\r
+ 'datas' => array(__('Centré') => wsTheme::CENTER,\r
+ __('Gauche') => wsTheme::LEFT,\r
+ __("Droite") => wsTheme::RIGHT),\r
+ 'default' => wsTheme::LEFT, 'editable' => true, 'label' => __('Alignement Horizontal de la Top Bar'));\r
\r
$this->fields['afterSearch'] = array('type' => 'file', 'default' => '', 'editable' => true,\r
- 'label' => __('Image supplémentaire'),\r
- 'path' => $themeRoot,\r
- 'uploadURL' => SITE_PATH . 'flash/uploadThemeFile/?theme_id=' . $this->parent->theme_id,\r
- 'hint' => __('Image disposée à droite du champ de recherche')\r
+ 'label' => __('Image supplémentaire'),\r
+ 'path' => $themeRoot,\r
+ 'uploadURL' => SITE_PATH . 'flash/uploadThemeFile/?theme_id=' . $this->parent->theme_id,\r
+ 'hint' => __('Image disposée à droite du champ de recherche')\r
);\r
\r
$this->forms['menubar'] = array('label' => __('Personnalisation de la barre de menu'),\r
- 'fieldsnames' => array('menuHeight', '|', 'menuColor', '|', 'menuImage', '|', 'shadeOnMenu', '|', 'invertMenuPosition', '|', 'topBar', 'topBarAlign', '|', 'afterSearch'));\r
+ 'fieldsnames' => array('menuHeight', '|', 'menuColor', '|', 'menuImage', '|', 'shadeOnMenu', '|', 'invertMenuPosition', '|', 'topBar', 'topBarAlign', '|', 'afterSearch'));\r
/* Menu bar logo */\r
\r
$imageFilter = new stdClass();\r
$imageFilter->extensions = '*.png';\r
\r
$this->fields['logo'] = array('type' => 'file', 'default' => 'menu_clientLogo.png', 'editable' => true,\r
- 'label' => __('Logo'),\r
- 'path' => $themeRoot,\r
- 'uploadURL' => SITE_PATH . 'flash/uploadThemeFile/?theme_id=' . $this->parent->theme_id);\r
+ 'label' => __('Logo'),\r
+ 'path' => $themeRoot,\r
+ 'uploadURL' => SITE_PATH . 'flash/uploadThemeFile/?theme_id=' . $this->parent->theme_id);\r
$this->fields['favicon'] = array('type' => 'file', 'default' => '', 'editable' => true,\r
- 'label' => __('Icone (pour favicon et CD-ROM)'),\r
- 'path' => $themeRoot,\r
- 'fileFilter' => $imageFilter,\r
- 'uploadURL' => SITE_PATH . 'flash/uploadThemeFile/?theme_id=' . $this->parent->theme_id . '&type=favicon',\r
- 'hint' => __('Image PNG de 256x256'));\r
+ 'label' => __('Icone (pour favicon et CD-ROM)'),\r
+ 'path' => $themeRoot,\r
+ 'fileFilter' => $imageFilter,\r
+ 'uploadURL' => SITE_PATH . 'flash/uploadThemeFile/?theme_id=' . $this->parent->theme_id . '&type=favicon',\r
+ 'hint' => __('Image PNG de 256x256'));\r
$this->fields['iosicon'] = array('type' => 'file', 'default' => '', 'editable' => true,\r
- 'label' => __('Icone (pour application iOS)'),\r
- 'path' => $themeRoot,\r
- 'fileFilter' => $imageFilter,\r
- 'uploadURL' => SITE_PATH . 'flash/uploadThemeFile/?theme_id=' . $this->parent->theme_id . '&type=iosicon',\r
- 'hint' => __('Image PNG de 1024x1024'));\r
+ 'label' => __('Icone (pour application iOS)'),\r
+ 'path' => $themeRoot,\r
+ 'fileFilter' => $imageFilter,\r
+ 'uploadURL' => SITE_PATH . 'flash/uploadThemeFile/?theme_id=' . $this->parent->theme_id . '&type=iosicon',\r
+ 'hint' => __('Image PNG de 1024x1024'));\r
$this->fields['androidicon'] = array('type' => 'file', 'default' => '', 'editable' => true,\r
- 'label' => __('Icone (pour application Android)'),\r
- 'path' => $themeRoot,\r
- 'fileFilter' => $imageFilter,\r
- 'uploadURL' => SITE_PATH . 'flash/uploadThemeFile/?theme_id=' . $this->parent->theme_id . '&type=androidicon',\r
- 'hint' => __('Image PNG de 1024x1024'));\r
+ 'label' => __('Icone (pour application Android)'),\r
+ 'path' => $themeRoot,\r
+ 'fileFilter' => $imageFilter,\r
+ 'uploadURL' => SITE_PATH . 'flash/uploadThemeFile/?theme_id=' . $this->parent->theme_id . '&type=androidicon',\r
+ 'hint' => __('Image PNG de 1024x1024'));\r
\r
$this->forms['logo'] = array('label' => __('Personnalisation du logo'),\r
- 'fieldsnames' => array('logo', '|', 'favicon', 'iosicon', 'androidicon'));\r
+ 'fieldsnames' => array('logo', '|', 'favicon', 'iosicon', 'androidicon'));\r
/* Loader */\r
$this->fields['logoLoader'] = array('type' => 'file', 'default' => 'logoLoader.png', 'editable' => true,\r
- 'label' => __('Logo affiché au chargement'),\r
- 'path' => $themeRoot,\r
- 'uploadURL' => SITE_PATH . 'flash/uploadThemeFile/?theme_id=' . $this->parent->theme_id);\r
+ 'label' => __('Logo affiché au chargement'),\r
+ 'path' => $themeRoot,\r
+ 'uploadURL' => SITE_PATH . 'flash/uploadThemeFile/?theme_id=' . $this->parent->theme_id);\r
$this->fields['couleurL'] = array('type' => 'couleur', 'default' => '', 'editable' => true,\r
- 'label' => __("Couleur principale de la barre de chargement"));\r
+ 'label' => __("Couleur principale de la barre de chargement"));\r
$this->fields['loadingSecColor'] = array('type' => 'couleur', 'default' => 'ffffff', 'editable' => true,\r
- 'label' => __("Couleur secondaire de la barre de chargement"));\r
+ 'label' => __("Couleur secondaire de la barre de chargement"));\r
$this->fields['loadingBackColor'] = array('type' => 'couleur', 'default' => 'ffffff', 'editable' => true,\r
- 'label' => __("Couleur du fond affichée avant l'affichage de l'image de fond"));\r
+ 'label' => __("Couleur du fond affichée avant l'affichage de l'image de fond"));\r
$this->fields['loaderPosition'] = array('type' => 'boolean', 'default' => false, 'editable' => true,\r
- 'label' => __('Placer le logo à gauche et le loader à droite'), 'grade' => 3);\r
+ 'label' => __('Placer le logo à gauche et le loader à droite'), 'grade' => 3);\r
\r
$this->forms['loader'] = array('label' => __('Personnalisation du loader'),\r
- 'fieldsnames' => array('loadingBackColor', '|', 'couleurL', 'loadingSecColor', 'logoLoader', 'loaderPosition'));\r
+ 'fieldsnames' => array('loadingBackColor', '|', 'couleurL', 'loadingSecColor', 'logoLoader', 'loaderPosition'));\r
/* Pages bar */\r
$this->fields['pagesBar'] = array('type' => 'boolean', 'default' => true, 'editable' => true,\r
- 'label' => __("Afficher la barre d'accès rapide aux pages"));\r
+ 'label' => __("Afficher la barre d'accès rapide aux pages"));\r
$this->fields['pageBarThumbBack'] = array('type' => 'couleurAlpha', 'default' => '80000000', 'editable' => true,\r
- 'label' => __("Couleur de fond de la boîte"));\r
+ 'label' => __("Couleur de fond de la boîte"));\r
$this->fields['bookmarkColor'] = array('type' => 'couleur', 'default' => 'ffffff', 'editable' => true,\r
- 'label' => __("Couleur des marques-pages"));\r
+ 'label' => __("Couleur des marques-pages"));\r
\r
$this->forms['pagesbar'] = array('label' => __('Personnalisation de la barre des pages'),\r
- 'fieldsnames' => array('pagesBar', 'pageBarThumbBack', '|', 'bookmarkColor'));\r
+ 'fieldsnames' => array('pagesBar', 'pageBarThumbBack', '|', 'bookmarkColor'));\r
\r
/* Paramètres non implémentés */\r
/* $this->fields['extraXSpace'] = array('type' => 'integer', 'default' => '0', 'editable' => true,\r
parent::preparePackage();\r
\r
foreach ($this->pages as $page => $infos) {\r
- $file = WS_DOCS . '/' . $infos['document_id'] . '/html/p' . $infos['document_page'] . '.layout';\r
+ $file = wsDocument::getDir($infos['document_id']) . 'html/p' . $infos['document_page'] . '.layout';\r
if (file_exists($file)) {\r
$this->layouts[$page] = simplexml_load_file($file, null, LIBXML_ERR_WARNING);\r
}\r
}\r
\r
- $imagesize = getimagesize(WS_DOCS . '/' . $this->pages[1]['document_id'] . '/html/h72-' . $this->pages[1]['document_page'] . '.jpg');\r
+ $imagesize = getimagesize(wsDocument::getDir($this->pages[1]['document_id']) . 'html/h72-' . $this->pages[1]['document_page'] . '.jpg');\r
$this->pdf2htmlRatio = round($imagesize[0] / $this->layouts[1]['width'], 2);\r
$this->scale = 4;\r
$this->multiply = $this->pdf2htmlRatio * $this->scale;\r
}\r
\r
protected function compareLines($a, $b) {\r
- if ((float) $a['y'] > (float) $b['y']) {\r
+ if ((float)$a['y'] > (float)$b['y']) {\r
return 1;\r
} else {\r
return -1;\r
\r
protected function writeJs() {\r
$files = array('js/libs/modernizr.js',\r
- 'js/libs/jquery/jquery.js',\r
- 'js/libs/jquery/jquery.transform.js',\r
- 'js/libs/jquery/jquery.mousewheel.js',\r
- 'js/libs/jquery/jquery.hashchange.js',\r
- 'js/libs/fluidbook/fluidbook.utils.js',\r
- 'js/libs/fluidbook/fluidbook.cache.js',\r
- 'js/libs/fluidbook/fluidbook.support.js',\r
- 'js/libs/fluidbook/fluidbook.viewport.js',\r
- 'js/libs/fluidbook/fluidbook.desktop.js',\r
- 'js/libs/fluidbook/fluidbook.service.js',\r
- 'js/libs/fluidbook/fluidbook.loader.js',\r
- 'js/libs/fluidbook/fluidbook.l10n.js',\r
- 'js/libs/fluidbook/fluidbook.nav.js',\r
- 'js/libs/fluidbook/fluidbook.js',\r
- 'js/main.js');\r
+ 'js/libs/jquery/jquery.js',\r
+ 'js/libs/jquery/jquery.transform.js',\r
+ 'js/libs/jquery/jquery.mousewheel.js',\r
+ 'js/libs/jquery/jquery.hashchange.js',\r
+ 'js/libs/fluidbook/fluidbook.utils.js',\r
+ 'js/libs/fluidbook/fluidbook.cache.js',\r
+ 'js/libs/fluidbook/fluidbook.support.js',\r
+ 'js/libs/fluidbook/fluidbook.viewport.js',\r
+ 'js/libs/fluidbook/fluidbook.desktop.js',\r
+ 'js/libs/fluidbook/fluidbook.service.js',\r
+ 'js/libs/fluidbook/fluidbook.loader.js',\r
+ 'js/libs/fluidbook/fluidbook.l10n.js',\r
+ 'js/libs/fluidbook/fluidbook.nav.js',\r
+ 'js/libs/fluidbook/fluidbook.js',\r
+ 'js/main.js');\r
\r
$mintime = 0;\r
$minimized = WS_COMPILE_ASSETS . '/_html5/js/min.js';\r
if ($reminimize) {\r
$js = '';\r
foreach ($files as $file) {\r
- $js.=file_get_contents(WS_COMPILE_ASSETS . '/_html5/' . $file);\r
- $js.="\n\n";\r
+ $js .= file_get_contents(WS_COMPILE_ASSETS . '/_html5/' . $file);\r
+ $js .= "\n\n";\r
}\r
$tmp = cubeFiles::tempnam();\r
file_put_contents($tmp, $js);\r
}\r
\r
$js = $this->writeConfig();\r
- $js.=file_get_contents($minimized);\r
+ $js .= file_get_contents($minimized);\r
file_put_contents($this->vdir . '/data/fluidbook.js', $js);\r
}\r
\r
$fontforge = new cubeCommandLine('convert.pe');\r
$fontforge->setPath(CONVERTER_PATH);\r
foreach ($this->fontDocs[$font] as $document_id => $dummy) {\r
- $fontforge->setArg(null, WS_DOCS . '/' . $document_id . '/fonts/web/' . $font . '.ttf');\r
+ $fontforge->setArg(null, wsDocument::getDir($document_id) . 'fonts/web/' . $font . '.ttf');\r
}\r
$fontforge->setArg(null, $this->vdir . '/data/style/F' . $index . '.' . $format);\r
$fontforge->execute();\r
$arrowsColor = '#' . $this->theme->parametres->arrowsColor;\r
// Set the icon list with the color\r
$icons = array('nav-bookmark' => $couleurI, 'nav-friend' => $couleurI, 'nav-help' => $couleurI, 'nav-index' => $couleurI, 'nav-sommaire' => $couleurI,\r
- 'next' => $arrowsColor, 'previous' => $arrowsColor, 'search' => $couleurI, 'nav-facebook' => $couleurI, 'nav-twitter' => $couleurI,\r
- 'help-fingers' => $couleurI, 'help-mouse' => $couleurI);\r
+ 'next' => $arrowsColor, 'previous' => $arrowsColor, 'search' => $couleurI, 'nav-facebook' => $couleurI, 'nav-twitter' => $couleurI,\r
+ 'help-fingers' => $couleurI, 'help-mouse' => $couleurI);\r
\r
foreach ($icons as $icon => $color) {\r
wsTools::colorizeAndRasterizeIcon($this->theme->parametres->iconSet, $icon, $color, $this->vdir . '/data/images/', 4, $w, $h);\r
}\r
foreach ($this->pages as $page => $infos) {\r
foreach (self::$resolutions as $r) {\r
- copy(WS_DOCS . '/' . $infos['document_id'] . '/html/h' . $r . '-' . $infos['document_page'] . '.jpg', $this->vdir . '/data/background/' . $r . '/p' . $page . '.jpg');\r
+ copy(wsDocument::getDir($infos['document_id']) . 'html/h' . $r . '-' . $infos['document_page'] . '.jpg', $this->vdir . '/data/background/' . $r . '/p' . $page . '.jpg');\r
}\r
- copy(WS_DOCS . '/' . $infos['document_id'] . '/p' . $infos['document_page'] . '.jpg', $this->vdir . '/data/thumbnails/p' . $page . '.jpg');\r
+ copy(wsDocument::getDir($infos['document_id']) . 'p' . $infos['document_page'] . '.jpg', $this->vdir . '/data/thumbnails/p' . $page . '.jpg');\r
}\r
}\r
\r
protected function writeLine($line) {\r
$res = '';\r
foreach ($line['groups'] as $group) {\r
- $res.=$this->writeGroup($group, $line);\r
+ $res .= $this->writeGroup($group, $line);\r
}\r
return $res;\r
}\r
\r
$res = '<div class="' . $class . '">';\r
foreach ($group['spans'] as $span) {\r
- $res.=$this->writeSpan($span);\r
+ $res .= $this->writeSpan($span);\r
}\r
- $res.='</div>';\r
+ $res .= '</div>';\r
return $res;\r
}\r
\r
\r
$br = '.background.r' . $r . '{';\r
if ($ratio != 1) {\r
- $br.=$this->writeCSSUA('transform', 'scale(' . $ratio . ')') . ';';\r
+ $br .= $this->writeCSSUA('transform', 'scale(' . $ratio . ')') . ';';\r
}\r
- $br.='width:' . $wr . 'px;height:' . $hr . 'px;}';\r
+ $br .= 'width:' . $wr . 'px;height:' . $hr . 'px;}';\r
$res[] = $br;\r
}\r
$res[] = '.doublePage,#pages,.landscape #shadow.double{width:' . $w2 . ';max-width:' . $w2 . ';height:' . $h . ';max-height:' . $h . '}';\r
}\r
\r
$texts = '.texts{' . $this->writeCSSUA('transform-origin', 'top left') . ';';\r
- $texts.=$this->writeCSSUA('transform', 'scale(' . round(1 / $this->multiply, 2) . ')') . ';';\r
- $texts.='width:' . $wm . '; max-width:' . $wm . ';';\r
- $texts.='height:' . $hm . '; max-height:' . $hm . ';';\r
- $texts.='}';\r
+ $texts .= $this->writeCSSUA('transform', 'scale(' . round(1 / $this->multiply, 2) . ')') . ';';\r
+ $texts .= 'width:' . $wm . '; max-width:' . $wm . ';';\r
+ $texts .= 'height:' . $hm . '; max-height:' . $hm . ';';\r
+ $texts .= '}';\r
$res[] = $texts;\r
\r
// Theme\r
// Background\r
$body = '#deviceView{';\r
- $body.='background-color:#' . $this->theme->parametres->backgroundColor . ';';\r
+ $body .= 'background-color:#' . $this->theme->parametres->backgroundColor . ';';\r
switch ($this->theme->parametres->repeat) {\r
case wsTheme::REPEAT:\r
- $body.='background-repeat:repeat;';\r
+ $body .= 'background-repeat:repeat;';\r
break;\r
case wsTheme::NONE:\r
- $body.='background-repeat:no-repeat;';\r
+ $body .= 'background-repeat:no-repeat;';\r
break;\r
case wsTheme::RATIO:\r
- $body.='background-repeat:no-repeat;';\r
+ $body .= 'background-repeat:no-repeat;';\r
break;\r
case wsTheme::STRETCH:\r
- $body.='background-repeat:no-repeat;';\r
- $body.='background-size:100% 100%;';\r
+ $body .= 'background-repeat:no-repeat;';\r
+ $body .= 'background-size:100% 100%;';\r
break;\r
}\r
if ($this->theme->parametres->backgroundImage != '') {\r
copy($this->themeRoot . '/' . $this->theme->parametres->backgroundImage, $this->vdir . '/data/images/' . $this->theme->parametres->backgroundImage);\r
- $body.='background-image:url(../images/' . $this->theme->parametres->backgroundImage . ');';\r
- $body.='background-position:';\r
+ $body .= 'background-image:url(../images/' . $this->theme->parametres->backgroundImage . ');';\r
+ $body .= 'background-position:';\r
\r
\r
switch ($this->theme->parametres->backgroundVAlign) {\r
case wsTheme::TOP:\r
- $body.='top';\r
+ $body .= 'top';\r
break;\r
case wsTheme::MIDDLE:\r
- $body.='center';\r
+ $body .= 'center';\r
break;\r
case wsTheme::BOTTOM:\r
- $body.='bottom';\r
+ $body .= 'bottom';\r
break;\r
}\r
- $body.=' ';\r
+ $body .= ' ';\r
switch ($this->theme->parametres->backgroundHAlign) {\r
case wsTheme::LEFT:\r
- $body.='left';\r
+ $body .= 'left';\r
break;\r
case wsTheme::CENTER:\r
- $body.='center';\r
+ $body .= 'center';\r
break;\r
case wsTheme::RIGHT:\r
- $body.='right';\r
+ $body .= 'right';\r
break;\r
}\r
- $body.=';';\r
+ $body .= ';';\r
}\r
\r
- $body.='}';\r
+ $body .= '}';\r
$res[] = $body;\r
\r
// Header\r
$header = '#header{';\r
- $header.='height:' . $this->theme->parametres->menuHeight . 'px;';\r
- $header.='background-color:' . self::colorToCSS($this->theme->parametres->menuColor) . ';';\r
+ $header .= 'height:' . $this->theme->parametres->menuHeight . 'px;';\r
+ $header .= 'background-color:' . self::colorToCSS($this->theme->parametres->menuColor) . ';';\r
if ($this->theme->parametres->menuImage != '') {\r
copy($this->themeRoot . '/' . $this->theme->parametres->menuImage, $this->vdir . '/data/images/' . $this->theme->parametres->menuImage);\r
- $header.='background-image:url(../images/' . $this->theme->parametres->menuImage . ');';\r
- $header.='background-repeat:no-repeat;';\r
- $header.='background-size:100% ' . $this->theme->parametres->menuHeight . 'px;';\r
+ $header .= 'background-image:url(../images/' . $this->theme->parametres->menuImage . ');';\r
+ $header .= 'background-repeat:no-repeat;';\r
+ $header .= 'background-size:100% ' . $this->theme->parametres->menuHeight . 'px;';\r
}\r
- $header.='}';\r
+ $header .= '}';\r
$res[] = $header;\r
\r
//Icons\r
if ($this->theme->parametres->logo) {\r
copy($this->themeRoot . '/' . $this->theme->parametres->logo, $this->vdir . '/data/images/' . $this->theme->parametres->logo);\r
$dim = getimagesize($this->vdir . '/data/images/' . $this->theme->parametres->logo);\r
- $logo.='background-image:url(../images/' . $this->theme->parametres->logo . ');width:' . $dim[0] . 'px;height:' . $dim[1] . 'px;';\r
+ $logo .= 'background-image:url(../images/' . $this->theme->parametres->logo . ');width:' . $dim[0] . 'px;height:' . $dim[1] . 'px;';\r
}\r
- $logo.='}';\r
+ $logo .= '}';\r
$res[] = $logo;\r
\r
// Credits\r
}\r
\r
foreach ($this->cssRotation as $rotation => $index) {\r
- $rotation*= - 1;\r
+ $rotation *= -1;\r
\r
\r
$to = 'transform-origin:left top;';\r
\r
$css = '.r' . $index . '{';\r
- $css.=self::writeCSSUA('transform', 'rotate(' . $rotation . 'deg)') . ';';\r
- $css.=self::writeCSSUA('transform-origin', 'left top') . ';';\r
- $css.='margin-top:' . round(cos(deg2rad($rotation)) * -1, 2) . 'em !important;';\r
- $css.='margin-left:' . round(sin(deg2rad($rotation)), 2) . 'em !important;';\r
- $css.='}';\r
+ $css .= self::writeCSSUA('transform', 'rotate(' . $rotation . 'deg)') . ';';\r
+ $css .= self::writeCSSUA('transform-origin', 'left top') . ';';\r
+ $css .= 'margin-top:' . round(cos(deg2rad($rotation)) * -1, 2) . 'em !important;';\r
+ $css .= 'margin-left:' . round(sin(deg2rad($rotation)), 2) . 'em !important;';\r
+ $css .= '}';\r
$res[] = $css;\r
}\r
\r
$spans = array();\r
\r
foreach ($group->s as $span) {\r
- if ($first && trim((string) $span) == '') {\r
+ if ($first && trim((string)$span) == '') {\r
continue;\r
}\r
if ($first) {\r
$pos = $x = $span['x'];\r
- $pos+=$span['width'];\r
+ $pos += $span['width'];\r
$first = false;\r
} else {\r
- if ((float) $span['x'] < (float) $newSpan['x']) {\r
+ if ((float)$span['x'] < (float)$newSpan['x']) {\r
// On change de groupe\r
$ls = $ws = 0;\r
if ($letterCount > 0) {\r
$res[] = array(\r
'color' => $this->getCSSColor($group['color']),\r
'size' => $this->getCSSSize($group['size']),\r
- 'font' => $this->getCSSFont((string) $group['font'], $document_id),\r
+ 'font' => $this->getCSSFont((string)$group['font'], $document_id),\r
'letterspacing' => $this->getCSSLetterSpacing($ls),\r
'wordspacing' => $this->getCSSLetterSpacing($ws),\r
'y' => 0,\r
\r
$spans = array();\r
$pos = $x = $span['x'];\r
- $pos+=$span['width'];\r
+ $pos += $span['width'];\r
} else {\r
\r
$diff = $span['x'] - $pos;\r
\r
$spans = array();\r
$pos = $x = $span['x'];\r
- $pos+=$span['width'];\r
+ $pos += $span['width'];\r
} else {\r
\r
$newSpan = $this->addSpan('<span style="width:' . $space . 'em;"> </span>', true);\r
$pos = $span['x'] + $span['width'];\r
\r
array_push($spans, $newSpan);\r
- $copy = (string) $span;\r
+ $copy = (string)$span;\r
$len = mb_strlen($copy);\r
str_replace(' ', '-', $copy, $w);\r
$l = $len - $w;\r
\r
- $letterCount+=$l;\r
- $wordCount+=$w;\r
+ $letterCount += $l;\r
+ $wordCount += $w;\r
\r
- $letterSpacing+=$l * (float) $span['letterspacing'];\r
- $wordSpacing+=$w * (float) $span['wordspacing'];\r
+ $letterSpacing += $l * (float)$span['letterspacing'];\r
+ $wordSpacing += $w * (float)$span['wordspacing'];\r
}\r
\r
if (count($spans)) {\r
return $res;\r
}\r
\r
- protected function addSpan($span, $space=false) {\r
- $text = (string) $span;\r
+ protected function addSpan($span, $space = false) {\r
+ $text = (string)$span;\r
return array('text' => $text, 'space' => $space, 'x' => $span['x']);\r
}\r
\r
protected function getCSSSize($size) {\r
$size = $this->normalizeFloatValue($size);\r
- $size*=$this->multiply;\r
+ $size *= $this->multiply;\r
return $this->getIndex($size, $this->cssSize);\r
}\r
\r
protected function getCSSFont($font, $document_id) {\r
- $font = (string) $font;\r
+ $font = (string)$font;\r
if (!isset($this->fontDocs[$font])) {\r
$this->fontDocs[$font] = array();\r
}\r
}\r
\r
protected function getIndex($value, &$tab) {\r
- $value = (string) $value;\r
+ $value = (string)$value;\r
if (isset($tab[$value])) {\r
return $tab[$value];\r
}\r
return $res;\r
}\r
\r
- protected function normalizeFloatValue($value, $round=3) {\r
+ protected function normalizeFloatValue($value, $round = 3) {\r
$value = str_replace(',', '.', $value);\r
- $value = (float) $value;\r
+ $value = (float)$value;\r
$value = round($value, $round);\r
return $value;\r
}\r
return $str;\r
}\r
\r
- public function copyLinkFile($source, $dest, $video=false) {\r
+ public function copyLinkFile($source, $dest, $video = false) {\r
// TODO delete that return;\r
//return;\r
$origDir = WS_BOOKS . '/working/' . $this->book_id . '/';\r
}\r
\r
public function __destruct() {\r
- \r
+\r
}\r
\r
- public static function colorToCSS($color, $forceAlpha=null) {\r
+ public static function colorToCSS($color, $forceAlpha = null) {\r
\r
if (!is_null($forceAlpha)) {\r
$a = $forceAlpha * 255;\r
$hex = substr($color, $k * 2, 2);\r
$$name = intval($hex, 16);\r
}\r
- $alpha/=255;\r
+ $alpha /= 255;\r
if ($alpha == 0) {\r
return 'transparent';\r
} elseif ($alpha == 1) {\r