From e5e9404a007e244b2a804a9242637e432a925890 Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Mon, 27 Feb 2017 14:37:45 +0000 Subject: [PATCH] wip #1112 @1 --- inc/ws/Util/html5/class.ws.html5.compiler.php | 6 ++++++ inc/ws/Util/html5/class.ws.html5.links.php | 16 ++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/inc/ws/Util/html5/class.ws.html5.compiler.php b/inc/ws/Util/html5/class.ws.html5.compiler.php index fda34eb6b..b683fc9fc 100644 --- a/inc/ws/Util/html5/class.ws.html5.compiler.php +++ b/inc/ws/Util/html5/class.ws.html5.compiler.php @@ -721,6 +721,12 @@ class wsHTML5Compiler { $this->specialCSS[] = 'style/special/wescosales.css'; } + if ($this->book->parametres->customLinkClass == 'AtlanticDownloadLink') { + $this->specialJsFiles[] = 'js/libs/interact.js'; + $this->specialJsFiles[] = 'js/libs/fluidbook/special/atlanticdownload.js'; + $this->specialCSS[] = 'style/special/atlanticdownload.css'; + } + $this->config->links = array(); $this->config->clinks = array(); $this->config->bookmarkGroups = array(); diff --git a/inc/ws/Util/html5/class.ws.html5.links.php b/inc/ws/Util/html5/class.ws.html5.links.php index 952fed1e3..f1310aac3 100644 --- a/inc/ws/Util/html5/class.ws.html5.links.php +++ b/inc/ws/Util/html5/class.ws.html5.links.php @@ -71,6 +71,8 @@ class wsHTML5Link { return new pierronLink($id, $init, $compiler); case 'WescoSalesLink': return new wescoSalesLink($id, $init, $compiler); + case 'AtlanticDownloadLink': + return new atlanticDownloadLink($id, $init, $compiler); } break; case 8: @@ -956,6 +958,20 @@ class wescoSalesLink extends normalLink { } } +class atlanticDownloadLink extends normalLink { + public function getUrl() { + return '#'; + } + + public function getAdditionnalContent() { + return parent::getAdditionnalContent() . ' data-atlanticdownload-ref="' . $this->to . '" '; + } + + public function getTooltip() { + return 'Télécharger les documents'; + } +} + class inpesPopinLink extends htmlMultimediaLink { public function getHTMLContent() { -- 2.39.5