From a0a77432f41dbf4be451d3d36aed60e7ba90dc5f Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Mon, 16 Jul 2012 14:48:01 +0000 Subject: [PATCH] --- inc/ws/Controlleur/class.ws.url.php | 4 ++-- inc/ws/DAO/class.ws.dao.book.php | 23 ++++++++++++------- inc/ws/Util/html5/class.ws.html5.compiler.php | 5 +++- 3 files changed, 21 insertions(+), 11 deletions(-) diff --git a/inc/ws/Controlleur/class.ws.url.php b/inc/ws/Controlleur/class.ws.url.php index a048a334c..dd1bd3ea3 100644 --- a/inc/ws/Controlleur/class.ws.url.php +++ b/inc/ws/Controlleur/class.ws.url.php @@ -253,7 +253,7 @@ class wsUrl { if (!isset($infos['pattern'])) { $infos['pattern'] = '$1_$2'; } - $res .= '
  • ' . $infos['icon'] . $infos['title'] . '
  • '; + $res .= '
  • ' . $infos['icon'] . $infos['title'] . '
  • '; } } $res .= ''; @@ -1024,7 +1024,7 @@ html{height:100%}' . "\n"; header('Content-type: text/plain'); ob_end_clean(); - echo $dao->compile($args[1], 3, isset($args[2])); + echo $dao->compile($args[1], 3, false,true); exit; } diff --git a/inc/ws/DAO/class.ws.dao.book.php b/inc/ws/DAO/class.ws.dao.book.php index 99681573b..c74f8155a 100644 --- a/inc/ws/DAO/class.ws.dao.book.php +++ b/inc/ws/DAO/class.ws.dao.book.php @@ -789,7 +789,7 @@ class wsDAOBook extends commonDAO { $pages = $this->getPagesOfBook($book_id); } - public function compile($book_id, $version = 'all', $complete = false) { + public function compile($book_id, $version = 'all', $complete = false, $force = false) { if (is_null($book_id) || !$book_id) { return; } @@ -810,9 +810,16 @@ class wsDAOBook extends commonDAO { $book = $this->selectById($book_id); $pages = $this->getPagesOfBook($book_id); - $v1 = $v1 && !$this->isUpToDate($book, 1); - $v2 = $v2 && !$this->isUpToDate($book, 2); - $html5 = $html5 && !$this->isUpToDate($book, 'html5'); + if (!$force) { + + $v1 = $v1 && !$this->isUpToDate($book, 1); + $v2 = $v2 && !$this->isUpToDate($book, 2); + $html5 = $html5 && !$this->isUpToDate($book, 'html5'); + } else { + $v1 = false; + $html5 = false; + $v2 = true; + } @@ -829,7 +836,7 @@ class wsDAOBook extends commonDAO { } if ($html5) { fb(time(), 'Compile HTML5'); - $res.=$this->compileHTML5($book_id,$book); + $res.=$this->compileHTML5($book_id, $book); $this->touchCompile($book_id, 'html5'); } if ($v1 || $v2) { @@ -1014,7 +1021,7 @@ class wsDAOBook extends commonDAO { } } - $externalsOptions = array('ongletsSWF', 'tabs2DSWF','externalChapters','externalArchives'); + $externalsOptions = array('ongletsSWF', 'tabs2DSWF', 'externalChapters', 'externalArchives'); foreach ($externalsOptions as $e) { if (isset($book->parametres->$e) && $book->parametres->$e != '') { $f = $workingDir . '/' . $book->parametres->$e; @@ -1263,8 +1270,8 @@ class wsDAOBook extends commonDAO { } } - public function compileHTML5($book_id,$book) { - $htmlCompiler = wsHTML5Compiler::factory($book_id,$book->parametres->mobileLVersion); + public function compileHTML5($book_id, $book) { + $htmlCompiler = wsHTML5Compiler::factory($book_id, $book->parametres->mobileLVersion); $htmlCompiler->compile(); } diff --git a/inc/ws/Util/html5/class.ws.html5.compiler.php b/inc/ws/Util/html5/class.ws.html5.compiler.php index 1ebc70dc4..97f41fcbf 100644 --- a/inc/ws/Util/html5/class.ws.html5.compiler.php +++ b/inc/ws/Util/html5/class.ws.html5.compiler.php @@ -36,6 +36,7 @@ class wsHTML5Compiler { 'js/libs/fluidbook/fluidbook.chapters.js', 'js/libs/fluidbook/fluidbook.help.js', 'js/libs/fluidbook/fluidbook.resize.js', + 'js/libs/fluidbook/fluidbook.coquillette.js', 'js/libs/fluidbook/fluidbook.js', 'js/main.js'); protected static $debugJsFiles = array( @@ -517,6 +518,8 @@ class wsHTML5Compiler { $this->config->optimalWidth = $this->optimalWidth; $this->config->optimalHeight = $this->optimalHeight; $this->config->chapters = $this->book->chapters; + $this->config->coquilletteBack = $this->colorToCSS($this->theme->parametres->couleurA); + $this->config->coquilletteFront = $this->colorToCSS($this->theme->parametres->arrowsColor); foreach ($this->additionalConfig as $k => $v) { $this->config->$k = $v; } @@ -938,7 +941,7 @@ class wsHTML5CompilerDev extends wsHTML5Compiler { $res[] = $shade; // Background - $body = '#main{'; + $body = '#main,#view.index{'; $body.='background-color:#' . $this->theme->parametres->backgroundColor . ';'; switch ($this->theme->parametres->repeat) { case wsTheme::REPEAT: -- 2.39.5