]> _ Git - cubeextranet.git/commitdiff
(no commit message)
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Wed, 4 Sep 2013 11:38:00 +0000 (11:38 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Wed, 4 Sep 2013 11:38:00 +0000 (11:38 +0000)
fluidbook/icones/1/mobile/nav-fullscreen.svg [new file with mode: 0644]
fluidbook/icones/1/mobile/nav-zoomin.svg [new file with mode: 0644]
fluidbook/icones/1/mobile/nav-zoomout.svg [new file with mode: 0644]
inc/ws/Controlleur/class.ws.url.php
inc/ws/Util/html5/class.ws.html5.compiler.php
inc/ws/Util/html5/class.ws.html5.links.php

diff --git a/fluidbook/icones/1/mobile/nav-fullscreen.svg b/fluidbook/icones/1/mobile/nav-fullscreen.svg
new file mode 100644 (file)
index 0000000..ecf42ef
--- /dev/null
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<!-- Generator: Adobe Illustrator 15.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->\r
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">\r
+<svg version="1.0" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"\r
+        width="21px" height="20px" viewBox="-0.5 0 21 20" enable-background="new -0.5 0 21 20" xml:space="preserve">\r
+<g>\r
+       <path fill="$colorize" d="M17.818,1H2.182C1.255,1,0.5,1.76,0.5,2.69v9.666c0,0.929,0.755,1.688,1.682,1.688h5.281v3.087H6.622\r
+               C5.781,17.131,5.781,19,5.781,19h8.389c0-0.846-0.84-1.869-0.84-1.869h-0.842v-3.087h5.33c0.924,0,1.682-0.76,1.682-1.688V2.69\r
+               C19.5,1.76,18.742,1,17.818,1z M17.527,12.061H2.473V3.026h15.054V12.061z M8.463,5.991H7.461v1.008h1.002V5.991z M7.492,10.021\r
+               H6.49V8.006h0.971V6.999H6.458v1.007H4.454V6.999H3.452v3.999h4.04V10.021z M13.506,6.999h2.004v1.007h1.004V4.008h-4.041v0.976\r
+               h1.002v2.015h-0.971v1.007h1.002V6.999z M12.504,8.006h-1.002v1.007h1.002V8.006z"/>\r
+</g>\r
+</svg>\r
diff --git a/fluidbook/icones/1/mobile/nav-zoomin.svg b/fluidbook/icones/1/mobile/nav-zoomin.svg
new file mode 100644 (file)
index 0000000..db397d1
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<!-- Generator: Adobe Illustrator 15.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->\r
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">\r
+<svg version="1.0" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"\r
+        width="20px" height="20px" viewBox="0 0 20 20" enable-background="new 0 0 20 20" xml:space="preserve">\r
+<path fill="$colorize" d="M17.798,14.34l-4.239-4.244c0.352-0.783,0.551-1.648,0.551-2.562c0-3.461-2.817-6.28-6.28-6.28\r
+       c-3.465,0-6.282,2.818-6.282,6.28c0,3.464,2.817,6.282,6.282,6.282c0.913,0,1.778-0.199,2.562-0.553l4.241,4.242\r
+       c0.875,0.875,2.293,0.875,3.167,0.001C18.672,16.633,18.674,15.216,17.798,14.34z M7.763,12.008c-2.458,0-4.45-1.993-4.45-4.451\r
+       s1.992-4.45,4.45-4.45s4.45,1.992,4.45,4.45S10.221,12.008,7.763,12.008z"/>\r
+<line fill="none" stroke="$colorize" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="7.8" y1="5" x2="7.8" y2="10"/>\r
+<line fill="none" stroke="$colorize" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="5.3" y1="7.5" x2="10.3" y2="7.5"/>\r
+</svg>\r
diff --git a/fluidbook/icones/1/mobile/nav-zoomout.svg b/fluidbook/icones/1/mobile/nav-zoomout.svg
new file mode 100644 (file)
index 0000000..0df0626
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<!-- Generator: Adobe Illustrator 15.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->\r
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">\r
+<svg version="1.0" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"\r
+        width="20px" height="20px" viewBox="0 0 20 20" enable-background="new 0 0 20 20" xml:space="preserve">\r
+<path fill="$colorize" d="M17.798,14.34l-4.239-4.244c0.352-0.783,0.551-1.648,0.551-2.562c0-3.461-2.817-6.28-6.28-6.28\r
+       c-3.465,0-6.282,2.818-6.282,6.28c0,3.464,2.817,6.282,6.282,6.282c0.913,0,1.778-0.199,2.562-0.553l4.241,4.242\r
+       c0.875,0.875,2.293,0.875,3.167,0.001C18.672,16.633,18.674,15.216,17.798,14.34z M7.763,12.008c-2.458,0-4.45-1.993-4.45-4.451\r
+       s1.992-4.45,4.45-4.45s4.45,1.992,4.45,4.45S10.221,12.008,7.763,12.008z"/>\r
+<line fill="none" stroke="$colorize" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="5.8" y1="7.5" x2="9.8" y2="7.5"/>\r
+</svg>\r
index 223ec0ca5fba29d67a942f869ef4f9fc09842454..c48b754fef0a44b36b6f2d160ae69ddd0aa8f329 100644 (file)
@@ -126,7 +126,7 @@ class wsUrl {
                                        }\r
 \r
                                        $res .= '<td><a href="#" class="openContextMenu" rel="' . $context_status_id . '" rev="' . $book->book_id . '">' . $core->books_status[$book->status] . '</a>' . $p . '</td>';\r
-                               } else  {\r
+                               } else {\r
                                        $res .= '<td>' . $core->books_status[1] . '</td>';\r
                                }\r
                                $res.='<td>' . $book->version . '</td>';\r
@@ -350,7 +350,7 @@ class wsUrl {
                }\r
 \r
                $res.='<h3>' . __('Notifications') . '</h3>';\r
-               $res.='<p>' . __('Indiquez le texte de la notification à envoyer aux utilisateurs') . ' (' . __('Max 200 caractères') . ').<br />'.__('Laissez vide si vous souhaitez simplement afficher un badge').'</p>';\r
+               $res.='<p>' . __('Indiquez le texte de la notification à envoyer aux utilisateurs') . ' (' . __('Max 200 caractères') . ').<br />' . __('Laissez vide si vous souhaitez simplement afficher un badge') . '</p>';\r
                $res.='<form method="post" action="publishCollection">';\r
                $res.=form::hidden('collection', $collection->collection_id);\r
                $res.='<table class="max">';\r
@@ -703,7 +703,7 @@ class wsUrl {
 \r
                $s->setTitle(cubeText::str2URL($lang_name));\r
 \r
-               $tab = cubeLang::getTranslationsList(array(PLAYER_SOURCES, WS_COMPILE_ASSETS . '/_html5/js'), array('php', 'as', 'js'), array(), $lang->traductions);\r
+               $tab = cubeLang::getTranslationsList(array(PLAYER_SOURCES, WS_COMPILE_ASSETS . '/_html5/js', ROOT . '/inc/ws/Util/html5'), array('php', 'as', 'js'), array(), $lang->traductions);\r
 \r
                $s->setCellValueByColumnAndRow(0, 1, 'ID', true);\r
                $s->setCellValueByColumnAndRow(1, 1, $ref_name, true);\r
index 992fb0c05d77f4408ca76cfb123d66320cc00c22..22cbcb3131f191a5d3a2e931a5db66a66d0c73b1 100644 (file)
@@ -30,6 +30,7 @@ class wsHTML5Compiler {
                'js/libs/modernizr/tests.js',
                'js/libs/json2.js',
                'js/libs/flashdetect.js',
+               'js/libs/screenfull.js',
                'js/libs/jquery/jquery.js',
                'js/libs/jquery/jquery.transform.js',
                'js/libs/jquery/jquery.mousewheel.js',
@@ -56,6 +57,7 @@ class wsHTML5Compiler {
                'js/libs/fluidbook/fluidbook.coquillette.js',
                'js/libs/fluidbook/fluidbook.stats.js',
                'js/libs/fluidbook/fluidbook.cache.js',
+               'js/libs/fluidbook/fluidbook.tooltip.js',
                'js/libs/fluidbook/fluidbook.bookmarks.js',
                'js/libs/fluidbook/fluidbook.background.js',
                'js/libs/fluidbook/fluidbook.pad.js',
@@ -277,7 +279,7 @@ class wsHTML5Compiler {
                foreach ($dirsToCreate as $dir) {
                        $d = $this->vdir . '/' . $dir;
                        if (!file_exists($d)) {
-                               mkdir($d, 0777, true); 
+                               mkdir($d, 0777, true);
                        }
                }
 
@@ -881,6 +883,7 @@ class wsHTML5Compiler {
                $arrowsColor = $this->theme->parametres->arrowsColor;
                // Set the icon list with the color
                $icons = array('nav-bookmark' => $couleurI, 'nav-friend' => $couleurI, 'nav-help' => $couleurI, 'nav-index' => $couleurI, 'nav-sommaire' => $couleurI,
+                       'nav-zoomin' => $couleurI, 'nav-zoomout' => $couleurI, 'nav-fullscreen' => $couleurI,
                        'interface-next' => $arrowsColor, 'interface-previous' => $arrowsColor, 'interface-search' => $couleurI, 'interface-back-arrow' => $subTextColor, 'interface-print' => $subTextColor,
                        'interface-down' => $arrowsColor,
                        'help-fingers' => $couleurI, 'help-mouse' => $couleurI, 'nav-home' => $couleurI, 'nav-archives' => $couleurI, 'nav-map' => $couleurI,
@@ -1172,6 +1175,9 @@ class wsHTML5Compiler {
                $res[] = '#indexView .doubleThumb .overlay{height:' . $thumbh . 'px;}';
                $res[] = '#indexView .doubleThumb .hits.yes{background-color:' . self::colorToCSS($this->theme->parametres->subSelectColor) . ';color:' . self::colorToCSS($this->theme->parametres->subTextSelectColor) . '}';
 
+               # Tooltip
+               $res[] = '#tooltip{background-color:' . self::colorToCSS($this->theme->parametres->tooltipBackColor) . ';color:' . self::colorToCSS($this->theme->parametres->tooltipTextColor) . ';}';
+
                $res = array_chunk($res, 3500);
                foreach ($res as $k => $css) {
                        file_put_contents(sprintf($file, $k), implode("\n", $css));
index c1831d4c67ea24eced2b7cc531fdd7af55831858..28e47443b146a229d43d40b531c895fc6d09d9c3 100644 (file)
 
 class wsHTML5Link {
 
-    public $left;
-    public $top;
-    public $width;
-    public $height;
-    public $page;
-    public $type;
-    public $to;
-    public $numerotation;
-    public $target;
-    public $interactive;
-    public $video_loop;
-    public $video_sound_on;
-    public $video_controls;
-    public $video_auto_start;
-    public $video_height;
-    public $video_width;
-    public $video_service;
-    public $inline;
-    public $display_area;
-    public $infobulle;
-    public $id;
-
-    /**
-     *
-     * @var wsHTML5Compiler 
-     */
-    public $compiler;
-
-    /**
-     * 
-     * @param integer $id
-     * @param stdClass $init
-     * @param wsHTML5Compiler $compiler
-     * @return \webLink|\mailLink|\internalLink|\videoLink|\videoPopupLink|\multimediaLink|null|\webVideoLink|\webVideoPopupLink|\actionLink|\basketLink|\colorLink|\imageLink|\fileLink|\htmlMultimediaLink
-     */
-    public static function getInstance($id, $init, &$compiler) {
-        switch ($init['type']) {
-            case 1:
-            case 2:
-                return new webLink($id, $init, $compiler);
-            case 3:
-                return new mailLink($id, $init, $compiler);
-            case 5:
-                return new internalLink($id, $init, $compiler);
-            case 4:
-                if ($init['inline']) {
-                    return new videoLink($id, $init, $compiler);
-                } else {
-                    return new videoPopupLink($id, $init, $compiler);
-                }
-
-            case 7:
-                if ($compiler->book->parametres->customLinkClass == 'WescoLink') {
-                    return new wescoLink($id, $init, $compiler);
-                } else if ($compiler->book->parametres->customLinkClass == 'HaguenauManifLink') {
-                    return new haguenauManifLink($id, $init, $compiler);
-                }
-            case 8:
-            case 9:
-                return null;
-            case 10:
-                if ($init['inline']) {
-                    return new webVideoLink($id, $init, $compiler);
-                } else {
-                    return new webVideoPopupLink($id, $init, $compiler);
-                }
-            case 11:
-                if ($init['to'] == 'fullScreen') {
-                    return null;
-                }
-                return new actionLink($id, $init, $compiler);
-            case 12:
-                return new basketLink($id, $init, $compiler);
-            case 13:
-                return null;
-            case 14:
-                return new colorLink($id, $init, $compiler);
-            case 15:
-                return new imageLink($id, $init, $compiler);
-            case 16:
-                return new fileLink($id, $init, $compiler);
-            case 17:
-                //return new audioLink($id,$init,$compiler);
-                break;
-            case 18:
-            case 19:
-                break;
-            case 20:
-                $compiler->addBookmarkGroup($init);
-                break;
-            case 21:
-            case 6:
-                return self::getMultimediaInstance($id, $init, $compiler);
-                break;
-            default:
-                return null;
-        }
-    }
-
-    public static function getMultimediaInstance($id, $init, &$compiler) {
-        if ($init['alternative'] == '') {
-            return null;
-        }
-
-        $ext = mb_strtolower(files::getExtension($init['alternative']));
-
-        if (in_array($ext, array('oam', 'zip'))) {
-            if ($init['inline']) {
-                return new htmlMultimediaLink($id, $init, $compiler);
-            } else {
-                return new htmlMultimediaPopupLink($id, $init, $compiler);
-            }
-        } else if (in_array($ext, array('gif', 'jpeg', 'jpg', 'png', 'svg'))) {
-            if ($init['inline']) {
-                return new htmlMultimediaImage($id, $init, $compiler);
-            } else {
-                return new htmlMultimediaPopupImage($id, $init, $compiler);
-            }
-        }
-        return null;
-    }
-
-    public function __construct($id, $init, &$compiler) {
-        foreach ($init as $k => $v) {
-            $this->$k = $v;
-        }
-        if ($this->target == '') {
-            $this->target = '_blank';
-        }
-        $this->wdir = WS_BOOKS . '/working/' . $compiler->book_id . '/';
-        $this->id = $id;
-        $this->compiler = $compiler;
-    }
-
-    public function getHTMLContainer() {
-        return '<div class="' . $this->getHTMLContainerClass() . '" id="l_' . $this->id . '">' . $this->getHTMLContent() . '</div>';
-    }
-
-    public function getHTMLContainerClass() {
-        return 'link';
-    }
-
-    public function getHTMLContent() {
-        return '';
-    }
-
-    public function getAdditionnalContent() {
-        
-    }
-
-    public function getClasses() {
-        return array();
-    }
-
-    public function copyExternalFile($file, $video = false) {
-        $this->compiler->copyLinkFile($file, 'data/links/', $video);
-    }
-
-    public function copyExternalDir($dir) {
-        $this->compiler->copyLinkDir($dir, 'data/links');
-    }
-
-    public function unzipFile($file, $moveAssets = false) {
-        $fdir = 'data/links/' . $file;
-        $dir = $this->compiler->vdir . '/' . $fdir;
-        if (!file_exists($dir)) {
-            mkdir($dir, 0777, true);
-        }
-        $unzip = new cubeCommandLine('unzip');
-        $unzip->setArg(null, $this->compiler->wdir . '/' . $file);
-        $unzip->setArg('d', $dir);
-        $unzip->execute();
-
-        if ($moveAssets) {
-            `mv $dir/Assets/* $dir`;
-            rmdir($dir . '/Assets');
-        }
-
-        return array('dir' => $dir, 'fdir' => $fdir);
-    }
-
-    public function getCssScale() {
-        if (is_int($this->page)) {
-            return $this->compiler->getCssScale();
-        } else {
-            return 1;
-        }
-    }
-
-    public function getCSSContainer() {
-        if (!($this instanceof contentLink) && $this->page % 2 == 1) {
-            $this->page--;
-            $this->left+=$this->compiler->width;
-        }
-
-        $css = '#l_' . $this->id . '{';
-        $css.='left:' . $this->left * $this->getCssScale() . 'px;top:' . $this->top * $this->getCssScale() . 'px;';
-        $css.='width:' . $this->width * $this->getCssScale() . 'px;height:' . $this->height * $this->getCssScale() . 'px;';
-        $css.=$this->getCSS();
-        $css.='}';
-        return $css;
-    }
-
-    public function getCSS() {
-        return '';
-    }
-
-    public function keep() {
-        return false;
-    }
-
-    public static function getUniversalLocation($loc, $css = false) {
-        $datas = parse_url($loc);
-
-        if (isset($datas['scheme']) && !is_null($datas['scheme'])) {
-            return $loc;
-        } else {
-            if ($css) {
-                return '../links/' . $loc;
-            } else {
-                return 'data/links/' . $loc;
-            }
-        }
-    }
+       public $left;
+       public $top;
+       public $width;
+       public $height;
+       public $page;
+       public $type;
+       public $to;
+       public $numerotation;
+       public $target;
+       public $interactive;
+       public $video_loop;
+       public $video_sound_on;
+       public $video_controls;
+       public $video_auto_start;
+       public $video_height;
+       public $video_width;
+       public $video_service;
+       public $inline;
+       public $display_area;
+       public $infobulle;
+       public $id;
+
+       /**
+        *
+        * @var wsHTML5Compiler 
+        */
+       public $compiler;
+
+       /**
+        * 
+        * @param integer $id
+        * @param stdClass $init
+        * @param wsHTML5Compiler $compiler
+        * @return \webLink|\mailLink|\internalLink|\videoLink|\videoPopupLink|\multimediaLink|null|\webVideoLink|\webVideoPopupLink|\actionLink|\basketLink|\colorLink|\imageLink|\fileLink|\htmlMultimediaLink
+        */
+       public static function getInstance($id, $init, &$compiler) {
+               switch ($init['type']) {
+                       case 1:
+                       case 2:
+                               return new webLink($id, $init, $compiler);
+                       case 3:
+                               return new mailLink($id, $init, $compiler);
+                       case 5:
+                               return new internalLink($id, $init, $compiler);
+                       case 4:
+                               if ($init['inline']) {
+                                       return new videoLink($id, $init, $compiler);
+                               } else {
+                                       return new videoPopupLink($id, $init, $compiler);
+                               }
+
+                       case 7:
+                               if ($compiler->book->parametres->customLinkClass == 'WescoLink') {
+                                       return new wescoLink($id, $init, $compiler);
+                               } else if ($compiler->book->parametres->customLinkClass == 'HaguenauManifLink') {
+                                       return new haguenauManifLink($id, $init, $compiler);
+                               }
+                       case 8:
+                       case 9:
+                               return null;
+                       case 10:
+                               if ($init['inline']) {
+                                       return new webVideoLink($id, $init, $compiler);
+                               } else {
+                                       return new webVideoPopupLink($id, $init, $compiler);
+                               }
+                       case 11:
+                               if ($init['to'] == 'fullScreen') {
+                                       return null;
+                               }
+                               return new actionLink($id, $init, $compiler);
+                       case 12:
+                               return new basketLink($id, $init, $compiler);
+                       case 13:
+                               return null;
+                       case 14:
+                               return new colorLink($id, $init, $compiler);
+                       case 15:
+                               return new imageLink($id, $init, $compiler);
+                       case 16:
+                               return new fileLink($id, $init, $compiler);
+                       case 17:
+                               //return new audioLink($id,$init,$compiler);
+                               break;
+                       case 18:
+                       case 19:
+                               break;
+                       case 20:
+                               $compiler->addBookmarkGroup($init);
+                               break;
+                       case 21:
+                       case 6:
+                               return self::getMultimediaInstance($id, $init, $compiler);
+                               break;
+                       default:
+                               return null;
+               }
+       }
+
+       public static function getMultimediaInstance($id, $init, &$compiler) {
+               if ($init['alternative'] == '') {
+                       return null;
+               }
+
+               $ext = mb_strtolower(files::getExtension($init['alternative']));
+
+               if (in_array($ext, array('oam', 'zip'))) {
+                       if ($init['inline']) {
+                               return new htmlMultimediaLink($id, $init, $compiler);
+                       } else {
+                               return new htmlMultimediaPopupLink($id, $init, $compiler);
+                       }
+               } else if (in_array($ext, array('gif', 'jpeg', 'jpg', 'png', 'svg'))) {
+                       if ($init['inline']) {
+                               return new htmlMultimediaImage($id, $init, $compiler);
+                       } else {
+                               return new htmlMultimediaPopupImage($id, $init, $compiler);
+                       }
+               }
+               return null;
+       }
+
+       public function __construct($id, $init, &$compiler) {
+               foreach ($init as $k => $v) {
+                       $this->$k = $v;
+               }
+               if ($this->target == '') {
+                       $this->target = '_blank';
+               }
+               $this->wdir = WS_BOOKS . '/working/' . $compiler->book_id . '/';
+               $this->id = $id;
+               $this->compiler = $compiler;
+       }
+
+       public function getDefaultTooltip() {
+               return false;
+       }
+
+       public function getTooltip() {
+               if (is_null($this->infobulle) || !$this->infobulle) {
+                       return '~' .$this->getDefaultTooltip();
+               }
+               return  $this->infobulle;
+       }
+
+       public function getHTMLContainer() {
+               return '<div class="' . $this->getHTMLContainerClass() . '" id="l_' . $this->id . '">' . $this->getHTMLContent() . '</div>';
+       }
+
+       public function getHTMLContainerClass() {
+               return 'link';
+       }
+
+       public function getHTMLContent() {
+               return '';
+       }
+
+       public function getAdditionnalContent() {
+               
+       }
+
+       public function getClasses() {
+               return array();
+       }
+
+       public function copyExternalFile($file, $video = false) {
+               $this->compiler->copyLinkFile($file, 'data/links/', $video);
+       }
+
+       public function copyExternalDir($dir) {
+               $this->compiler->copyLinkDir($dir, 'data/links');
+       }
+
+       public function unzipFile($file, $moveAssets = false) {
+               $fdir = 'data/links/' . $file;
+               $dir = $this->compiler->vdir . '/' . $fdir;
+               if (!file_exists($dir)) {
+                       mkdir($dir, 0777, true);
+               }
+               $unzip = new cubeCommandLine('unzip');
+               $unzip->setArg(null, $this->compiler->wdir . '/' . $file);
+               $unzip->setArg('d', $dir);
+               $unzip->execute();
+
+               if ($moveAssets) {
+                       `mv $dir/Assets/* $dir`;
+                       rmdir($dir . '/Assets');
+               }
+
+               return array('dir' => $dir, 'fdir' => $fdir);
+       }
+
+       public function getCssScale() {
+               if (is_int($this->page)) {
+                       return $this->compiler->getCssScale();
+               } else {
+                       return 1;
+               }
+       }
+
+       public function getCSSContainer() {
+               if (!($this instanceof contentLink) && $this->page % 2 == 1) {
+                       $this->page--;
+                       $this->left+=$this->compiler->width;
+               }
+
+               $css = '#l_' . $this->id . '{';
+               $css.='left:' . $this->left * $this->getCssScale() . 'px;top:' . $this->top * $this->getCssScale() . 'px;';
+               $css.='width:' . $this->width * $this->getCssScale() . 'px;height:' . $this->height * $this->getCssScale() . 'px;';
+               $css.=$this->getCSS();
+               $css.='}';
+               return $css;
+       }
+
+       public function getCSS() {
+               return '';
+       }
+
+       public function keep() {
+               return false;
+       }
+
+       public static function getUniversalLocation($loc, $css = false) {
+               $datas = parse_url($loc);
+
+               if (isset($datas['scheme']) && !is_null($datas['scheme'])) {
+                       return $loc;
+               } else {
+                       if ($css) {
+                               return '../links/' . $loc;
+                       } else {
+                               return 'data/links/' . $loc;
+                       }
+               }
+       }
 
 }
 
 class normalLink extends wsHTML5Link {
 
-    public function getHTMLContent() {
-        $class = $this->getClasses();
-        if ($this->display_area) {
-            $class[] = 'displayArea';
-        }
-        $c = '';
-        if (count($class)) {
-            $c = ' class="' . implode(' ', $class) . '"';
-        }
-        return '<a href="' . $this->getURL() . '" target="' . $this->getTarget() . '"' . $c . $this->getAdditionnalContent() . $this->getTrack() . '></a>';
-    }
-
-    public function getTrack() {
-        return '';
-    }
-
-    public function getURL() {
-        return '#';
-    }
-
-    public function getTarget() {
-        return '_self';
-    }
+       public function getHTMLContent() {
+               $class = $this->getClasses();
+               if ($this->display_area) {
+                       $class[] = 'displayArea';
+               }
+               $c = '';
+               if (count($class)) {
+                       $c = ' class="' . implode(' ', $class) . '"';
+               }
+               $tooltip = '';
+               $t = $this->getTooltip();
+               if ($t !== false) {
+                       $tooltip = ' data-tooltip="' . $t . '"';
+               }
+               return '<a href="' . $this->getURL() . '" target="' . $this->getTarget() . '"' . $tooltip . $c . $this->getAdditionnalContent() . $this->getTrack() . '></a>';
+       }
+
+       public function getTrack() {
+               return '';
+       }
+
+       public function getURL() {
+               return '#';
+       }
+
+       public function getTarget() {
+               return '_self';
+       }
 
 }
 
 class htmlMultimediaImage extends wsHTML5Link {
 
-    public function getHTMLContainerClass() {
-        return 'link multimedia';
-    }
+       public function getHTMLContainerClass() {
+               return 'link multimedia';
+       }
 
-    public function getHTMLContent() {
-        $w = $this->width * $this->getCssScale();
-        $h = $this->height * $this->getCssScale();
-        $this->copyExternalFile($this->alternative);
-        $alt = '<img src="' . wsHTML5Link::getUniversalLocation($this->alternative) . '" width="' . $w . '" height="' . $h . '" />';
-        return $alt;
-    }
+       public function getHTMLContent() {
+               $w = $this->width * $this->getCssScale();
+               $h = $this->height * $this->getCssScale();
+               $this->copyExternalFile($this->alternative);
+               $alt = '<img src="' . wsHTML5Link::getUniversalLocation($this->alternative) . '" width="' . $w . '" height="' . $h . '" />';
+               return $alt;
+       }
 
 }
 
 class htmlMultimediaPopupImage extends normalLink {
 
-    public function getURL() {
-        $this->copyExternalFile($this->alternative);
-        return '#/multimedia/' . $this->alternative;
-    }
+       public function getURL() {
+               $this->copyExternalFile($this->alternative);
+               return '#/multimedia/' . $this->alternative;
+       }
 
-    public function getAdditionnalContent() {
-        $dim = getimagesize($this->wdir . '/' . $this->alternative);
-        $markup = '<div class="multimediaContainer"><img src="' . wsHTML5Link::getUniversalLocation($this->alternative) . '" width="' . $dim[0] . '" height="' . $dim[1] . '" class="multimedia" /></div>';
-        return ' data-multimedia="' . rawurlencode($markup) . '" ';
-    }
+       public function getAdditionnalContent() {
+               $dim = getimagesize($this->wdir . '/' . $this->alternative);
+               $markup = '<div class="multimediaContainer"><img src="' . wsHTML5Link::getUniversalLocation($this->alternative) . '" width="' . $dim[0] . '" height="' . $dim[1] . '" class="multimedia" /></div>';
+               return ' data-multimedia="' . rawurlencode($markup) . '" ';
+       }
 
-    public function keep() {
-        return true;
-    }
+       public function keep() {
+               return true;
+       }
 
 }
 
 class contentLink extends wsHTML5Link {
 
-    public function getHTMLContainerClass() {
-        return 'link contentLink';
-    }
+       public function getHTMLContainerClass() {
+               return 'link contentLink';
+       }
 
 }
 
 class webLink extends normalLink {
 
-    public function getURL() {
-        return wsHTML5Link::getUniversalLocation($this->to);
-    }
+       public function getURL() {
+               return wsHTML5Link::getUniversalLocation($this->to);
+       }
 
-    public function getTarget() {
-        return $this->target;
-    }
+       public function getTarget() {
+               return $this->target;
+       }
 
-    public function getTrack() {
-        return ' data-track="' . $this->getURL() . '"';
-    }
+       public function getTrack() {
+               return ' data-track="' . $this->getURL() . '"';
+       }
 
-    public function getCSS() {
-        
-    }
+       public function getCSS() {
+               
+       }
+
+       public function getDefaultTooltip() {
+               return 'click to open the link';
+       }
 
 }
 
 class mailLink extends normalLink {
 
-    public function getURL() {
-        return 'mailto:' . $this->to;
-    }
+       public function getURL() {
+               return 'mailto:' . $this->to;
+       }
+
+       public function getTrack() {
+               return ' data-track="' . $this->to . '"';
+       }
 
-    public function getTrack() {
-        return ' data-track="' . $this->to . '"';
-    }
+       public function getTarget() {
+               return '_self';
+       }
 
-    public function getTarget() {
-        return '_self';
-    }
+       public function getDefaultTooltip() {
+               return 'click to send an e-mail';
+       }
 
 }
 
 class internalLink extends normalLink {
 
-    public function getURL() {
-        return '#/page/' . $this->getPage();
-    }
+       public function getURL() {
+               return '#/page/' . $this->getPage();
+       }
+
+       public function getPage() {
+               if ($this->numerotation == 'physical') {
+                       return $this->to;
+               } else {
+                       return $this->compiler->virtualToPhysical($this->to);
+               }
+       }
 
-    public function getPage() {
-        if ($this->numerotation == 'physical') {
-            return $this->to;
-        } else {
-            return $this->compiler->virtualToPhysical($this->to);
-        }
-    }
+       public function getDefaultTooltip() {
+               return 'go to page';
+       }
 
 }
 
 class videoLink extends wsHTML5Link {
 
-    public function getHTMLContent() {
-        $this->copyExternalFile($this->to, true);
-
-        $w = round($this->width * $this->getCssScale());
-        $h = round($this->height * $this->getCssScale());
-
-        return self::makeVideoTag($this, $w, $h, $this->compiler);
-    }
-
-    public static function makeVideoTag($linkDatas, $w = null, $h = null, $compiler = null) {
-        $file = $linkDatas->to;
-        $e = explode('.', $file);
-        $ext = array_pop($e);
-        $basename = implode('.', $e);
-
-        $autoplay = ($linkDatas->video_auto_start ? '1' : '0');
-        $controls = ($linkDatas->video_controls ? '1' : '0');
-        $loop = ($linkDatas->video_loop ? '1' : '0');
-        $sound = ($linkDatas->video_sound_on ? '1' : '0');
-
-        $res = '<div class="videoContainer" ';
-        if (!is_null($w) && !is_null($h)) {
-            $res.='data-width="' . $w . '" data-height="' . $h . '" ';
-        } else if (!is_null($compiler)) {
-
-            $path = WS_BOOKS . '/working/' . $compiler->book_id . '/' . $basename . '.jpg';
-            $dim = getimagesize($path);
-            $res.='data-width="' . $dim[0] . '" data-height="' . $dim[1] . '" ';
-        }
-        $res.=' data-autoplay="' . $autoplay . '"';
-        $res.=' data-controls="' . $controls . '"';
-        $res.=' data-loop="' . $loop . '"';
-        $res.=' data-sound="' . $sound . '"';
-        $res.=' data-name="' . $basename . '"';
-        $res.='></div>';
-        return $res;
-    }
+       public function getHTMLContent() {
+               $this->copyExternalFile($this->to, true);
+
+               $w = round($this->width * $this->getCssScale());
+               $h = round($this->height * $this->getCssScale());
+
+               return self::makeVideoTag($this, $w, $h, $this->compiler);
+       }
+
+       public static function makeVideoTag($linkDatas, $w = null, $h = null, $compiler = null) {
+               $file = $linkDatas->to;
+               $e = explode('.', $file);
+               $ext = array_pop($e);
+               $basename = implode('.', $e);
+
+               $autoplay = ($linkDatas->video_auto_start ? '1' : '0');
+               $controls = ($linkDatas->video_controls ? '1' : '0');
+               $loop = ($linkDatas->video_loop ? '1' : '0');
+               $sound = ($linkDatas->video_sound_on ? '1' : '0');
+
+               $res = '<div class="videoContainer" ';
+               if (!is_null($w) && !is_null($h)) {
+                       $res.='data-width="' . $w . '" data-height="' . $h . '" ';
+               } else if (!is_null($compiler)) {
+
+                       $path = WS_BOOKS . '/working/' . $compiler->book_id . '/' . $basename . '.jpg';
+                       $dim = getimagesize($path);
+                       $res.='data-width="' . $dim[0] . '" data-height="' . $dim[1] . '" ';
+               }
+               $res.=' data-autoplay="' . $autoplay . '"';
+               $res.=' data-controls="' . $controls . '"';
+               $res.=' data-loop="' . $loop . '"';
+               $res.=' data-sound="' . $sound . '"';
+               $res.=' data-name="' . $basename . '"';
+               $res.='></div>';
+               return $res;
+       }
 
 }
 
 class videoPopupLink extends normalLink {
 
-    public function getURL() {
-        $this->copyExternalFile($this->to, true);
-        $file = $this->to;
-        $e = explode('.', $file);
-        $ext = array_pop($e);
-        $basename = implode('.', $e);
+       public function getURL() {
+               $this->copyExternalFile($this->to, true);
+               $file = $this->to;
+               $e = explode('.', $file);
+               $ext = array_pop($e);
+               $basename = implode('.', $e);
 
-        return '#/video/' . $basename;
-    }
+               return '#/video/' . $basename;
+       }
 
-    public function getAdditionnalContent() {
-        return ' data-video="' . rawurlencode(videoLink::makeVideoTag($this, null, null, $this->compiler)) . '" ';
-    }
+       public function getAdditionnalContent() {
+               return ' data-video="' . rawurlencode(videoLink::makeVideoTag($this, null, null, $this->compiler)) . '" ';
+       }
 
-    public function keep() {
-        return true;
-    }
+       public function keep() {
+               return true;
+       }
+
+       public function getDefaultTooltip() {
+               return 'click to play the video';
+       }
 
 }
 
 class webVideoLink extends videoLink {
 
-    public function getHTMLContent() {
-        return $this->getEmbed();
-    }
+       public function getHTMLContent() {
+               return $this->getEmbed();
+       }
 
-    public function getEmbed() {
-        return '<iframe width="' . $this->width * $this->getCssScale() . '" height="' . $this->height * $this->getCssScale() . '" src="' . $this->getEmbedURL() . '" frameborder="0" allowfullscreen></iframe>';
-    }
+       public function getEmbed() {
+               return '<iframe width="' . $this->width * $this->getCssScale() . '" height="' . $this->height * $this->getCssScale() . '" src="' . $this->getEmbedURL() . '" frameborder="0" allowfullscreen></iframe>';
+       }
 
-    public function getEmbedURL() {
-        if ($this->video_service == 0) {
-            $url = 'http://www.youtube.com/embed/' . $this->to . '?html5=1';
-        } else {
-            $url = 'http://www.dailymotion.com/embed/video/' . $this->to;
-        }
-        return $url;
-    }
+       public function getEmbedURL() {
+               if ($this->video_service == 0) {
+                       $url = 'http://www.youtube.com/embed/' . $this->to . '?html5=1';
+               } else {
+                       $url = 'http://www.dailymotion.com/embed/video/' . $this->to;
+               }
+               return $url;
+       }
 
 }
 
 class actionLink extends internalLink {
 
-    public function getURL() {
-        return '#/' . $this->to;
-    }
+       public function getURL() {
+               return '#/' . $this->to;
+       }
 
 }
 
 class basketLink extends contentLink {
 
-    public function getCSS() {
-        return 'background-color:#fff;';
-    }
+       public function getCSS() {
+               return 'background-color:#fff;';
+       }
 
 }
 
 class colorLink extends contentLink {
 
-    public function getCSS() {
-        return 'background-color:' . wsHTML5Compiler::colorToCSS($this->to) . ';';
-    }
+       public function getCSS() {
+               return 'background-color:' . wsHTML5Compiler::colorToCSS($this->to) . ';';
+       }
 
 }
 
 class imageLink extends contentLink {
 
-    public function getCSS() {
-        $this->copyExternalFile($this->to);
-        return 'background-image:url(' . wsHTML5Link::getUniversalLocation($this->to, true) . ');background-size:100% 100%;background-repeat:no-repeat;';
-    }
+       public function getCSS() {
+               $this->copyExternalFile($this->to);
+               return 'background-image:url(' . wsHTML5Link::getUniversalLocation($this->to, true) . ');background-size:100% 100%;background-repeat:no-repeat;';
+       }
 
 }
 
 class fileLink extends normalLink {
 
-    public function getURL() {
-        $this->copyExternalFile($this->to);
-        return wsHTML5Link::getUniversalLocation($this->to);
-    }
+       public function getURL() {
+               $this->copyExternalFile($this->to);
+               return wsHTML5Link::getUniversalLocation($this->to);
+       }
+
+       public function getTarget() {
+               return '_blank';
+       }
 
-    public function getTarget() {
-        return '_blank';
-    }
+       public function getDefaultTooltip() {
+               return 'click to open the file';
+       }
 
 }
 
 class htmlMultimediaLink extends wsHTML5Link {
 
-    protected $_config = null;
-    protected $_content = '';
-
-    public function getHTMLContent() {
-        if ($this->_content == '') {
-            $ext = files::getExtension($this->alternative);
-            if ($ext == 'oam') {
-                $d = $this->unzipFile($this->alternative, true);
-                $this->_config = $this->getConfigOAM($d['dir']);
-            } else {
-                $d = $this->unzipFile($this->alternative, false);
-                $this->_config = $this->getConfigZIP($d['dir']);
-            }
-
-            $w = $this->width * $this->getCssScale();
-            $h = $this->height * $this->getCssScale();
-
-            $iw = $this->_config['width'];
-            $ih = $this->_config['height'];
-
-            $res = '<iframe width="' . $iw . '" height="' . $ih . '" src="' . $d['fdir'] . '/' . $this->_config['html'] . '" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>';
-            $this->copyExternalDir($d['dir']);
-            $this->_content = $res;
-        }
-        return $this->_content;
-    }
-
-    protected function _correctFiles($dir) {
-        $files = CubeIT_Files::getRecursiveDirectoryIterator($dir);
-        foreach ($files as $f) {
-            /* @var $f SplFileInfo */
-            if ($f->getExtension() == 'js') {
-                $this->_correctFile($f);
-            }
-        }
-    }
-
-    public function getCSSContainer() {
-        if (!($this instanceof contentLink) && $this->page % 2 == 1) {
-            $this->page--;
-            $this->left+=$this->compiler->width;
-        }
-
-        $css = '#l_' . $this->id . '{';
-        $css.='left:' . $this->left * $this->getCssScale() . 'px;top:' . $this->top * $this->getCssScale() . 'px;';
-        $css.='width:' . $this->_config['width'] . 'px;height:' . $this->_config['height'] . 'px;';
-        $css.=$this->getCSS();
-        $css.='}';
-        return $css;
-    }
-
-    public function getCSS() {
-        $sx = ($this->width / ($this->_config['width'])) * $this->getCssScale();
-        $sy = ($this->height / ($this->_config['height'])) * $this->getCssScale();
-
-        $res = wsHTML5Compiler::writeCSSUA('transform', 'scale(' . $sx . ',' . $sy . ')');
-        $res.= wsHTML5Compiler::writeCSSUA('transform-origin', '0% 0%');
-        return $res;
-    }
-
-    public function getConfigZIP($d) {
-        return array('html' => 'index.html', 'width' => $this->video_width, 'height' => $this->video_height);
-    }
-
-    public function getConfigOAM($d) {
-        $x = simplexml_load_file($d . '/config.xml');
-        $config = (string) $x->oamfile['src'];
-        $config = str_replace('/Assets', '', $d . '/' . $config);
-        $x = simplexml_load_file($config, 'SimpleXMLElement', LIBXML_NOCDATA);
-        $c = CubeIT_Util_Xml::toObject($x);
-
-        $props = array('default-width' => 'width', 'default-height' => 'height', 'html-page' => 'html');
-
-
-        $res = array('content' => trim($c->content), 'name' => $c->_name, 'assets' => array());
-        foreach ($c->properties->property as $p) {
-            if (isset($props[$p->_name])) {
-                $res[$props[$p->_name]] = $p->_defaultValue;
-            }
-        }
-        foreach ($c->require as $r) {
-            if ($r->_type == 'folder') {
-                continue;
-            }
-            $res['assets'][] = $r->_src;
-        }
-
-        return $res;
-    }
+       protected $_config = null;
+       protected $_content = '';
+
+       public function getHTMLContent() {
+               if ($this->_content == '') {
+                       $ext = files::getExtension($this->alternative);
+                       if ($ext == 'oam') {
+                               $d = $this->unzipFile($this->alternative, true);
+                               $this->_config = $this->getConfigOAM($d['dir']);
+                       } else {
+                               $d = $this->unzipFile($this->alternative, false);
+                               $this->_config = $this->getConfigZIP($d['dir']);
+                       }
+
+                       $w = $this->width * $this->getCssScale();
+                       $h = $this->height * $this->getCssScale();
+
+                       $iw = $this->_config['width'];
+                       $ih = $this->_config['height'];
+
+                       $res = '<iframe width="' . $iw . '" height="' . $ih . '" src="' . $d['fdir'] . '/' . $this->_config['html'] . '" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>';
+                       $this->copyExternalDir($d['dir']);
+                       $this->_content = $res;
+               }
+               return $this->_content;
+       }
+
+       protected function _correctFiles($dir) {
+               $files = CubeIT_Files::getRecursiveDirectoryIterator($dir);
+               foreach ($files as $f) {
+                       /* @var $f SplFileInfo */
+                       if ($f->getExtension() == 'js') {
+                               $this->_correctFile($f);
+                       }
+               }
+       }
+
+       public function getCSSContainer() {
+               if (!($this instanceof contentLink) && $this->page % 2 == 1) {
+                       $this->page--;
+                       $this->left+=$this->compiler->width;
+               }
+
+               $css = '#l_' . $this->id . '{';
+               $css.='left:' . $this->left * $this->getCssScale() . 'px;top:' . $this->top * $this->getCssScale() . 'px;';
+               $css.='width:' . $this->_config['width'] . 'px;height:' . $this->_config['height'] . 'px;';
+               $css.=$this->getCSS();
+               $css.='}';
+               return $css;
+       }
+
+       public function getCSS() {
+               $sx = ($this->width / ($this->_config['width'])) * $this->getCssScale();
+               $sy = ($this->height / ($this->_config['height'])) * $this->getCssScale();
+
+               $res = wsHTML5Compiler::writeCSSUA('transform', 'scale(' . $sx . ',' . $sy . ')');
+               $res.= wsHTML5Compiler::writeCSSUA('transform-origin', '0% 0%');
+               return $res;
+       }
+
+       public function getConfigZIP($d) {
+               return array('html' => 'index.html', 'width' => $this->video_width, 'height' => $this->video_height);
+       }
+
+       public function getConfigOAM($d) {
+               $x = simplexml_load_file($d . '/config.xml');
+               $config = (string) $x->oamfile['src'];
+               $config = str_replace('/Assets', '', $d . '/' . $config);
+               $x = simplexml_load_file($config, 'SimpleXMLElement', LIBXML_NOCDATA);
+               $c = CubeIT_Util_Xml::toObject($x);
+
+               $props = array('default-width' => 'width', 'default-height' => 'height', 'html-page' => 'html');
+
+
+               $res = array('content' => trim($c->content), 'name' => $c->_name, 'assets' => array());
+               foreach ($c->properties->property as $p) {
+                       if (isset($props[$p->_name])) {
+                               $res[$props[$p->_name]] = $p->_defaultValue;
+                       }
+               }
+               foreach ($c->require as $r) {
+                       if ($r->_type == 'folder') {
+                               continue;
+                       }
+                       $res['assets'][] = $r->_src;
+               }
+               return $res;
+       }
 
 }
 
 class webVideoPopupLink extends videoPopupLink {
 
-    public function getURL() {
-        if ($this->video_service == 0) {
-            $service = 'youtube';
-        } elseif ($this->video_service == 1) {
-            $service = 'dailymotion';
-        }
-        return '#/webvideo/' . $service . '/' . $this->to;
-    }
+       public function getURL() {
+               if ($this->video_service == 0) {
+                       $service = 'youtube';
+               } elseif ($this->video_service == 1) {
+                       $service = 'dailymotion';
+               }
+               return '#/webvideo/' . $service . '/' . $this->to;
+       }
 
 }
 
 class wescoLink extends normalLink {
 
-    public function getURL() {
-        return 'http://workshop.fluidbook.com/services/wescoRef?ref=' . $this->to;
-    }
+       public function getURL() {
+               return 'http://workshop.fluidbook.com/services/wescoRef?ref=' . $this->to;
+       }
 
-    public function getTarget() {
-        return '_blank';
-    }
+       public function getTarget() {
+               return '_blank';
+       }
 
 }
 
 class haguenauManifLink extends internalLink {
 
-    public function getPage() {
-        $fiches = array(
-            "1" => 7, "2" => 8, "3" => 14, "4" => 16, "5" => 17, "6" => 18, "7" => 19, "8" => 20, "9" => 22, "10" => 23, "11" => 24, "12" => 27
-            , "13" => 29, "14" => 32, "15" => 34, "16" => 37, "17" => 38, "18" => 41, "19" => 43,
-            "20" => 45, "21" => 46, "22" => 52, "23" => 53, "24" => 54, "25" => 56, "26" => 59, "27" => 60
-        );
-        return $fiches[$this->to];
-    }
+       public function getPage() {
+               $fiches = array(
+                       "1" => 7, "2" => 8, "3" => 14, "4" => 16, "5" => 17, "6" => 18, "7" => 19, "8" => 20, "9" => 22, "10" => 23, "11" => 24, "12" => 27
+                       , "13" => 29, "14" => 32, "15" => 34, "16" => 37, "17" => 38, "18" => 41, "19" => 43,
+                       "20" => 45, "21" => 46, "22" => 52, "23" => 53, "24" => 54, "25" => 56, "26" => 59, "27" => 60
+               );
+               return $fiches[$this->to];
+       }
 
 }