From: vincent@cubedesigners.com Date: Wed, 4 May 2022 10:23:27 +0000 (+0000) Subject: wip #5250 @0.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=805a51fcb1bbbb30af42870a4b25f2e74bbbfd8c;p=cubeextranet.git wip #5250 @0.5 --- 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 35159e8f8..a26040657 100644 --- a/inc/ws/Util/html5/master/class.ws.html5.compiler.php +++ b/inc/ws/Util/html5/master/class.ws.html5.compiler.php @@ -2093,11 +2093,12 @@ height="0" width="0" style="display:none;visibility:hidden"> $dupData['interactive'] = false; $dupData['alternative'] = $linkData['animation']; $dupData['type'] = 6; - $dupData['uid'] = 'a_' . $linkData['uid']; + $linkData['relatedAnimation'] = $dupData['uid'] = 'a_' . $linkData['uid']; $dupData['video_width'] = $dupData['video_height'] = 0; if (wsHTML5Link::isScorm($linkData)) { $dupData['scorm'] = true; } + $links[$k] = $linkData; array_push($links, $dupData); } if ($linkData['type'] == 7) { 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 eacba54a8..ccfb40e90 100644 --- a/inc/ws/Util/html5/master/class.ws.html5.links.php +++ b/inc/ws/Util/html5/master/class.ws.html5.links.php @@ -54,9 +54,10 @@ class wsHTML5Link public $parallax = 0; public $attachLeft = false; public $allowsAnimation = true; + public $relatedAnimation = ''; public $forceTexture = false; public $letterspacing = 0; - public $backgroundColor=null; + public $backgroundColor = null; protected $role = 'button'; @@ -586,6 +587,9 @@ class wsHTML5Link public function getHTMLContainer() { $addContent = $this->getAdditionnalContent(); + if ($this->relatedAnimation) { + $addContent .= ' data-related-animation="' . $this->relatedAnimation . '"'; + } return '
' . $this->getHTMLContent() . '
'; } @@ -1147,9 +1151,9 @@ class htmlMultimediaPopupImage extends normalLink $res = parent::getAdditionnalContent(); $dim = CubeIT_Image::getimagesize($this->wdir . '/' . $this->alternative); - $bg=null===$this->backgroundColor?'':' style="background-color:'.$this->backgroundColor.';"'; + $bg = null === $this->backgroundColor ? '' : ' style="background-color:' . $this->backgroundColor . ';"'; - $markup = '
'; + $markup = '
'; $read = ''; if ($this->read_mode) { $read = ' data-readmode="1"'; @@ -2848,7 +2852,7 @@ class zoomLink extends normalLink $p = wsDAOBook::getDocumentPage($compiler->book_id, $attributes['page']); $pdfpath = wsDocument::getDir($p['document_id']) . '/pdf/p' . $p['document_page'] . '.pdf'; $extractPage = 1; - if(!file_exists($pdfpath)){ + if (!file_exists($pdfpath)) { $pdfpath = wsDocument::getDir($p['document_id']) . '/crop.pdf'; $extractPage = $p['document_page']; } @@ -2858,7 +2862,6 @@ class zoomLink extends normalLink } - $left = CubeIT_Files::tempnam(); $leftfile = CubeIT_CommandLine_Poppler::extractArea($pdfpath, $extractPage, @@ -2870,7 +2873,7 @@ class zoomLink extends normalLink $p = wsDAOBook::getDocumentPage($compiler->book_id, $attributes['page'] + 1); $pdfpath = wsDocument::getDir($p['document_id']) . '/pdf/p' . $p['document_page'] . '.pdf'; $extractPage = 1; - if(!file_exists($pdfpath)){ + if (!file_exists($pdfpath)) { $pdfpath = wsDocument::getDir($p['document_id']) . '/crop.pdf'; $extractPage = $p['document_page']; }