From: nael Date: Wed, 7 Aug 2019 10:00:32 +0000 (+0200) Subject: wip #2934 @1.40 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=7a3d66ec8b83781cecb99465c76181a2679bb2f7;p=pmi.git wip #2934 @1.40 --- diff --git a/public/_modules/product-detail-page/index.html b/public/_modules/product-detail-page/index.html index aa7274a..5a9157a 100644 --- a/public/_modules/product-detail-page/index.html +++ b/public/_modules/product-detail-page/index.html @@ -157,22 +157,13 @@ - - - - - - - -

Télécharger la fiche produit

-
+ +
?
diff --git a/public/_modules/product-detail-page/main.js b/public/_modules/product-detail-page/main.js index da7f218..27bf957 100644 --- a/public/_modules/product-detail-page/main.js +++ b/public/_modules/product-detail-page/main.js @@ -1,9 +1,11 @@ // jshint ignore: start -var ref = $('.question-tooltip'); -var popup = $('#popup'); -// popup.hide(); -// ref.on('click',function(){ -// popup.show(); -// }); - +tippy('.question-tooltip', { + arrow: true, + arrowType: 'sharp', // or 'sharp' (default) + animation: 'shift-away', + content: $('.question-tooltip').data('tooltip-content'), + flipBehavior: ["top", "bottom"], + theme: 'custom', + placement: 'top', +}); diff --git a/public/_modules/product-detail-page/style.styl b/public/_modules/product-detail-page/style.styl index 5661370..978e04e 100644 --- a/public/_modules/product-detail-page/style.styl +++ b/public/_modules/product-detail-page/style.styl @@ -12,27 +12,15 @@ font-weight: 600 cursor: pointer -//.tooltip -// margin-top: 55px; -// position relative -// &-arrow -// width 20px -// height 20px -// background #6B7287 -// position absolute -// bottom -5px -// transform rotate(45deg) -// &-inner -// background #6B7287 -// padding 1.5rem -// border-radius 3px -// color white - //margin-top: -35px - //position: relative - //top: 5px -#popup - background #6B7287 - padding 1.5rem - color: white - border-radius 3px - max-width: 388px \ No newline at end of file +.tippy-tooltip + max-width 380px!important +.tippy-tooltip.custom-theme + background-color: #6B7287; + color: white; + padding: 1.5rem + +.tippy-tooltip.custom-theme[x-placement^='top'] .tippy-arrow + border-top-color: #6B7287; + +.tippy-tooltip.custom-theme[x-placement^='bottom'] .tippy-arrow + border-bottom-color: #6B7287;