]> _ Git - cubeextranet.git/commitdiff
(no commit message)
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Mon, 10 Jun 2013 13:57:40 +0000 (13:57 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Mon, 10 Jun 2013 13:57:40 +0000 (13:57 +0000)
inc/ws/Util/html5/class.ws.html5.compiler.php
inc/ws/Util/html5/class.ws.html5.links.php

index bc935bb3f8a1bd135e4ca881a567c24b41f3e943..1f57a86bf82d15f9dff2c143731a51d9b537108b 100644 (file)
@@ -134,6 +134,7 @@ class wsHTML5Compiler {
        protected $assets = '';
        protected $phonegap = false;
        protected $standalone = false;
+       protected $hiddenContents = array();
 
        function __construct($book_id, $version = 'stable', $phonegap = false, $dir = null, $standalone = false) {
                global $core;
@@ -432,6 +433,8 @@ class wsHTML5Compiler {
                }
                $credits.='<a href="' . $signature->mainLink . '" target="_blank">' . $signature->main . '</a>';
 
+               $hiddenContents = implode("\n", $this->hiddenContents);
+
 
                // Google analytics
                $ga = '';
@@ -508,7 +511,7 @@ class wsHTML5Compiler {
 
                $print = $this->writePrint();
 
-               $vars = array('titre', 'credits', 'ga', 'style', 'script', 'pagesContents', 'description', 'print');
+               $vars = array('titre', 'credits', 'ga', 'style', 'script', 'pagesContents', 'description', 'print', 'hiddenContents');
                foreach ($vars as $v) {
                        $html = str_replace('<!-- $' . $v . ' -->', $$v, $html);
                }
@@ -536,13 +539,13 @@ class wsHTML5Compiler {
 
                $thtml = $uhtml;
 
-               $vars = array('titre', 'credits', 'ga', 'style', 'script', 'pagesContents', 'print');
+               $vars = array('titre', 'credits', 'ga', 'style', 'script', 'pagesContents', 'print', 'hiddenContents');
                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');
+               $vars = array('titre', 'credits', 'ga', 'style', 'script', 'print', 'hiddenContents');
                foreach ($vars as $v) {
                        $thtml = str_replace('<!-- $' . $v . ' -->', $$v, $thtml);
                }
@@ -644,7 +647,6 @@ class wsHTML5Compiler {
                $this->config->clinks = array();
                $this->config->bookmarkGroups = array();
 
-
                $ignore = $this->book->parametres->ignoreLinksTypes;
                if (!$ignore) {
                        $ignore = array();
@@ -659,6 +661,7 @@ class wsHTML5Compiler {
                $pages = array();
                $cpages = array();
                $css = array();
+
                foreach ($links as $linkData) {
                        if (in_array($linkData['type'], $ignore)) {
                                continue;
@@ -679,6 +682,10 @@ class wsHTML5Compiler {
                        } else {
                                $pages[$link->page].=$c;
                        }
+
+                       if ($link->keep()) {
+                               $this->hiddenContents[] = $c;
+                       }
                        $i++;
                }
 
@@ -913,8 +920,8 @@ class wsHTML5Compiler {
                $res[] = '.landscape .doublePage._2d.axis_x.prev{' . $this->writeCSSUA('transform', 'translate3d(-' . $w2 . ',0,0)') . '}';
                $res[] = '.portrait .doublePage._2d.axis_x.next{' . $this->writeCSSUA('transform', 'translate3d(' . $w . ',0,0)') . '}';
                $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[] = '.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[] = '.doublePage._3d{left:' . $w . ';}';
                $res[] = '#links.right{left:-' . $w . ';}';
                $res[] = '.landscape #shadow.single.right{left: ' . $w . ';}';
index def005fae99c55c6bd451d1f77405e9a7ad45fc6..04cc859b4dadad571f0180bbcd9533676287b10d 100644 (file)
@@ -164,6 +164,10 @@ class wsHTML5Link {
                return '';
        }
 
+       public function keep() {
+               return false;
+       }
+
        public static function getUniversalLocation($loc, $css = false) {
                $datas = parse_url($loc);
 
@@ -326,6 +330,10 @@ class videoPopupLink extends normalLink {
                return ' data-video="' . rawurlencode(videoLink::makeVideoTag($this, null, null, $this->compiler)) . '" ';
        }
 
+       public function keep() {
+               return true;
+       }
+
 }
 
 class webVideoLink extends videoLink {