From: vincent@cubedesigners.com Date: Mon, 28 Aug 2017 09:14:14 +0000 (+0000) Subject: #1625 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=ff6f92368093393c62a87f47a9ef8e65d1162a41;p=cubeextranet.git #1625 --- diff --git a/inc/ws/Metier/class.ws.book.parametres.php b/inc/ws/Metier/class.ws.book.parametres.php index 027e54715..0cee438b7 100644 --- a/inc/ws/Metier/class.ws.book.parametres.php +++ b/inc/ws/Metier/class.ws.book.parametres.php @@ -126,8 +126,8 @@ class wsBookParametres extends wsParametres { $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')); + '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)")); @@ -178,6 +178,7 @@ class wsBookParametres extends wsParametres { $this->fields['search'] = array('type' => 'boolean', 'default' => true, 'editable' => true, 'label' => __('Activer le moteur de recherche')); + $this->fields['highlightResults'] = array('type' => 'boolean', 'default' => true, 'editable' => true, 'label' => __('Surligner les résultats')); $this->fields['ignoreSearch'] = array('type' => 'textarea', 'default' => '', 'editable' => true, 'label' => __('Mots à ignorer'), 'hint' => __('Liste des mots à ignorer séparés par des virgules'), 'grade' => 5); $this->fields['ignoreSearchSeparators'] = array('type' => 'text', 'default' => '', 'editable' => true, 'label' => __('Caractères à ne pas considérer comme un séparateur de mot')); @@ -187,7 +188,7 @@ class wsBookParametres extends wsParametres { $this->fields['searchShowNoResultsPages'] = array('type' => 'boolean', 'default' => false, 'editable' => true, 'label' => __("Afficher les pages sans résultats")); $this->forms['search'] = array('label' => __('Moteur de recherche'), - 'fieldsnames' => array('search', 'searchShowNoResultsPages', '|', 'ignoreSearch', 'ignoreSearchSeparators', 'textExtraction')); + 'fieldsnames' => array('search', 'highlightResults', 'searchShowNoResultsPages', '|', 'ignoreSearch', 'ignoreSearchSeparators', 'textExtraction')); $this->fields['soundTheme'] = array('type' => 'combo', 'default' => 'classic', 'editable' => true, 'label' => __("Thème sonore"), 'datas' => array(__('Pas de son') => '', @@ -376,7 +377,7 @@ class wsBookParametres extends wsParametres { $this->fields['mobileIgnoreBackgroundLinks'] = array('type' => 'boolean', 'default' => false, 'editable' => true, 'label' => __('Ignorer les liens de background')); $this->forms['mobile'] = array('label' => __('Version mobile'), - 'fieldsnames' => array('alwaysHTML5', 'html5priority', 'mobileNavigationType', '|', 'rasterizePages','vectorPages', '|', 'mobileNavScale', '|', 'mobileTransitions', 'mobileTransitionDuration', "mobileLinksRevealAnim", '|', 'navOrderH', '|', 'mobileIconVector', 'mobileServerConfig', 'mobilePlugins', '|', 'mobileVideosPath', '|', 'mobileExtraXSpace', '|', 'mobileIgnoreBackgroundLinks')); + 'fieldsnames' => array('alwaysHTML5', 'html5priority', 'mobileNavigationType', '|', 'rasterizePages', 'vectorPages', '|', 'mobileNavScale', '|', 'mobileTransitions', 'mobileTransitionDuration', "mobileLinksRevealAnim", '|', 'navOrderH', '|', 'mobileIconVector', 'mobileServerConfig', 'mobilePlugins', '|', 'mobileVideosPath', '|', 'mobileExtraXSpace', '|', 'mobileIgnoreBackgroundLinks')); $this->fields['phonegapId'] = array('type' => 'text', 'default' => 'com.fluidbook.phonegap.$id', 'editable' => true, 'label' => __("Identifiant de l'identifiant"), 'grade' => 5, 'hint' => __('De la forme') . ' com.fluidbook.phonegap.xxxxx'); diff --git a/inc/ws/Util/html5/master/class.ws.html5.compiler.php b/inc/ws/Util/html5/master/class.ws.html5.compiler.php index d2837cee2..317033107 100644 --- a/inc/ws/Util/html5/master/class.ws.html5.compiler.php +++ b/inc/ws/Util/html5/master/class.ws.html5.compiler.php @@ -979,7 +979,9 @@ class wsHTML5Compiler { file_put_contents($this->vdir . '/data/search.index.js', $jsindex); file_put_contents($this->vdir . '/data/search.texts.js', $jstexts); - file_put_contents($this->vdir . '/data/search.highlight.js', 'var HIGHLIGHTS=' . json_encode($this->daoBook->makeHighlightIndex($this->book, $this->pages)) . ";\r"); + if ($this->book->parametres->highlightResults) { + file_put_contents($this->vdir . '/data/search.highlight.js', 'var HIGHLIGHTS=' . json_encode($this->daoBook->makeHighlightIndex($this->book, $this->pages)) . ";\r"); + } } public function supportSVG() {