]> _ Git - cubeextranet.git/commitdiff
(no commit message)
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Mon, 5 Nov 2012 15:39:35 +0000 (15:39 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Mon, 5 Nov 2012 15:39:35 +0000 (15:39 +0000)
inc/ws/Util/html5/class.ws.html5.compiler.php

index 843affa2821db9c39c3d23d670ece503a7f1b22a..219af2bb1abc4b67c65e14e3ae98a6758387751c 100644 (file)
@@ -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);