From: vincent@cubedesigners.com Date: Thu, 4 Oct 2018 12:50:33 +0000 (+0000) Subject: wip #2227 @0:10 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=b69063612d7a7a4a4f455201539a7c8a4a0bc929;p=cubeextranet.git wip #2227 @0:10 --- diff --git a/inc/ws/Controlleur/class.ws.url.php b/inc/ws/Controlleur/class.ws.url.php index dcef8b5c1..a4c7d7cfe 100644 --- a/inc/ws/Controlleur/class.ws.url.php +++ b/inc/ws/Controlleur/class.ws.url.php @@ -135,7 +135,7 @@ class wsUrl } if ($book->version > 1 || $droits->admin) { $types = []; - if (!$book->parametres->scorm_enable && !$book->parametres->alwaysHTML5) { + if (!$book->parametres->alwaysHTML5) { $types[] = 'flash'; $defaultPlayer = 'viewer'; } else { 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 e2d0cf7a1..185b03989 100644 --- a/inc/ws/Util/html5/master/class.ws.html5.links.php +++ b/inc/ws/Util/html5/master/class.ws.html5.links.php @@ -32,6 +32,7 @@ class wsHTML5Link public $rot; public $class; public $uid; + public $scorm; public $zindex = 4; protected $_init; @@ -51,6 +52,8 @@ class wsHTML5Link */ public static function getInstance($id, $init, &$compiler) { + $init['scorm'] = (stristr($init['to'], 'scorm') || stristr($init['alternative'], 'scorm')); + switch ($init['type']) { case 1: case 2: @@ -240,7 +243,7 @@ class wsHTML5Link public function getHTMLContainer() { - return '
getAdditionnalContent() . '>' . $this->getHTMLContent() . '
'; + return '
getAdditionnalContent() . '>' . $this->getHTMLContent() . '
'; } public function getHTMLContainerClass() @@ -1484,21 +1487,21 @@ class haguenauManifLink extends internalLink class zoomLink extends normalLink { - protected $maxzoom_default = 2; + protected $maxzoom_default = 2; public function getHTMLContainerClass() { - $class = ' zoomarea'; + $class = ' zoomarea'; - $groups = explode(',', $this->group); + $groups = explode(',', $this->group); - // If there's more than one group assigned, this link shouldn't be clickable (disabled via CSS) - // This needs to be set here (parent element) instead of on the actual link so we don't end up with a dead zone - if (count($groups) > 1) { - $class .= ' pointer-events-none'; - } + // If there's more than one group assigned, this link shouldn't be clickable (disabled via CSS) + // This needs to be set here (parent element) instead of on the actual link so we don't end up with a dead zone + if (count($groups) > 1) { + $class .= ' pointer-events-none'; + } - return parent::getHTMLContainerClass() . $class; + return parent::getHTMLContainerClass() . $class; } public function getDefaultTooltip() @@ -1515,17 +1518,17 @@ class zoomLink extends normalLink { $res = parent::getAdditionnalContent(); - $res .= ' id="'. $this->uid .'"'; + $res .= ' id="' . $this->uid . '"'; // Data attributes $attributes = [ 'maxzoom' => empty($this->to) ? $this->maxzoom_default : $this->to, - 'group' => $this->group, - 'group-count' => empty($this->group) ? 0 : count(explode(',', $this->group)), + 'group' => $this->group, + 'group-count' => empty($this->group) ? 0 : count(explode(',', $this->group)), 'width' => round($this->width), 'height' => round($this->height), - 'x' => round($this->left), - 'y' => round($this->top) + 'x' => round($this->left), + 'y' => round($this->top) ]; // Set data attributes @@ -1603,15 +1606,15 @@ class zoomLink extends normalLink public function getClasses() { - // Assign CSS classes for all groups so we can match and group them via JS - $groups = explode(',', $this->group); - $group_classes = []; + // Assign CSS classes for all groups so we can match and group them via JS + $groups = explode(',', $this->group); + $group_classes = []; - foreach ($groups as $group) { - if (empty($group)) continue; + foreach ($groups as $group) { + if (empty($group)) continue; - $group_classes[] = 'zoom-group-' . trim($group); - } + $group_classes[] = 'zoom-group-' . trim($group); + } return array_merge($group_classes, ['zoomPopup'], parent::getClasses()); }