]> _ Git - cubeextranet.git/commitdiff
(no commit message)
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Fri, 14 Jun 2013 08:07:05 +0000 (08:07 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Fri, 14 Jun 2013 08:07:05 +0000 (08:07 +0000)
inc/ws/Metier/class.ws.book.parametres.php
inc/ws/Util/html5/class.ws.html5.compiler.php

index 3919055c88333c2e903f460f2cda52bac665e565..7edf2a307771fed64193312430b7b96ef54f712e 100644 (file)
@@ -292,9 +292,10 @@ class wsBookParametres extends wsParametres {
 \r
                $this->fields['mobileVideosPath'] = array('type' => 'text', 'default' => '', 'editable' => true, 'label' => __('Chemin vers les vidĂ©os'), 'grade' => 5);\r
                $this->fields['mobileExtraXSpace'] = array('type' => 'integer', 'default' => '0', 'editable' => true, 'label' => __('Marge supplĂ©mentaire horizontale'), 'grade' => 3);\r
+               $this->fields['mobileNavScale'] = array('type' => 'integer', 'default' => '100', 'editable' => true, 'label' => __('Taille du menu (en %)'), 'grade' => 3);\r
 \r
                $this->forms['mobile'] = array('label' => __('Version mobile'),\r
-                       'fieldsnames' => array('mobileLVersion', 'mobileVersion', 'mobileNavigationType', '|', 'mobileTransitions', 'mobileTransitionDuration', '|', 'navOrderH', '|', 'mobileIconVector', 'mobileServerConfig', 'mobilePlugins', '|', 'mobileVideosPath', '|', 'mobileExtraXSpace'));\r
+                       'fieldsnames' => array('mobileLVersion', 'mobileVersion', 'mobileNavigationType','|','mobileNavScale', '|', 'mobileTransitions', 'mobileTransitionDuration', '|', 'navOrderH', '|', 'mobileIconVector', 'mobileServerConfig', 'mobilePlugins', '|', 'mobileVideosPath', '|', 'mobileExtraXSpace'));\r
 \r
                $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');\r
                $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');\r
index a9f1ed5ac21aeecdfc38d6c4d3cadcaf8bff1fa5..f2d4b315f9232a9ef71bc2dbb0fbca912f021ed9 100644 (file)
@@ -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.='<div class="logo"><img src="data/images/' . $this->theme->parametres->logoLoader . '" width="' . $dim[0] . '" height="' . $dim[1] . '" alt="" /></div>';
+               }
+
+               $vars = array('titre', 'credits', 'ga', 'style', 'script', 'pagesContents', 'description', 'print', 'hiddenContents', 'splash');
                foreach ($vars as $v) {
                        $html = str_replace('<!-- $' . $v . ' -->', $$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 . ' -->', $$v, $uhtml);
                }
 
                $script.="\n\t\t" . '<script type="text/javascript" charset="utf-8">window.tester = true;</script>';
-               $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 . ' -->', $$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: