From: vincent@cubedesigners.com Date: Fri, 5 Oct 2018 13:33:22 +0000 (+0000) Subject: wait #2228 @0:20 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=26939d62659bd95a59431e804fb27ca7aa86bf1a;p=cubeextranet.git wait #2228 @0:20 --- 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 e5a9eb117..8eee5613f 100644 --- a/inc/ws/Util/html5/master/class.ws.html5.compiler.php +++ b/inc/ws/Util/html5/master/class.ws.html5.compiler.php @@ -1010,6 +1010,7 @@ class wsHTML5Compiler } $pagesOfCustomLinks = []; + $hiddenLinks = []; foreach ($links as $linkData) { if (isset($linkData['image']) && $linkData['image'] && $linkData['type'] != 28) { @@ -1028,6 +1029,9 @@ class wsHTML5Compiler $pagesOfCustomLinks[$k][] = $linkData['page']; } } + if ($linkData['type'] == 32) { + $hiddenLinks[] = $linkData['to']; + } } $this->config->pagesOfCustomLinks = $pagesOfCustomLinks; @@ -1044,6 +1048,7 @@ class wsHTML5Compiler if (in_array($linkData['type'], $ignore)) { continue; } + $linkData['hidden'] = in_array($linkData['uid'], $hiddenLinks); if ($linkData['type'] == 28) { $this->addSEOArticle($linkData['page'], $linkData['to'], $linkData['extra'], $linkData['image']); continue; 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 185b03989..eac432eb8 100644 --- a/inc/ws/Util/html5/master/class.ws.html5.links.php +++ b/inc/ws/Util/html5/master/class.ws.html5.links.php @@ -33,6 +33,7 @@ class wsHTML5Link public $class; public $uid; public $scorm; + public $hidden = false; public $zindex = 4; protected $_init; @@ -164,6 +165,8 @@ class wsHTML5Link } else { return new iframePopupLink($id, $init, $compiler); } + case 32: + return new showLinkLink($id, $init, $compiler); default: return null; } @@ -243,7 +246,7 @@ class wsHTML5Link public function getHTMLContainer() { - return '
getAdditionnalContent() . '>' . $this->getHTMLContent() . '
'; + return '
getAdditionnalContent() . '>' . $this->getHTMLContent() . '
'; } public function getHTMLContainerClass() @@ -394,6 +397,27 @@ class normalLink extends wsHTML5Link } +class showLinkLink extends normalLink +{ + public function getURL() + { + return '#'; + } + + public function getClasses() + { + $res = parent::getClasses(); + $res[] = 'showlink'; + } + + public function getAdditionnalContent() + { + $res = parent::getAdditionnalContent(); + $res .= ' data-showid="' . $this->to . '"'; + return $res; + } +} + class tooltipLink extends normalLink { public function getClasses()