From: vincent@cubedesigners.com Date: Fri, 9 Jul 2021 09:34:23 +0000 (+0000) Subject: wait #4586 @0.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=0b062b3586921c99b65ea007122d1220c3a9484d;p=cubeextranet.git wait #4586 @0.5 --- diff --git a/inc/ws/Metier/class.ws.parametres.php b/inc/ws/Metier/class.ws.parametres.php index 58c234e16..58162c5d6 100644 --- a/inc/ws/Metier/class.ws.parametres.php +++ b/inc/ws/Metier/class.ws.parametres.php @@ -118,7 +118,10 @@ class wsParametres extends cubeMetier implements Iterator protected function set($varname, $value) { if (!$this->_isset($varname)) { - throw new Exception('You are setting an attribute (' . get_class($this) . '::' . $varname . ') which not exists'); + + $msg = 'You are setting an attribute (' . get_class($this) . '::' . $varname . ') which not exists'; + trigger_error($msg); + throw new Exception($msg); } if (is_null($value)) { @@ -184,7 +187,9 @@ class wsParametres extends cubeMetier implements Iterator return false; } if (!$this->_isset($varname)) { - throw new Exception('You are getting an attribute (' . get_class($this) . '::' . $varname . ') which not exists'); + $msg='You are getting an attribute (' . get_class($this) . '::' . $varname . ') which not exists'; + trigger_error($msg); + throw new Exception($msg); } if (!isset($this->datas[$varname]) || is_null($this->datas[$varname])) { return $this->getDefault($varname); diff --git a/inc/ws/Util/html5/master/class.ws.html5.compiler.php b/inc/ws/Util/html5/master/class.ws.html5.compiler.php index 3084618b3..3f56205e9 100644 --- a/inc/ws/Util/html5/master/class.ws.html5.compiler.php +++ b/inc/ws/Util/html5/master/class.ws.html5.compiler.php @@ -854,6 +854,7 @@ class wsHTML5Compiler $this->writeExtras(); $this->log('Extras written'); $this->populateConfig(); + $this->log('Config populated'); $this->writeCSS($linksCSS); $this->log('CSS written'); $this->writeIndex(); @@ -1259,11 +1260,11 @@ height="0" width="0" style="display:none;visibility:hidden"> $favicon = ''; $hasIos = false; - if ($iosico = $this->checkThemeImage($this->theme->parametres->iosicon)) { - $hasIos = true; - $this->vdir->copy($iosico, 'data/apple-touch-icon.png'); - $favicon .= '' . "\n\t"; - } + //if ($iosico = $this->checkThemeImage($this->theme->parametres->iosicon)) { + // $hasIos = true; + // $this->vdir->copy($iosico, 'data/apple-touch-icon.png'); + // $favicon .= '' . "\n\t"; + //} if ($this->theme->parametres->favicon != '') { $pngFile = $this->checkThemeImage($this->theme->parametres->favicon); @@ -1349,6 +1350,7 @@ height="0" width="0" style="display:none;visibility:hidden"> protected function writeIndex() { $iv = $this->getIndexVars(); + $this->log('Got index vars'); foreach ($iv as $k => $v) { $this->seo->html = str_replace($k, $v, $this->seo->html); } @@ -2305,6 +2307,8 @@ height="0" width="0" style="display:none;visibility:hidden"> $this->lessVariables['slider-thumb-background'] = wsHTML5::colorToCSS($this->theme->parametres->pageBarThumbBack); $this->lessVariables['pages-background'] = $this->book->parametres->forceWhiteBackground ? '#ffffff' : 'transparent'; + $this->log('CSS 1'); + // General theme $cssWidth = $this->cssWidth; $cssHeight = $this->cssHeight; @@ -2331,22 +2335,25 @@ height="0" width="0" style="display:none;visibility:hidden"> $this->lessVariables['book-page-correct-width'] = $w; $this->lessVariables['book-page-correct-height'] = $h; } + + $this->log('CSS 2'); $this->lessVariables['book-page-height'] = $h; $this->lessVariables['book-page-ratio'] = floatval($w) / floatval($h); $this->lessVariables['page-shade-opacity'] = min(1, $this->theme->parametres->shadeAlpha / 50); $this->lessVariables['shadow-opacity'] = wsHTML5::colorToArray($this->theme->parametres->bookShadeColor)['opacity'] * 1.2; $this->lessVariables['edges-display'] = $this->_lessBoolean($this->theme->parametres->usePageEdges); - $this->lessVariables['edge-left-offset'] = $this->theme->parametres->pageEdgeLeftOffset; - $this->lessVariables['edge-right-offset'] = $this->theme->parametres->pageEdgeRightOffset; - $this->lessVariables['edges-opacity'] = $this->theme->parametres->pageEdgeOpacity / 100; + $this->lessVariables['edge-left-offset'] = 0; + $this->lessVariables['edge-right-offset'] = 0; + $this->lessVariables['edges-opacity'] = 1; + $this->lessVariables['page-number-color'] = wsHTML5::colorToCSS($this->theme->parametres->colorPageNumber); $this->lessVariables['display-page-number'] = $this->_lessBoolean($this->theme->parametres->displayPageNumber); $this->lessVariables['page-transition-duration'] = $this->book->parametres->mobileTransitionDuration . 's'; $corrText = $this->isMobileFirst() ? 0 : 4; - + $this->log('CSS 3'); if ($this->cssSVGScale != 1) { $texts = '.texts{' . wsHTML5::writeCSSUA('transform-origin', 'top left') . ';'; $texts .= wsHTML5::writeCSSUA('transform', 'scale(' . round((1 / $this->multiply) * $cssScale * $this->cssSVGScale, 3) . ')') . ';'; @@ -2371,7 +2378,7 @@ height="0" width="0" style="display:none;visibility:hidden"> // Background $res[] = $this->_cssBackground(); - + $this->log('CSS 4'); // Archives // Header $header = 'header{'; @@ -2387,7 +2394,7 @@ height="0" width="0" style="display:none;visibility:hidden"> } $header .= '}'; $res[] = $header; - + $this->log('CSS 5'); // Logo $logo = '#logo{'; if ($l = $this->checkThemeImage($this->theme->parametres->logo)) { @@ -2400,7 +2407,7 @@ height="0" width="0" style="display:none;visibility:hidden"> // Credits $res[] = 'footer,footer a{color:' . wsHTML5::colorToCSS($this->theme->parametres->creditsColor) . ';}'; - + $this->log('CSS 6'); // Arrows $this->lessVariables['arrows-background'] = wsHTML5::colorToCSS($this->theme->parametres->couleurA); $this->lessVariables['arrows-color'] = wsHTML5::colorToCSS($this->theme->parametres->arrowsColor); @@ -2412,7 +2419,7 @@ height="0" width="0" style="display:none;visibility:hidden"> // Audio description buttons $this->lessVariables['audiodescription-background'] = wsHTML5::colorToCSS($this->theme->parametres->couleurA); $this->lessVariables['audiodescription-color'] = wsHTML5::colorToCSS($this->theme->parametres->couleurA); - + $this->log('CSS 7'); // Links Styles $this->lessVariables['links-color'] = wsHTML5::colorToCSS($this->theme->parametres->linksColor); $this->lessVariables['inlineslideshow-transition-time'] = (floatval($this->book->parametres->inlineSlideshowTransitionDuration) * 1000) . 'ms'; @@ -2424,7 +2431,7 @@ height="0" width="0" style="display:none;visibility:hidden"> if (!isset($this->book->parametres->bookmarkCornerSize)) { $this->book->parametres->bookmarkCornerSize = 10; } - + $this->log('CSS 8'); $this->lessVariables['bookmark-star-disabled-color'] = wsHTML5::colorToCSS($this->theme->parametres->bookmarkStarDisabledColor); $this->lessVariables['bookmark-star-enabled-color'] = wsHTML5::colorToCSS($this->theme->parametres->bookmarkStarEnabledColor); $this->lessVariables['bookmark-color'] = wsHTML5::colorToCSS($this->theme->parametres->bookmarkBackgroundColor); @@ -2447,7 +2454,7 @@ height="0" width="0" style="display:none;visibility:hidden"> $this->lessVariables['menu-background-blue'] = 'max(45, min(255-45, blue(@menu-background)))'; $this->lessVariables['menu-button-background'] = 'overlay(rgb(@menu-background-red, @menu-background-green, @menu-background-blue), #c0c0c0)'; } - + $this->log('CSS 9'); $this->lessVariables['menu-text'] = $menuTextColor; $this->lessVariables['menu-field-background'] = wsHTML5::colorToCSS($this->theme->parametres->subFieldColor); $this->lessVariables['menu-field-text'] = wsHTML5::colorToCSS($this->theme->parametres->subTextFieldColor); @@ -2455,7 +2462,7 @@ height="0" width="0" style="display:none;visibility:hidden"> $this->lessVariables['menu-select-text'] = wsHTML5::colorToCSS($this->theme->parametres->subTextSelectColor); $this->lessVariables['icon-color'] = wsHTML5::colorToCSS($this->theme->parametres->couleurI); $this->lessVariables['menu-overlay'] = wsHTML5::colorToCSS($this->theme->parametres->popupVideoOverlay); - + $this->log('CSS 10'); // Chapters $this->lessVariables['menu-chapters-columns-count'] = max(1, min(6, $this->book->parametres->chaptersColumns)); $this->lessVariables['menu-chapters-columns-width'] = $this->book->parametres->chaptersColMaxWidth; @@ -2477,7 +2484,7 @@ height="0" width="0" style="display:none;visibility:hidden"> $this->vdir->copy($this->wdir . '/' . $this->book->parametres->externalArchivesBack, 'data/images/' . $this->book->parametres->externalArchivesBack); $res[] = '.mview.archives{background-image:url("../images/' . $this->book->parametres->externalArchivesBack . '");}'; } - + $this->log('CSS 11'); # Index $thumbw = $this->book->parametres->mobileNavigationType === 'portrait' ? 200 : 100; $this->lessVariables['thumb-width'] = $thumbw . 'px'; @@ -2492,7 +2499,7 @@ height="0" width="0" style="display:none;visibility:hidden"> $this->lessVariables['tooltip-background'] = wsHTML5::colorToCSS($this->theme->parametres->tooltipBackColor); $this->lessVariables['tooltip-color'] = wsHTML5::colorToCSS($this->theme->parametres->tooltipTextColor); $this->lessVariables['tooltip-font-size'] = 14 * ($this->theme->parametres->tooltipTextSize / 100); - + $this->log('CSS 12'); #Videos if ($this->book->parametres->bigPlayImage) { $this->lessVariables['video-bigplay-image'] = '~"../data/links/' . $this->book->parametres->bigPlayImage . '"'; @@ -2509,7 +2516,7 @@ height="0" width="0" style="display:none;visibility:hidden"> if ($this->book->parametres->textPopupStylesheet) { $res[] = file_get_contents($this->wdir . '/' . $this->book->parametres->textPopupStylesheet); } - + $this->log('CSS 13'); $this->_writeLess($this->lessVariables, $lessContents); $this->stylesheets[] = 'data/style/style.css'; $this->vdir->file_put_contents('data/style/style.css', implode("\n", $res)); diff --git a/inc/ws/Util/html5/master/class.ws.html5.links.php b/inc/ws/Util/html5/master/class.ws.html5.links.php index acac53a8a..69108a61c 100644 --- a/inc/ws/Util/html5/master/class.ws.html5.links.php +++ b/inc/ws/Util/html5/master/class.ws.html5.links.php @@ -788,6 +788,10 @@ class showLinkLink extends normalLink class tooltipLink extends normalLink { + public $backgroundColor; + public $color; + public $tooltipMaxWidth; + public function getClasses() { return array_merge(array('lazy'), parent::getClasses()); @@ -1425,7 +1429,7 @@ class webVideoLink extends videoLink } } - public static function makeVideoTag($link, $width, $height, $compiler) + public static function makeVideoTag($link, $width, $height, $compiler = null) { if ($link->video_service == 0) { return parent::makeVideoTag($link, $width, $height, $compiler);