You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by ke...@apache.org on 2021/10/06 19:34:31 UTC

[allura] 01/01: Configuration improvement to global tooltips

This is an automated email from the ASF dual-hosted git repository.

kentontaylor pushed a commit to branch kt/screenshots_page_extend
in repository https://gitbox.apache.org/repos/asf/allura.git

commit 71359266662bbc8ad4caf3a5f8136672cc7b81d8
Author: Kenton Taylor <kt...@slashdotmedia.com>
AuthorDate: Tue Oct 5 19:51:24 2021 +0000

    Configuration improvement to global tooltips
---
 Allura/allura/templates/jinja_master/master.html | 30 ++++++++++++++----------
 1 file changed, 17 insertions(+), 13 deletions(-)

diff --git a/Allura/allura/templates/jinja_master/master.html b/Allura/allura/templates/jinja_master/master.html
index 9b6042e..5c2b15a 100644
--- a/Allura/allura/templates/jinja_master/master.html
+++ b/Allura/allura/templates/jinja_master/master.html
@@ -176,20 +176,24 @@
 {% endif %}
 <script>
     $(document).ready(function () {
-        $(".tooltip, .m-tooltip").tooltipster({
-            animation: 'fade',
-            delay: 200,
-            theme: 'tooltipster-light',
-            trigger: 'hover',
-            position: 'right',
-            iconCloning: false,
-            maxWidth: 300
-        }).focus(function () {
-            $(this).tooltipster('show');
-        }).blur(function () {
-            $(this).tooltipster('hide');
+        $(".tooltip, .m-tooltip").each(function(){
+            let $el = $(this);
+            $el.tooltipster({
+                animation: 'fade',
+                delay: 200,
+                theme: 'tooltipster-light',
+                trigger: 'hover',
+                position: $el.data('position') || 'right',
+                iconCloning: false,
+                maxWidth: 300,
+                contentAsHTML: true,
+                interactive: true
+            }).focus(function () {
+                $(this).tooltipster('show');
+            }).blur(function () {
+                $(this).tooltipster('hide');
+            });
         });
-
     });
 </script>
 </body>