]> _ Git - cubeextranet.git/commitdiff
wip #1112 @1
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Mon, 27 Feb 2017 14:37:45 +0000 (14:37 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Mon, 27 Feb 2017 14:37:45 +0000 (14:37 +0000)
inc/ws/Util/html5/class.ws.html5.compiler.php
inc/ws/Util/html5/class.ws.html5.links.php

index fda34eb6bee0c84ef12c3c35eeadab0500073381..b683fc9fc53277e6cf9bb1a88ac630cec8cd7890 100644 (file)
@@ -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();
index 952fed1e30cf1581d1c3691cef8c2fce82581036..f1310aac3ee25dd8a9299fd901a8c2fefcd91a08 100644 (file)
@@ -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() {