]> _ Git - cubeextranet.git/commitdiff
(no commit message)
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Thu, 24 Jan 2013 10:40:39 +0000 (10:40 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Thu, 24 Jan 2013 10:40:39 +0000 (10:40 +0000)
inc/ws/Util/class.ws.tools.php
inc/ws/Util/html5/class.ws.html5.compiler.php

index 68634bae3837336850ffca172a3968c19aa7f54c..06c6de7da99f3508533255cd5cee690309d43d49 100644 (file)
@@ -25,15 +25,25 @@ class wsTools {
        public static function colorizeAndRasterizeIcon($iconSet, $icon, $color, $dest, $scale, &$w, &$h) {
                // Init directory
                $color = ltrim($color, '#');
-               $dirColorized = WS_ICONS . '/' . $iconSet . '/mobile/' . $color . '/';
+
+               $e = explode('-', $icon);
+               $nav = ($e[0] != 'share');
+
+               if ($nav) {
+                       $dirColorized = WS_ICONS . '/' . $iconSet . '/mobile/' . $color . '/';
+                       $svgRef = WS_ICONS . '/' . $iconSet . '/mobile/' . $icon . '.svg';
+                       $svgColorized = $dirColorized . '/' . $icon . '.svg';
+               } else {
+                       $dirColorized = WS_ICONS . '/share/' . $color;
+                       $svgRef = WS_ICONS . '/share/' . $icon . '.svg';
+                       $svgColorized = $dirColorized . '/' . $icon . '.svg';
+               }
                if (!file_exists($dirColorized)) {
                        mkdir($dirColorized, 0777, true);
                }
 
 
                // SVG
-               $svgRef = WS_ICONS . '/' . $iconSet . '/mobile/' . $icon . '.svg';
-               $svgColorized = $dirColorized . '/' . $icon . '.svg';
 
                if (!file_exists($svgColorized) || filemtime($svgColorized) <= filemtime($svgRef)) {
                        $svg = file_get_contents($svgRef);
index bb5a9544c1ae0a0299901a53260bd8c0fdd01052..ef256ca6cdb0aeb5d673f4d4e4a16b8b8e2a155f 100644 (file)
@@ -750,12 +750,13 @@ class wsHTML5Compiler {
                        'next' => $arrowsColor, 'previous' => $arrowsColor, 'search' => $couleurI,
                        'help-fingers' => $couleurI, 'help-mouse' => $couleurI, 'nav-home' => $couleurI, 'nav-archives' => $couleurI, 'nav-map' => $couleurI,
                        'nav-tag' => $couleurI, 'nav-print' => $couleurI, 'nav-friend' => $couleurI,
-                       'nav-facebook' => $couleurM, 'nav-twitter' => $couleurM, 'nav-email' => $couleurM);
+                       'share-facebook' => $couleurM, 'share-twitter' => $couleurM, 'share-email' => $couleurM, 'share-googleplus' => $couleurM, 'share-linkedin' => $couleurM, 'share-viadeo' => $couleurM);
 
                $this->config->iconsDimensions = array();
                foreach ($icons as $icon => $color) {
 
                        wsTools::colorizeAndRasterizeIcon($this->theme->parametres->iconSet, $icon, $color, $this->vdir . '/data/images/', 4, $w, $h);
+
                        $this->config->iconsDimensions[$icon] = array($w, $h);
                }
                return $res;