From 4c02d83da8936dc25b8553fe863a26b73ba799fe Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Wed, 31 May 2017 17:12:28 +0000 Subject: [PATCH] #1388 --- inc/ws/Util/html5/class.ws.html5.php | 1 + .../html5/menus/class.ws.html5.compiler.php | 6 ++---- .../Util/html5/menus/class.ws.html5.links.php | 19 +++++++++---------- 3 files changed, 12 insertions(+), 14 deletions(-) diff --git a/inc/ws/Util/html5/class.ws.html5.php b/inc/ws/Util/html5/class.ws.html5.php index d08bf868e..dbfaba7e8 100644 --- a/inc/ws/Util/html5/class.ws.html5.php +++ b/inc/ws/Util/html5/class.ws.html5.php @@ -23,6 +23,7 @@ class wsHTML5 { $files = array('class.ws.html5.compiler.php', 'class.ws.html5.links.php'); foreach ($files as $file) { + if (file_exists($branchDir . $file)) { require_once $branchDir . $file; } else { diff --git a/inc/ws/Util/html5/menus/class.ws.html5.compiler.php b/inc/ws/Util/html5/menus/class.ws.html5.compiler.php index 81f9c6cec..c31120832 100644 --- a/inc/ws/Util/html5/menus/class.ws.html5.compiler.php +++ b/inc/ws/Util/html5/menus/class.ws.html5.compiler.php @@ -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) . ';}'; diff --git a/inc/ws/Util/html5/menus/class.ws.html5.links.php b/inc/ws/Util/html5/menus/class.ws.html5.links.php index b54ef1bf6..738d2c926 100644 --- a/inc/ws/Util/html5/menus/class.ws.html5.links.php +++ b/inc/ws/Util/html5/menus/class.ws.html5.links.php @@ -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 = ''; + $alt = ''; 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 = '
'; + $markup = '
'; 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 ''; + return ''; } public function getEmbedURL() { @@ -751,12 +750,12 @@ class htmlMultimediaLink extends wsHTML5Link { $iw = $this->_config['width']; $ih = $this->_config['height']; - $res = ''; + $res = ''; } if (isset($externalIframe)) { $iw = $this->_config['width']; $ih = $this->_config['height']; - $res = ''; + $res = ''; } foreach ($this->_config['inject'] as $i) { -- 2.39.5