From 73c1f55a007f284bcd47440e59c714a98dccba54 Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Mon, 5 Nov 2012 15:39:35 +0000 Subject: [PATCH] --- inc/ws/Util/html5/class.ws.html5.compiler.php | 25 ++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/inc/ws/Util/html5/class.ws.html5.compiler.php b/inc/ws/Util/html5/class.ws.html5.compiler.php index 843affa28..219af2bb1 100644 --- a/inc/ws/Util/html5/class.ws.html5.compiler.php +++ b/inc/ws/Util/html5/class.ws.html5.compiler.php @@ -481,10 +481,32 @@ class wsHTML5Compiler { $this->config->l10n = array(); $this->config->l10n['default'] = $traductions; + $this->config->defaultLang = $this->book->lang; foreach ($langs as $lang) { $this->config->l10n[$lang->lang_id] = $lang->traductions; } + $iso = l10n::getISOcodes(); + if ($this->book->parametres->multilang != '') { + $flagsDir = $this->vdir . '/images/flags'; + if (!file_exists($flagsDir)) { + mkdir($flagsDir); + } + $ml = str_replace("\r", "\n", $this->book->parametres->multilang); + $ml = str_replace("\n\n", "\n", $ml); + $e = explode("\n", $ml); + $m = array(); + foreach ($e as $l1) { + $l = explode(',', $l1); + $flag = $l[1]; + + copy(cubeMedia::getFlagFile($flag), $flagsDir . '/' . $flag . '.png'); + $l[3] = cubeText::ucfirst($iso[$l[0]]); + $m[] = implode(',', $l); + } + + $this->config->multilang = implode("\n", $m); + } } protected function writeExtras() { @@ -814,6 +836,7 @@ class wsHTML5Compiler { //Icons $res = array_merge($res, $this->writeIcons()); + $res[] = '#nav #locales{background-color:' . self::colorToCSS($this->theme->parametres->couleurI) . '}'; // Logo $logo = '#logo{'; @@ -846,7 +869,7 @@ class wsHTML5Compiler { # View $res[] = '.portrait #view{width:' . $w . ';min-height:' . $h . '}'; $res[] = '.landscape #view{width:' . $w2 . ';min-height:' . $h . '}'; - $res[] = '#view{background-color:' . self::colorToCSS($this->theme->parametres->couleurB) . ';color:' . self::colorToCSS($this->theme->parametres->subTextColor) . ';}'; + $res[] = '#view{background-color:' . self::colorToCSS($this->theme->parametres->couleurB, 1) . ';color:' . self::colorToCSS($this->theme->parametres->subTextColor) . ';}'; # Index $ratio = $this->width / $this->height; $thumbh = round(100 / $ratio); -- 2.39.5