diff --git a/lemarche/fixtures/django/01_siaes.json b/lemarche/fixtures/django/01_siaes.json index 1511d14d0..867ce0488 100644 --- a/lemarche/fixtures/django/01_siaes.json +++ b/lemarche/fixtures/django/01_siaes.json @@ -103967,7 +103967,8 @@ "source": "ASP", "created_at": "2020-04-09T13:36:57.328Z", "updated_at": "2020-12-18T10:40:08.674Z", - "slug": "ei-garage-martinet-siege-13" + "slug": "ei-garage-martinet-siege-13", + "super_badge": true } }, { @@ -103994,7 +103995,8 @@ "source": "GEIQ", "created_at": "2020-04-14T16:09:19.471Z", "updated_at": "2020-12-18T09:56:51.812Z", - "slug": "geiq-vertigo-films-13" + "slug": "geiq-vertigo-films-13", + "super_badge": true } }, { @@ -104022,7 +104024,8 @@ "source": "ASP", "created_at": "2020-12-01T10:30:23.006Z", "updated_at": "2020-12-18T10:40:07.948Z", - "slug": "job-insertion-90-90" + "slug": "job-insertion-90-90", + "super_badge": true } }, { @@ -104053,7 +104056,8 @@ "source": "USER_CREATED", "created_at": "2020-12-18T13:08:07.627Z", "updated_at": "2020-12-18T13:08:08.043Z", - "slug": "el-garage-martinet-nord-13" + "slug": "el-garage-martinet-nord-13", + "super_badge": true } }, { @@ -104114,4 +104118,4 @@ "slug": "les-moulins-de-limmobilier-13" } } -] +] \ No newline at end of file diff --git a/lemarche/static/itou_marche/sections/_siae.scss b/lemarche/static/itou_marche/sections/_siae.scss index 9b1b52dca..caa43b1a9 100644 --- a/lemarche/static/itou_marche/sections/_siae.scss +++ b/lemarche/static/itou_marche/sections/_siae.scss @@ -255,7 +255,9 @@ .siae-card { margin-bottom: 1.5rem; - + &[data-url]{ + cursor: pointer; + }; .sc-profile-type, .sc-profile-sectors { span.ml-1 { @@ -309,6 +311,10 @@ $super-badge-color: #ffbe18; line-height: 20px; letter-spacing: 0px; text-align: left; + + &:hover { + cursor: help; + } } .super-badge-tab { diff --git a/lemarche/static/itou_marche/utils.scss b/lemarche/static/itou_marche/utils.scss index cd58a32e2..e5dc55d38 100644 --- a/lemarche/static/itou_marche/utils.scss +++ b/lemarche/static/itou_marche/utils.scss @@ -27,3 +27,18 @@ transform: rotate(360deg); } } + +.tooltip-inner { + max-width: 50em; + padding: 3px 8px; + background-color: #fff; + color: #000; + text-align: left; + border: 1px solid #cccdd7; + border-radius: 0.25rem; +} + +.icon-success { + color: $green; + font-weight: bold; +} diff --git a/lemarche/static/js/utils.js b/lemarche/static/js/utils.js index f8abfffb8..0c094685e 100644 --- a/lemarche/static/js/utils.js +++ b/lemarche/static/js/utils.js @@ -22,6 +22,26 @@ window.addEventListener('DOMContentLoaded', function () { initModalMessages(); + $('.super-badge-badge').each(function (element) { + $(this).tooltip( + { + html: true, + placement: "bottom", + title: $('#tooltip-super-badge').html() + }); + }); + + document.querySelectorAll('.siae-card[data-url]').forEach(function (card) { + card.addEventListener('click', function (event) { + if (event.target.className == 'ri-star-line ri-xl') { + // manage case of favorites + event.preventDefault() + } + else if (this.dataset.url) window.open(this.dataset.url, '_blank'); + + }); + }); + $('.s-tabs-01__nav .nav-item').on('click', function (event) { event.preventDefault() let tabContent = this.parentElement.parentElement.querySelector(".tab-content"); diff --git a/lemarche/templates/dashboard/home_siae.html b/lemarche/templates/dashboard/home_siae.html index 147261aef..0af26e529 100644 --- a/lemarche/templates/dashboard/home_siae.html +++ b/lemarche/templates/dashboard/home_siae.html @@ -139,5 +139,6 @@