Skip to content

Commit

Permalink
Activate tooltips only on hover
Browse files Browse the repository at this point in the history
  • Loading branch information
nboisteault committed Sep 19, 2024
1 parent c2089a3 commit a051777
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
4 changes: 3 additions & 1 deletion assets/src/components/Digitizing.js
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,9 @@ export default class Digitizing extends HTMLElement {
render(mainTemplate(), this);

const tooltipTriggerList = this.querySelectorAll('[data-bs-toggle="tooltip"]');
[...tooltipTriggerList].map(tooltipTriggerEl => new bootstrap.Tooltip(tooltipTriggerEl));
[...tooltipTriggerList].map(tooltipTriggerEl => new bootstrap.Tooltip(tooltipTriggerEl, {
trigger: 'hover'
}));

mainEventDispatcher.addListener(
() => {
Expand Down
4 changes: 3 additions & 1 deletion assets/src/legacy/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -3985,6 +3985,8 @@ $(document).ready(function () {

// Init bootstrap tooltips
const tooltipTriggerList = document.querySelectorAll('[data-bs-toggle="tooltip"]');
[...tooltipTriggerList].map(tooltipTriggerEl => new bootstrap.Tooltip(tooltipTriggerEl));
[...tooltipTriggerList].map(tooltipTriggerEl => new bootstrap.Tooltip(tooltipTriggerEl, {
trigger: 'hover'
}));
$( "#loading" ).css('min-height','128px');
});
4 changes: 3 additions & 1 deletion assets/src/legacy/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ var searchProjects = function(){

// Activate tooltips
const tooltipTriggerList = document.querySelectorAll('[data-bs-toggle="tooltip"]');
[...tooltipTriggerList].map(tooltipTriggerEl => new bootstrap.Tooltip(tooltipTriggerEl));
[...tooltipTriggerList].map(tooltipTriggerEl => new bootstrap.Tooltip(tooltipTriggerEl, {
trigger: 'hover'
}));

// Handle keywords/title toggle
$('#toggle-search').click(function(){
Expand Down
2 changes: 1 addition & 1 deletion assets/src/modules/ExecuteJSFromServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export default function executeJSFromServer() {
const tooltipTriggerList = document.querySelectorAll('#mapmenu .nav-list > li > a');
[...tooltipTriggerList].map(tooltipTriggerEl => {
bootstrap.Tooltip.getInstance(tooltipTriggerEl).dispose();
new bootstrap.Tooltip(tooltipTriggerEl, { placement: 'bottom' });
new bootstrap.Tooltip(tooltipTriggerEl, { placement: 'bottom', trigger: 'hover' });
});

// move search tool
Expand Down

4 comments on commit a051777

@3liz-bot
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The latest weekly run of end2end "playwright" tests failed with this latest commit on the branch release_3_6 😣

CC @nboisteault and @Gustry, please have a look to the logs. Maybe it's a false positive ?

Visit https://github.com/3liz/lizmap-web-client/actions/runs/10987148395

@3liz-bot
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The latest weekly run of end2end "cypress" tests failed with this latest commit on the branch release_3_6 😣

CC @nboisteault and @Gustry, please have a look to the logs. Maybe it's a false positive ?

Visit https://github.com/3liz/lizmap-web-client/actions/runs/10987148395

@3liz-bot
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The latest weekly run of end2end "cypress" tests failed with this latest commit on the branch release_3_7 😣

CC @nboisteault and @Gustry, please have a look to the logs. Maybe it's a false positive ?

Visit https://github.com/3liz/lizmap-web-client/actions/runs/10987148370

@3liz-bot
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The latest weekly run of end2end "playwright" tests failed with this latest commit on the branch master 😣

CC @nboisteault and @Gustry, please have a look to the logs. Maybe it's a false positive ?

Visit https://github.com/3liz/lizmap-web-client/actions/runs/10987148296

Please sign in to comment.