]> _ Git - cubeextranet.git/commitdiff
wip #2190 @1
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Wed, 22 Aug 2018 13:56:56 +0000 (13:56 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Wed, 22 Aug 2018 13:56:56 +0000 (13:56 +0000)
inc/ws/Util/html5/master/class.ws.html5.compiler.php
inc/ws/Util/html5/master/class.ws.html5.links.php

index f2a3678e7aa23ccbfa6650a4ba8b093c8d87d456..4ecb5b1c48e175ec51a52151a963c4a89e8d0109 100644 (file)
@@ -860,7 +860,6 @@ class wsHTML5Compiler
                                $this->vdir->copy($this->wdir . '/' . $ic, 'data/images/' . $ic);
                        }
                }
-
        }
 
        protected function writeLinks()
@@ -1266,7 +1265,6 @@ class wsHTML5Compiler
        {
                global $core;
 
-
                switch ($this->book->parametres->mobileVersion) {
                        case 'html5-desktop':
                                $this->backgroundsPrefix = array('t', 'p');
@@ -1309,6 +1307,7 @@ class wsHTML5Compiler
                                }
                        }
 
+
                        foreach ($this->getResolutions() as $r) {
                                foreach ($this->backgroundsPrefix as $backgroundsPrefix) {
                                        $srcPrefix = $backgroundsPrefix;
index 58eee0cd952884ca970610472b1f62676424e2ea..5914e4934bd0fa10faa42d5745843eec95c52606 100644 (file)
@@ -123,7 +123,11 @@ class wsHTML5Link
                                        return new audioPopupLink($id, $init, $compiler);
                                }
                        case 18:
-                               return new tooltipLink($id, $init, $compiler);
+                               if ($init['inline']) {
+                                       return new tooltipLink($id, $init, $compiler);
+                               } else {
+                                       return new textPopupLink($id, $init, $compiler);
+                               }
                        case 19:
                                break;
                        case 20:
@@ -399,6 +403,31 @@ class tooltipLink extends normalLink
        }
 }
 
+class textPopupLink extends normalLink
+{
+       public function getClasses()
+       {
+               return array_merge(array('lazy', 'textpopup'), parent::getClasses());
+       }
+
+       public function getAdditionnalContent()
+       {
+               $res = parent::getAdditionnalContent();
+               $res .= ' data-text="' . $this->infobulle . '" ';
+               return $res;
+       }
+
+       public function getURL()
+       {
+               return '#';
+       }
+
+       public function getTooltip()
+       {
+               return '';
+       }
+}
+
 class htmlMultimediaImage extends wsHTML5Link
 {
        public $zindex = 2;