From f1cbeef1c8da4bcc74b84c80b9cebf8a8faaa830 Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Fri, 14 Jun 2013 08:07:05 +0000 Subject: [PATCH] --- inc/ws/Metier/class.ws.book.parametres.php | 3 +- inc/ws/Util/html5/class.ws.html5.compiler.php | 43 +++++++++++++++---- 2 files changed, 37 insertions(+), 9 deletions(-) diff --git a/inc/ws/Metier/class.ws.book.parametres.php b/inc/ws/Metier/class.ws.book.parametres.php index 3919055c8..7edf2a307 100644 --- a/inc/ws/Metier/class.ws.book.parametres.php +++ b/inc/ws/Metier/class.ws.book.parametres.php @@ -292,9 +292,10 @@ class wsBookParametres extends wsParametres { $this->fields['mobileVideosPath'] = array('type' => 'text', 'default' => '', 'editable' => true, 'label' => __('Chemin vers les vidéos'), 'grade' => 5); $this->fields['mobileExtraXSpace'] = array('type' => 'integer', 'default' => '0', 'editable' => true, 'label' => __('Marge supplémentaire horizontale'), 'grade' => 3); + $this->fields['mobileNavScale'] = array('type' => 'integer', 'default' => '100', 'editable' => true, 'label' => __('Taille du menu (en %)'), 'grade' => 3); $this->forms['mobile'] = array('label' => __('Version mobile'), - 'fieldsnames' => array('mobileLVersion', 'mobileVersion', 'mobileNavigationType', '|', 'mobileTransitions', 'mobileTransitionDuration', '|', 'navOrderH', '|', 'mobileIconVector', 'mobileServerConfig', 'mobilePlugins', '|', 'mobileVideosPath', '|', 'mobileExtraXSpace')); + 'fieldsnames' => array('mobileLVersion', 'mobileVersion', 'mobileNavigationType','|','mobileNavScale', '|', 'mobileTransitions', 'mobileTransitionDuration', '|', 'navOrderH', '|', 'mobileIconVector', 'mobileServerConfig', 'mobilePlugins', '|', 'mobileVideosPath', '|', 'mobileExtraXSpace')); $this->fields['phonegapId'] = array('type' => 'text', 'default' => 'com.fluidbook.phonegap.$id', 'editable' => true, 'label' => __("Identifiant de l'identifiant"), 'grade' => 5, 'hint' => __('De la forme') . ' com.fluidbook.phonegap.xxxxx'); $this->fields['phonegapVersion'] = array('type' => 'text', 'default' => '1.0.0', 'editable' => true, 'label' => __("Version de l'application"), 'grade' => 5, 'hint' => __('De la forme') . ' 1.2.3'); diff --git a/inc/ws/Util/html5/class.ws.html5.compiler.php b/inc/ws/Util/html5/class.ws.html5.compiler.php index a9f1ed5ac..f2d4b315f 100644 --- a/inc/ws/Util/html5/class.ws.html5.compiler.php +++ b/inc/ws/Util/html5/class.ws.html5.compiler.php @@ -35,6 +35,8 @@ class wsHTML5Compiler { 'js/libs/jquery/jquery.hashchange.js', 'js/libs/jquery/jquery.scrollto.js', 'js/libs/jquery/jquery.localscroll.js', + 'js/libs/gsap/TweenMax.js', + 'js/libs/gsap/jquery.gsap.js', 'js/libs/fluidbook/fluidbook.utils.js', 'js/libs/fluidbook/fluidbook.support.js', 'js/libs/fluidbook/fluidbook.video.js', @@ -512,7 +514,14 @@ class wsHTML5Compiler { $print = $this->writePrint(); - $vars = array('titre', 'credits', 'ga', 'style', 'script', 'pagesContents', 'description', 'print', 'hiddenContents'); + $splash = ''; + if ($this->theme->parametres->logoLoader) { + $dim = getimagesize($this->themeRoot . '/' . $this->theme->parametres->logoLoader); + $this->copy($this->themeRoot . '/' . $this->theme->parametres->logoLoader, $this->vdir . '/data/images/' . $this->theme->parametres->logoLoader); + $splash.=''; + } + + $vars = array('titre', 'credits', 'ga', 'style', 'script', 'pagesContents', 'description', 'print', 'hiddenContents', 'splash'); foreach ($vars as $v) { $html = str_replace('', $$v, $html); } @@ -540,13 +549,13 @@ class wsHTML5Compiler { $thtml = $uhtml; - $vars = array('titre', 'credits', 'ga', 'style', 'script', 'pagesContents', 'print', 'hiddenContents'); + $vars = array('titre', 'credits', 'ga', 'style', 'script', 'pagesContents', 'print', 'hiddenContents', 'splash'); foreach ($vars as $v) { $uhtml = str_replace('', $$v, $uhtml); } $script.="\n\t\t" . ''; - $vars = array('titre', 'credits', 'ga', 'style', 'script', 'print', 'hiddenContents'); + $vars = array('titre', 'credits', 'ga', 'style', 'script', 'print', 'hiddenContents', 'splash'); foreach ($vars as $v) { $thtml = str_replace('', $$v, $thtml); } @@ -705,19 +714,20 @@ class wsHTML5Compiler { $cc = $cpages[$i]; } $this->config->links[$i] = $c; - $this->config->clinks[$i] = $cc; + $this->config->clinks[$i] = $cc; } return $css; } public function addBookmarkGroup($link) { if ($link['left'] > $this->book->parametres->width) { - $link['page']++; + //$link['page']++; } if ($link['page'] <= 0 || $link['page'] > $this->book->parametres->pages) { continue; } - $this->config->bookmarkGroups[] = array('page' => ($link['page'] - 1), 'nb' => $link['to'], 'name' => $link['extra']); + + $this->config->bookmarkGroups[] = array('page' => ($link['page'] ), 'nb' => $link['to'], 'name' => $link['extra']); } protected function writeJs() { @@ -924,6 +934,21 @@ class wsHTML5Compiler { $res[] = '.portrait .doublePage._2d.axis_x.prev{' . $this->writeCSSUA('transform', 'translate3d(-' . $w . ',0,0)') . '}'; $res[] = '.doublePage._2d.axis_y.next{' . $this->writeCSSUA('transform', 'translate3d(0,' . $h . ',0)') . '}'; $res[] = '.doublePage._2d.axis_y.prev{' . $this->writeCSSUA('transform', 'translate3d(0,-' . $h . ',0)') . '}'; + + /* $res[] = '.dev .landscape .doublePage._2d.axis_x.next{left:' . $w2 . ';' . $this->writeCSSUA('transform', 'none') . '}'; + $res[] = '.dev .landscape .doublePage._2d.axis_x.prev{left:-' . $w2 . ';' . $this->writeCSSUA('transform', 'none') . '}'; + $res[] = '.dev .portrait .doublePage._2d.axis_x.next{left:' . $w . ';' . $this->writeCSSUA('transform', 'none') . '}'; + $res[] = '.dev .portrait .doublePage._2d.axis_x.prev{left:-' . $w . ';' . $this->writeCSSUA('transform', 'none') . '}'; + $res[] = '.dev .doublePage._2d.axis_y.next{top:' . $h . ';' . $this->writeCSSUA('transform', 'none') . '}'; + $res[] = '.dev .doublePage._2d.axis_y.prev{top:-' . $h . ';' . $this->writeCSSUA('transform', 'none') . '}'; + + $res[] = '.dev .landscape .doublePage._2d.axis_x.next{' . $this->writeCSSUA('transform', 'translate(' . $w2 . ',0)') . '}'; + $res[] = '.dev .landscape .doublePage._2d.axis_x.prev{' . $this->writeCSSUA('transform', 'translate(-' . $w2 . ',0)') . '}'; + $res[] = '.dev .portrait .doublePage._2d.axis_x.next{' . $this->writeCSSUA('transform', 'translate(' . $w . ',0)') . '}'; + $res[] = '.dev .portrait .doublePage._2d.axis_x.prev{' . $this->writeCSSUA('transform', 'translate(-' . $w . ',0)') . '}'; + $res[] = '.dev .doublePage._2d.axis_y.next{' . $this->writeCSSUA('transform', 'translate(0,' . $h . ')') . '}'; + $res[] = '.dev .doublePage._2d.axis_y.prev{' . $this->writeCSSUA('transform', 'translate(0,-' . $h . ')') . '}'; */ + $res[] = '.doublePage._3d{left:' . $w . ';}'; $res[] = '#links.right{left:-' . $w . ';}'; $res[] = '.landscape #shadow.single.right{left: ' . $w . ';}'; @@ -995,7 +1020,7 @@ class wsHTML5Compiler { //Icons $res = array_merge($res, $this->writeIcons()); - $res[] = '#nav #locales{background-color:' . self::colorToCSS($this->theme->parametres->couleurI) . '}'; + $res[] = '#nav #locales{background-color:' . self::colorToCSS($this->theme->parametres->couleurI) . ';}'; // Logo $logo = '#logo{'; @@ -1024,12 +1049,14 @@ class wsHTML5Compiler { $res[] = '.link a.displayArea:hover{opacity:1 !important;}'; $res[] = '.link a.displayArea{-webkit-tap-highlight-color:' . self::colorToCSS($this->theme->parametres->linksColor, 0.4) . ';background-color:' . self::colorToCSS($this->theme->parametres->linksColor, 0.0001) . ';}'; + // Bookmarks if (!isset($this->book->parametres->bookmarkCornerSize)) { $this->book->parametres->bookmarkCornerSize = 10; } $size = round($this->width * $this->book->parametres->bookmarkCornerSize * 0.0075); $res[] = '#links .bookmark{width:' . $size . 'px;height:' . $size . 'px;background-size:' . $size . 'px ' . $size . 'px;}'; + $res[] = '.portrait #fluidbook .bookmark.left{left:' . ($cssWidth - $size) . 'px;}'; // Menus $menuColor = new CubeIT_Graphics_Color($this->theme->parametres->couleurB); @@ -1099,7 +1126,7 @@ class wsHTML5Compiler { } protected function _cssBackground() { - $body = '#background{'; + $body = '#background,#splash{'; $body.='background-color:#' . $this->theme->parametres->backgroundColor . ';'; switch ($this->theme->parametres->repeat) { case wsTheme::REPEAT: -- 2.39.5