]> _ Git - cubeextranet.git/commitdiff
wip #1748 @2
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Mon, 16 Oct 2017 16:43:15 +0000 (16:43 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Mon, 16 Oct 2017 16:43:15 +0000 (16:43 +0000)
inc/ws/Metier/class.ws.book.parametres.php
inc/ws/Util/html5/master/class.ws.html5.compiler.php
inc/ws/Util/html5/master/class.ws.html5.links.php

index 24f2bae3e986b9e87eb441e28eada6fa12b48e5b..dcc5e0f3c715f31317f8645acbc009469728547b 100644 (file)
@@ -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);
index 692e9013e4d6214c8aed94562076dda9518deb09..e79a9fa6cd1039741a0161feb637484b64794d26 100644 (file)
@@ -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 .= '}';
index 548c918e49c021e9c8cbebe5edb37d504fd3eda6..9d26ea5974c1c591fd2ca44c9f3178f219617db3 100644 (file)
@@ -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;
                        }