From: vincent@cubedesigners.com Date: Wed, 22 Aug 2012 18:33:51 +0000 (+0000) Subject: (no commit message) X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=d31ffca4345dfdd43cfb2a7a41f4e7ea3043a0eb;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 5e003aa46..b0c333746 100644 --- a/inc/ws/Util/html5/class.ws.html5.compiler.php +++ b/inc/ws/Util/html5/class.ws.html5.compiler.php @@ -97,8 +97,8 @@ class wsHTML5Compiler { protected $daoBook; protected $needToRecompileContents = true; protected $needToRecompileSettings = true; - protected $width; - protected $height; + public $width; + public $height; protected $cssWidth; protected $cssHeight; protected $cssOneWidth; @@ -443,17 +443,17 @@ class wsHTML5Compiler { } } - protected function writeExtras(){ - if($this->theme->parametres->afterSearch!=''){ + protected function writeExtras() { + if ($this->theme->parametres->afterSearch != '') { copy($this->themeRoot . '/' . $this->theme->parametres->afterSearch, $this->vdir . '/data/images/' . $this->theme->parametres->afterSearch); } } - + protected function writeLinks() { global $core; $daoDoc = new wsDAODocument($core->con); $daoDoc->getLinksAndRulers($this->book_id, $links, $rulers); - + $i = 0; $pages = array(); $css = array(); @@ -462,16 +462,18 @@ class wsHTML5Compiler { if (is_null($link)) { continue; } + + $c = $link->getHTMLContainer(); + $css[] = $link->getCSSContainer(); if (!isset($pages[$link->page])) { $pages[$link->page] = ''; } - $pages[$link->page] .= $link->getHTMLContainer(); - $css[] = $link->getCSSContainer(); + $pages[$link->page].=$c; $i++; } - - $allpages=range(0,$this->book->parametres->pages+1); - $allpages[]='aftersearch'; + + $allpages = range(0, $this->book->parametres->pages + 1); + $allpages[] = 'aftersearch'; $this->config->links = array(); @@ -570,7 +572,7 @@ class wsHTML5Compiler { // Set the icon list with the color $icons = array('nav-bookmark' => $couleurI, 'nav-friend' => $couleurI, 'nav-help' => $couleurI, 'nav-index' => $couleurI, 'nav-sommaire' => $couleurI, 'next' => $arrowsColor, 'previous' => $arrowsColor, 'search' => $couleurI, 'nav-facebook' => $couleurI, 'nav-twitter' => $couleurI, - 'help-fingers' => $couleurI, 'help-mouse' => $couleurI,'nav-home'=>$couleurI); + 'help-fingers' => $couleurI, 'help-mouse' => $couleurI, 'nav-home' => $couleurI); foreach ($icons as $icon => $color) { wsTools::colorizeAndRasterizeIcon($this->theme->parametres->iconSet, $icon, $color, $this->vdir . '/data/images/', 4, $w, $h); @@ -617,7 +619,7 @@ class wsHTML5Compiler { copy($s, $t); } - protected function writeCSS($file, $links) { + protected function writeCSS($file, $links) { $res = array(); // General theme @@ -638,8 +640,8 @@ class wsHTML5Compiler { $navTop = ($cssHeight - 40 - 100) / 2; - $res[] = '.portrait #pages,.portrait .doublePage.page,.page,.portrait #shadow,#shadow.single,.page .links,.doublePage._3d{width:' . $w . ';max-width:' . $w . ';height:' . $h . ';max-height:' . $h . '}'; - $res[] = '.doublePage,#pages,.landscape #shadow.double{width:' . $w2 . ';max-width:' . $w2 . ';height:' . $h . ';max-height:' . $h . '}'; + $res[] = '.portrait #pages,.portrait .doublePage.page,.page,.portrait #shadow,#shadow.single,.doublePage._3d{width:' . $w . ';max-width:' . $w . ';height:' . $h . ';max-height:' . $h . '}'; + $res[] = '.doublePage,#pages,#links,.landscape #shadow.double{width:' . $w2 . ';max-width:' . $w2 . ';height:' . $h . ';max-height:' . $h . '}'; $res[] = '.landscape .doublePage._2d.next{' . $this->writeCSSUA('transform', 'translate3d(' . $w2 . ',0,0)') . '}'; $res[] = '.landscape .doublePage._2d.prev{' . $this->writeCSSUA('transform', 'translate3d(-' . $w2 . ',0,0)') . '}'; $res[] = '.portrait .doublePage._2d.next{' . $this->writeCSSUA('transform', 'translate3d(' . $w . ',0,0)') . '}'; @@ -776,6 +778,7 @@ class wsHTML5Compiler { // Links Styles $res = array_merge($res, $links); $res[] = '.link a.displayArea:hover,.link a.displayArea.animating{background-color:' . self::colorToCSS($this->theme->parametres->linksColor, 0.4) . ';}'; + $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) . ';}'; // Menus @@ -903,6 +906,7 @@ class wsHTML5Compiler { } class wsHTML5CompilerDev extends wsHTML5Compiler { + } ?> \ No newline at end of file diff --git a/inc/ws/Util/html5/class.ws.html5.links.php b/inc/ws/Util/html5/class.ws.html5.links.php index 7cc74b694..250d9d3df 100644 --- a/inc/ws/Util/html5/class.ws.html5.links.php +++ b/inc/ws/Util/html5/class.ws.html5.links.php @@ -78,7 +78,7 @@ class wsHTML5Link { } public function getHTMLContainer() { - return ''; + return ''; } public function getHTMLContent() { @@ -98,7 +98,13 @@ class wsHTML5Link { } public function getCSSContainer() { - $css = '#link' . $this->id . '{'; + + if($this->page%2==1){ + $this->page--; + $this->left+=$this->compiler->width; + } + + $css = '#l_' . $this->id . '{'; $css.='left:' . $this->left * $this->compiler->getCssScale() . 'px;top:' . $this->top * $this->compiler->getCssScale() . 'px;'; $css.='width:' . $this->width * $this->compiler->getCssScale() . 'px;height:' . $this->height * $this->compiler->getCssScale() . 'px;'; $css.=$this->getCSS();