From f19b0af5d71476ab235d8e4be2d7e41f9ab38072 Mon Sep 17 00:00:00 2001
From: Alex ORLUC <alex.orluc@maarch.org>
Date: Wed, 15 Apr 2020 17:57:52 +0200
Subject: [PATCH] FEAT #13670 TIME 1:30 fix tooltipster plugin

---
 angular.json                                   |  3 +++
 src/frontend/app/signature-book.component.html |  4 ++--
 src/frontend/app/signature-book.component.ts   | 12 +++++++-----
 3 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/angular.json b/angular.json
index 78e0cdebdb5..77f835ea67d 100755
--- a/angular.json
+++ b/angular.json
@@ -21,6 +21,8 @@
               "./src/frontend/css/font-awesome-maarch/css/font-maarch.css",
               "./node_modules/bootstrap/dist/css/bootstrap.min.css",
               "./node_modules/jstree-bootstrap-theme/dist/themes/proton/style.min.css",
+              "./node_modules/tooltipster/dist/css/tooltipster.bundle.min.css",
+              "./node_modules/tooltipster/dist/css/plugins/tooltipster/sideTip/themes/tooltipster-sideTip-light.min.css",
               "./src/frontend/css/maarch-material.css",
               "./src/frontend/css/engine.scss",
               "./src/frontend/css/engine_2.scss",
@@ -30,6 +32,7 @@
               "./node_modules/jquery/dist/jquery.min.js",
               "./node_modules/jstree-bootstrap-theme/dist/jstree.min.js",
               "./node_modules/jquery.nicescroll/dist/jquery.nicescroll.min.js",
+              "./node_modules/tooltipster/dist/js/tooltipster.bundle.min.js",
               "node_modules/tinymce/tinymce.min.js"
             ],
             "assets": [
diff --git a/src/frontend/app/signature-book.component.html b/src/frontend/app/signature-book.component.html
index 778f6150971..1763a20ae1e 100755
--- a/src/frontend/app/signature-book.component.html
+++ b/src/frontend/app/signature-book.component.html
@@ -252,7 +252,7 @@
     </div>
 </div>
 
-<!-- <div class="tooltip_templates" style="display: none">
+<div class="tooltip_templates" style="display: none">
     <span id="obsVersionTooltip">
         <div *ngIf="signatureBook.attachments[rightSelectedThumbnail] && signatureBook.attachments[rightSelectedThumbnail].relation > 1">
             <div *ngFor="let version of signatureBook.attachments[rightSelectedThumbnail].obsAttachments">
@@ -266,4 +266,4 @@
             </div>
         </div>
     </span>
-</div> -->
+</div>
diff --git a/src/frontend/app/signature-book.component.ts b/src/frontend/app/signature-book.component.ts
index 5ef6527b419..83d2989cc34 100755
--- a/src/frontend/app/signature-book.component.ts
+++ b/src/frontend/app/signature-book.component.ts
@@ -173,11 +173,13 @@ export class SignatureBookComponent implements OnInit {
 
                     setTimeout(() => {
                         $('#rightPanelContent').niceScroll({ touchbehavior: false, cursorcolor: '#666', cursoropacitymax: 0.6, cursorwidth: '4' });
-                        // if ($('.tooltipstered').length == 0) {
-                        //     $('#obsVersion').tooltipster({
-                        //         interactive: true
-                        //     });
-                        // }
+
+                        if ($('.tooltipstered').length === 0) {
+                            $('#obsVersion').tooltipster({
+                                theme: 'tooltipster-light',
+                                interactive: true
+                            });
+                        }
                     }, 0);
                     this.loadBadges();
                     this.loadActions();
-- 
GitLab