From: vincent@cubedesigners.com Date: Mon, 10 Jun 2013 13:57:40 +0000 (+0000) Subject: (no commit message) X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=0544be04e0101cd5032ed1c900e7e6bb2d916571;p=cubeextranet.git --- diff --git a/inc/ws/Util/html5/class.ws.html5.compiler.php b/inc/ws/Util/html5/class.ws.html5.compiler.php index bc935bb3f..1f57a86bf 100644 --- a/inc/ws/Util/html5/class.ws.html5.compiler.php +++ b/inc/ws/Util/html5/class.ws.html5.compiler.php @@ -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.='' . $signature->main . ''; + $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, $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, $uhtml); } $script.="\n\t\t" . ''; - $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, $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 . ';}'; diff --git a/inc/ws/Util/html5/class.ws.html5.links.php b/inc/ws/Util/html5/class.ws.html5.links.php index def005fae..04cc859b4 100644 --- a/inc/ws/Util/html5/class.ws.html5.links.php +++ b/inc/ws/Util/html5/class.ws.html5.links.php @@ -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 {