]> _ Git - cubeextranet.git/commitdiff
done #1480 @0:05
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Thu, 15 Jun 2017 16:47:37 +0000 (16:47 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Thu, 15 Jun 2017 16:47:37 +0000 (16:47 +0000)
fluidbook/compile/index.html
inc/ws/Metier/class.ws.book.parametres.php
inc/ws/Util/html5/master/class.ws.html5.compiler.php
inc/ws/Util/html5/slider/class.ws.html5.compiler.php
inc/ws/Util/packager/class.ws.packager.html.php

index 2f905cbdc20edc7ebacecd1a536f32f4280fe56d..1430e7d559b7c5b0c1f935ecbfa4387784626c54 100644 (file)
@@ -21,7 +21,9 @@
                visibility: hidden;
                display: none
        }</style>
-       <style type="text/css">body{background-color:#$bgcolor;}</style>
+       <style type="text/css">body {
+               background-color: # $ bgcolor;
+       }</style>
        <script type="text/javascript">
         FB_DEFAULT_LANG = '$lang';
         INDEX_EXT = '$index_ext';
@@ -75,5 +77,6 @@
                                                        style="background-image:url('$pathToGetflash');"></a></div>
        <div style="padding:20px;">$alt</div>
 </div>
+$statsfooter
 </body>
 </html>
\ No newline at end of file
index b1fc64885f4cc134608d79792ee54c40c7ec575a..45c97d250a22f5805efd8b358cb6634250135168 100644 (file)
@@ -13,9 +13,9 @@ class wsBookParametres extends wsParametres {
         */
        protected function initFields() {
                parent::initFields();
-//             if (is_null($this->parent)) {
-//                     return;
-//             }
+               //              if (is_null($this->parent)) {
+               //                      return;
+               //              }
 
                // .
                $swfFilter = new stdClass();
@@ -215,11 +215,12 @@ class wsBookParametres extends wsParametres {
                $this->fields['stats_score'] = array('type' => 'boolean', 'default' => true, 'editable' => true, 'label' => __('Afficher les scores dans les rapports'), 'grade' => 5);
                $this->fields['stats_exclude_ip'] = array('type' => 'textarea', 'default' => '', 'editable' => true, 'label' => __('Exclure les IP suivantes des statistiques'), 'grade' => 3, 'hint' => sprintf(__('Indiquer une adresse ip de la forme %s par ligne'), 'www.xxx.yyy.zzz'));
                $this->fields['googleAnalytics'] = array('type' => 'text', 'default' => '', 'editable' => true, 'label' => __('Code Google Analytics'), 'size' => 10);
-               $this->fields['googleAnalyticsCustom'] = array('type' => 'textarea', 'default' => '', 'editable' => true, 'label' => __('Code Google Analytics personnalisé'));
+               $this->fields['googleAnalyticsCustom'] = array('type' => 'textarea', 'default' => '', 'editable' => true, 'label' => __('Code Stats personnalisé (placé avant fermeture de head)'));
+               $this->fields['statsCustom'] = array('type' => 'textarea', 'default' => '', 'editable' => true, 'label' => __('Code Stats personnalisé (placé avant fermeture du body)'));
                $this->fields['xiti'] = array('type' => 'textarea', 'default' => '', 'editable' => true, 'label' => __('Code XiTi global'));
                $this->fields['xiti_page'] = array('type' => 'textarea', 'default' => '', 'editable' => true, 'label' => __('Modèle code xiti (pour tags relatifs aux pages)'));
                $this->forms['stats'] = array('label' => __('Statistiques'),
-                                             'fieldsnames' => array('stats', 'stats_score', 'stats_exclude_ip', '|', 'googleAnalytics', 'googleAnalyticsCustom', '|', 'xiti', 'xiti_page'));
+                                             'fieldsnames' => array('stats', 'stats_score', 'stats_exclude_ip', '|', 'googleAnalytics', '|', 'googleAnalyticsCustom', 'statsCustom', '|', 'xiti', 'xiti_page'));
 
                $this->fields['displayChaptersIcon'] = array('type' => 'boolean', 'default' => true, 'editable' => true, 'label' => __("Affiche l'icône du sommaire"), 'grade' => 1);
                $this->fields['displayChaptersLine'] = array('type' => 'boolean', 'default' => true, 'editable' => true, 'label' => __("Affiche une ligne entre le label et le numéro de page"), 'grade' => 5);
index 36e920c7cde13794630fe9ed62484ac7fca8d387..5b847872a8b2812cbe82d5d24ec54783ced6cd6c 100644 (file)
@@ -528,6 +528,11 @@ class wsHTML5Compiler {
                if ($this->book->parametres->googleAnalyticsCustom != '') {
                        $ga .= $this->book->parametres->googleAnalyticsCustom;
                }
+
+               $statsfooter = '';
+               if ($this->book->parametres->statsCustom != '') {
+                       $statsfooter = $this->book->parametres->statsCustom;
+               }
                // Feuilles de style
                $sheets = array_merge($this->stylesheets, $this->specialCSS);
 
@@ -595,7 +600,7 @@ class wsHTML5Compiler {
                }
 
 
-               $vars = array('titre', 'credits', 'ga', 'style', 'script', 'pagesContents', 'description', 'print', 'hiddenContents', 'splash', 'cache', 'bgcolor', 'message', 'favicon', 'svg');
+               $vars = array('titre', 'credits', 'statsfooter', 'ga', 'style', 'script', 'pagesContents', 'description', 'print', 'hiddenContents', 'splash', 'cache', 'bgcolor', 'message', 'favicon', 'svg');
                foreach ($vars as $v) {
                        $html = str_replace('<!-- $' . $v . ' -->', $$v, $html);
                }
@@ -624,13 +629,13 @@ class wsHTML5Compiler {
 
                $thtml = $uhtml;
 
-               $vars = array('titre', 'credits', 'ga', 'style', 'script', 'pagesContents', 'print', 'hiddenContents', 'splash', 'cache', 'bgcolor', 'message', 'favicon');
+               $vars = array('titre', 'credits', 'statsfooter', 'ga', 'style', 'script', 'pagesContents', 'print', 'hiddenContents', 'splash', 'cache', 'bgcolor', 'message', 'favicon');
                foreach ($vars as $v) {
                        $uhtml = str_replace('<!-- $' . $v . ' -->', $$v, $uhtml);
                }
 
                $script .= "\n\t\t" . '<script type="text/javascript" charset="utf-8">window.tester = true;</script>';
-               $vars = array('titre', 'credits', 'ga', 'style', 'script', 'print', 'hiddenContents', 'splash', 'message');
+               $vars = array('titre', 'credits', 'statsfooter', 'ga', 'style', 'script', 'print', 'hiddenContents', 'splash', 'message');
                foreach ($vars as $v) {
                        $thtml = str_replace('<!-- $' . $v . ' -->', $$v, $thtml);
                }
@@ -1125,7 +1130,7 @@ class wsHTML5Compiler {
                                $this->_makeCover($docdir . 'html/t36-' . $infos['document_page'] . '.jpg');
                        }
 
-                       $this->log('Copied image '.$page);
+                       $this->log('Copied image ' . $page);
                }
        }
 
index 14dc81df36364f51e1aad7fe700dfc373128a74f..78e9bfa9b14510f735ae2895243721057f87eed8 100644 (file)
@@ -1179,6 +1179,8 @@ class wsHTML5Compiler {
                $res = array();
 
                $lessVariables = array();
+               $lessVariables['slider-display'] = $this->theme->parametres->pagesBar ? 'true' : 'false';
+               $lessVariables['slider-thumb-background'] = wsHTML5::colorToCSS($this->theme->parametres->pageBarThumbBack);
 
                // General theme
                $cssWidth = $this->cssWidth;
index 07648e2eb41943d22bd7ebf7f55a6e04148de753..d87cc4818930243ee111a3706a85089154364c06 100644 (file)
@@ -53,6 +53,11 @@ class wsPackagerHTML extends wsPackager {
                        $ga = cubePage::googleAnalytics(explode(',', $this->book->parametres->googleAnalytics), true, $variables);
                }
 
+               $statsfooter = '';
+               if ($this->book->parametres->statsCustom != '') {
+                       $statsfooter = $this->book->parametres->statsCustom;
+               }
+
                $facebook = '';
                if ($this->book->parametres->facebook) {
                        if ($this->book->parametres->facebook_title != '') {
@@ -118,6 +123,7 @@ class wsPackagerHTML extends wsPackager {
                // Stuffs to replace in html
                $toReplace = array('lang' => strtolower($this->book->lang),
                                   'ga' => $ga,
+                                  'statsfooter' => $statsfooter,
                                   'facebook' => $facebook,
                                   'bgcolor' => $this->theme->parametres->loadingBackColor,
                                   'redirectMobile' => $redirectMobile,