Skip to content
Snippets Groups Projects
Commit fbb7a629 authored by Anthony's avatar Anthony
Browse files

Reuse bootstrap popover

parent 7d4612bc
Branches
No related tags found
No related merge requests found
...@@ -126,15 +126,6 @@ a.active { ...@@ -126,15 +126,6 @@ a.active {
text-decoration: underline; text-decoration: underline;
} }
.commentaireInfo {
padding: 10px;
border-radius: 10px;
background-color: var(--secondary-background-color);
border: 1px solid var(--macao-primary-color);
color: black;
max-width: 500px;
}
em:not(:has(strong)) { em:not(:has(strong)) {
background-color: lightgray; background-color: lightgray;
......
...@@ -8,13 +8,26 @@ $(document).ready(function() { ...@@ -8,13 +8,26 @@ $(document).ready(function() {
$('.book-header').show(); $('.book-header').show();
$('.commentaireInfo').hide(); $('.commentaireInfo').hide();
$('.commentaireInfo').prop('popover', 'auto'); // $('.commentaireInfo').prop('popover', 'auto');
$('.commentaireInfoGroup').prop("hidden", false); $('.commentaireInfoGroup').show();
// Comment popover // Comment popover
$('[spanid]').addClass('comment-trigger').on('click', function() { $('[spanid]').addClass('comment-trigger').each(function (){
let spanid = $(this).attr('spanid'); const spanid = $(this).attr('spanid');
$("[commentaireid=" + spanid + "]").toggle();
if($("[commentaireid=" + spanid + "]").length !== 0) {
$(this).popover({
trigger: 'click',
html: true,
placement: 'auto',
content: $("[commentaireid=" + spanid + "]")
});
$("[commentaireid=" + spanid + "]").toggle()
}
});
$(document).on('click', function() {
$('[spanid]').popover('hide');
}); });
// Simplify th in td // Simplify th in td
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment