]> _ Git - cubeextranet.git/commitdiff
#1388
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Wed, 31 May 2017 17:12:28 +0000 (17:12 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Wed, 31 May 2017 17:12:28 +0000 (17:12 +0000)
inc/ws/Util/html5/class.ws.html5.php
inc/ws/Util/html5/menus/class.ws.html5.compiler.php
inc/ws/Util/html5/menus/class.ws.html5.links.php

index d08bf868e2625cc7374d6309d006eb374580c7df..dbfaba7e8ee1e4dad151ea880f1ab085530b3bc1 100644 (file)
@@ -23,6 +23,7 @@ class wsHTML5 {
                $files = array('class.ws.html5.compiler.php', 'class.ws.html5.links.php');\r
 \r
                foreach ($files as $file) {\r
+\r
                        if (file_exists($branchDir . $file)) {\r
                                require_once $branchDir . $file;\r
                        } else {\r
index 81f9c6cec812e574eb3823f38ec03b59b57709ce..c31120832022ae11b81ee2ad8a1cfc869098d585 100644 (file)
@@ -1251,6 +1251,7 @@ class wsHTML5Compiler {
                $lessVariables['menu-field-background'] = wsHTML5::colorToCSS($this->theme->parametres->subFieldColor);
                $lessVariables['menu-field-text'] = wsHTML5::colorToCSS($this->theme->parametres->subTextFieldColor);
 
+
                $menuMultiply = $menuColor->multiply($menuColor);
                $menuMultiply2 = $menuMultiply->multiply($menuColor);
 
@@ -1264,10 +1265,7 @@ class wsHTML5Compiler {
                # Index
                $ratio = $this->width / $this->height;
                $thumbh = round(100 / $ratio);
-               $res[] = '#indexView .thumb img{width:100px;height:' . $thumbh . 'px;}';
-               $res[] = '#indexView .doubleThumb{height:' . $thumbh . 'px;' . wsHTML5::writeCSSUA('box-shadow', '0 0 3px ' . $shadowColor) . '}';
-               $res[] = '#indexView .doubleThumb .overlay{height:' . $thumbh . 'px;}';
-               $res[] = '#indexView .doubleThumb .hits.yes{background-color:' . wsHTML5::colorToCSS($this->theme->parametres->subSelectColor) . ';color:' . wsHTML5::colorToCSS($this->theme->parametres->subTextSelectColor) . '}';
+               $lessVariables['thumb-height'] = $thumbh . 'px';
 
                # Tooltip
                $res[] = '#tooltip{background-color:' . wsHTML5::colorToCSS($this->theme->parametres->tooltipBackColor) . ';color:' . wsHTML5::colorToCSS($this->theme->parametres->tooltipTextColor) . ';}';
index b54ef1bf6d5c647374d85227e61267183a7902e5..738d2c926ba38b251a5a4643a6d40f0322163f9b 100644 (file)
@@ -361,10 +361,10 @@ class htmlMultimediaImage extends wsHTML5Link {
        }
 
        public function getHTMLContent() {
-               $w = $this->width * $this->getCssScale();
-               $h = $this->height * $this->getCssScale();
+               $w = $this->width;
+               $h = $this->height;
                $this->copyExternalFile($this->alternative);
-               $alt = '<img src="' . wsHTML5Link::getUniversalLocation($this->alternative) . '" width="' . $w . '" height="' . $h . '" />';
+               $alt = '<img data-width="' . $w . '" data-height="' . $h . '" src="' . wsHTML5Link::getUniversalLocation($this->alternative) . '" width="' . $w . '" height="' . $h . '" />';
                return $alt;
        }
 
@@ -378,7 +378,7 @@ class htmlMultimediaPopupLink extends htmlMultimediaPopupImage {
                $i['width'] = $i['video_width'];
                $i['height'] = $i['video_height'];
 
-               $l = wsHTML5Link::getMultimediaInstance($this->id . '_content', $i, $this->compiler);
+               $l = self::getMultimediaInstance($this->id . '_content', $i, $this->compiler);
                $markup = $l->getHTMLContainer();
                return ' data-multimedia="' . rawurlencode($markup) . '" ';
        }
@@ -394,7 +394,7 @@ class htmlMultimediaPopupImage extends normalLink {
 
        public function getAdditionnalContent() {
                $dim = getimagesize($this->wdir . '/' . $this->alternative);
-               $markup = '<div class="multimediaContainer"><img src="' . wsHTML5Link::getUniversalLocation($this->alternative) . '" width="' . $dim[0] . '" height="' . $dim[1] . '" class="multimedia" /></div>';
+               $markup = '<div  class="multimediaContainer"><img data-width="' . $dim[0] . '" data-height="' . $dim[1] . '" src="' . wsHTML5Link::getUniversalLocation($this->alternative) . '" width="' . $dim[0] . '" height="' . $dim[1] . '" class="multimedia" /></div>';
                return ' data-multimedia="' . rawurlencode($markup) . '" ';
        }
 
@@ -531,7 +531,6 @@ class videoLink extends wsHTML5Link {
                if (!is_null($w) && !is_null($h)) {
                        $res .= 'data-width="' . $w . '" data-height="' . $h . '" ';
                } else if (!is_null($compiler)) {
-
                        $path = WS_BOOKS . '/working/' . $compiler->book_id . '/' . $basename . '.jpg';
                        $dim = getimagesize($path);
                        $res .= 'data-width="' . $dim[0] . '" data-height="' . $dim[1] . '" ';
@@ -560,7 +559,7 @@ class videoPopupLink extends normalLink {
        }
 
        public function getAdditionnalContent() {
-               return ' data-video="' . rawurlencode(videoLink::makeVideoTag($this, $this->video_width, $this->video_height, $this->compiler)) . '" ';
+               return ' data-video="' . rawurlencode(videoLink::makeVideoTag($this, null, null, $this->compiler)) . '" ';
        }
 
        public function keep() {
@@ -606,7 +605,7 @@ class webVideoLink extends videoLink {
        }
 
        public function getEmbed() {
-               return '<iframe width="' . $this->width * $this->getCssScale() . '" height="' . $this->height * $this->getCssScale() . '" src="' . $this->getEmbedURL() . '" frameborder="0" allowfullscreen></iframe>';
+               return '<iframe width="' . $this->width . '" height="' . $this->height . '" src="' . $this->getEmbedURL() . '" frameborder="0" allowfullscreen></iframe>';
        }
 
        public function getEmbedURL() {
@@ -751,12 +750,12 @@ class htmlMultimediaLink extends wsHTML5Link {
                                $iw = $this->_config['width'];
                                $ih = $this->_config['height'];
 
-                               $res = '<iframe width="' . $iw . '" height="' . $ih . '" src="' . $this->_url . '" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" allowfullscreen mozallowfullscreen="true" webkitallowfullscreen="true" onmousewheel=""></iframe>';
+                               $res = '<iframe data-width="' . $iw . '" data-height="' . $ih . '" width="' . $iw . '" height="' . $ih . '" src="' . $this->_url . '" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" allowfullscreen mozallowfullscreen="true" webkitallowfullscreen="true" onmousewheel=""></iframe>';
                        }
                        if (isset($externalIframe)) {
                                $iw = $this->_config['width'];
                                $ih = $this->_config['height'];
-                               $res = '<iframe width="' . $iw . '" height="' . $ih . '" src="' . $externalIframe . '" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" allowfullscreen mozallowfullscreen="true" webkitallowfullscreen="true" onmousewheel=""></iframe>';
+                               $res = '<iframe data-width="' . $iw . '" data-height="' . $ih . '"  width="' . $iw . '" height="' . $ih . '" src="' . $externalIframe . '" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" allowfullscreen mozallowfullscreen="true" webkitallowfullscreen="true" onmousewheel=""></iframe>';
                        }
 
                        foreach ($this->_config['inject'] as $i) {