From: vincent@cubedesigners.com Date: Mon, 16 Oct 2017 16:43:15 +0000 (+0000) Subject: wip #1748 @2 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=cd6afadac54865081becc54ce5e3e74a95a07109;p=cubeextranet.git wip #1748 @2 --- diff --git a/inc/ws/Metier/class.ws.book.parametres.php b/inc/ws/Metier/class.ws.book.parametres.php index 24f2bae3e..dcc5e0f3c 100644 --- a/inc/ws/Metier/class.ws.book.parametres.php +++ b/inc/ws/Metier/class.ws.book.parametres.php @@ -22,6 +22,10 @@ class wsBookParametres extends wsParametres { $swfFilter->name = __('Animation SWF') . ' (*.swf)'; $swfFilter->extensions = '*.swf'; + $multimediaFilter = new stdClass(); + $multimediaFilter->name = __('Archive ZIP') . ' (*.zip)'; + $multimediaFilter->extension = '*.zip'; + $pdfFilter = new stdClass(); $pdfFilter->name = __('Document PDF') . ' (*.pdf)'; $pdfFilter->extensions = '*.pdf'; @@ -284,11 +288,15 @@ class wsBookParametres extends wsParametres { $this->fields['tabs2DSWF'] = array('type' => 'freefile', 'default' => '', 'editable' => true, 'label' => __('SWF pour onglets 2D'), 'grade' => 3, 'fileFilter' => $swfFilter); + + $this->fields['tabsHTML5'] = array('type' => 'freefile', 'default' => '', 'editable' => true, + 'label' => __('Onglets HTML5'), 'grade' => 3); + $this->fields['flatTabsAbsolute'] = array('type' => 'boolean', 'default' => false, "editable" => true, 'label' => __("Positionnement relatif à l'interface"), 'grade' => 5); $this->forms['tabs'] = array('label' => __('Onglets'), - 'fieldsnames' => array('ongletsSWF', 'ongletsXML', '|', 'tabs2DSWF', 'flatTabsAbsolute')); + 'fieldsnames' => array('ongletsSWF', 'ongletsXML', '|', 'tabs2DSWF', 'flatTabsAbsolute', '|', 'tabsHTML5')); $this->fields['customLinkClass'] = array('type' => 'text', 'default' => '', 'editable' => true, 'label' => __('Classe pour les liens personnalisés'), 'grade' => 5); $this->fields['permanentLinks'] = array('type' => 'boolean', 'default' => false, 'editable' => true, 'label' => __('Liens visibles en permanence'), 'grade' => 3); 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 692e9013e..e79a9fa6c 100644 --- a/inc/ws/Util/html5/master/class.ws.html5.compiler.php +++ b/inc/ws/Util/html5/master/class.ws.html5.compiler.php @@ -738,6 +738,23 @@ class wsHTML5Compiler { $daoDoc = new wsDAODocument($core->con); $daoDoc->getLinksAndRulers($this->book_id, $links, $rulers); + if ($this->book->parametres->tabsHTML5 != '') { + $links[] = [ + 'page' => 'background', + 'top' => 0, + 'left' => 0, + 'width' => 100, + 'height' => 100, + 'type' => 6, + 'to' => $this->book->parametres->tabsHTML5, + 'alternative' => $this->book->parametres->tabsHTML5, + 'image' => '', + 'inline' => 1, + 'interactive'=>1, + ]; + } + + foreach ($links as $linkData) { if (isset($linkData['image']) && $linkData['image']) { $dupData = $linkData; @@ -1253,7 +1270,7 @@ class wsHTML5Compiler { $header .= 'background-image:url(../images/' . $this->theme->parametres->menuImage . ');'; $header .= 'background-repeat:no-repeat;'; $header .= 'background-size:100% ' . $this->theme->parametres->menuHeight . 'px;'; - }else{ + } else { $header .= 'background-color:' . wsHTML5::colorToCSS($this->theme->parametres->menuColor) . ';'; } $header .= '}'; 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 548c918e4..9d26ea597 100644 --- a/inc/ws/Util/html5/master/class.ws.html5.links.php +++ b/inc/ws/Util/html5/master/class.ws.html5.links.php @@ -863,7 +863,9 @@ class htmlMultimediaLink extends wsHTML5Link { } foreach ($this->_config['inject'] as $i) { + $infos = ['path' => 'data/links/' . $this->alternative . '/']; $i = str_replace('$id', '"#l_' . $this->id . '"', $i); + $i = str_replace('$init', CubeIT_Util_Json::encode($infos), $i); $this->compiler->htmlmultimedia[] = $i; }