]> _ Git - cubeextranet.git/commitdiff
#1625
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Mon, 28 Aug 2017 09:14:14 +0000 (09:14 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Mon, 28 Aug 2017 09:14:14 +0000 (09:14 +0000)
inc/ws/Metier/class.ws.book.parametres.php
inc/ws/Util/html5/master/class.ws.html5.compiler.php

index 027e54715686ea5ea20a5cd94a2013cc417b9386..0cee438b7d98460b4af30ef4f4e0992375c316de 100644 (file)
@@ -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');
index d2837cee26dee4c1984f96fc347458356c03aa93..3170331072833cf05b8718310476e12c63b00b10 100644 (file)
@@ -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() {