Skip to content
Snippets Groups Projects
Commit 19dab41c authored by Pierre-Jean CHANCELLIER's avatar Pierre-Jean CHANCELLIER
Browse files

re-activate tooltips

parent 4809be7f
No related branches found
No related tags found
No related merge requests found
......@@ -47,6 +47,10 @@ $info: #0a8299;
table-layout: fixed;
}
& > :not(:first-child) {
border-top: none;
}
&.sortable thead {
tr {
border-left: 1px solid var(--text-primary-color);
......
......@@ -16,6 +16,8 @@
</template>
<script>
import Tooltip from "~/node_modules/bootstrap/js/dist/tooltip"
export default {
props: {
textContent: {
......@@ -26,14 +28,16 @@ export default {
methods: {
copyText() {
navigator.clipboard.writeText(this.textContent)
// $("#btncopy").tooltip({
// title: this.$t("copie") + " !",
// trigger: "manual"
// })
// $("#btncopy").tooltip("show")
// setTimeout(() => {
// $("#btncopy").tooltip("hide")
// }, 1000)
let btn = document.querySelector("#btncopy")
let tooltip = new Tooltip(btn, {
title: this.$t("copie") + " !",
trigger: "manual"
})
tooltip.show()
setTimeout(() => {
tooltip.hide()
}, 1000)
}
}
}
......
......@@ -3,7 +3,7 @@
<div class="card-body">
<div
class="uid-wrapper d-flex align-items-center justify-content-between mb-4">
<h2 class="card-title text-center d-flex align-items-center">
<h2 class="h3 card-title text-center d-flex align-items-center">
<span class="text-truncate d-inline-block">
{{ hash.uid }}
</span>
......
import i18n from "./i18n"
import webpack from "webpack"
import pkg from "./package.json"
export default {
......@@ -31,11 +30,7 @@ export default {
css: ["@/assets/css/style.scss"],
// Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
plugins: [
"~plugins/favourites.js",
"~plugins/filters.js",
{ src: "~/plugins/bootstrap.js", mode: "client" }
],
plugins: ["~plugins/favourites.js", "~plugins/filters.js"],
// Auto import components: https://go.nuxtjs.dev/config-components
components: true,
......
......@@ -113,7 +113,7 @@
<td class="p-0">
<div class="list-group rounded-0">
<nuxt-link
class="list-group-item list-group-item-action border-0 d-flex justify-content-between"
class="list-group-item list-group-item-action border-0 d-flex justify-content-between p-3"
:to="
localePath('/membre/?hash=' + member.member.hash)
"
......
import bootstrap from "bootstrap"
import Vue from "vue"
import Tooltip from "~/node_modules/bootstrap/js/dist/tooltip"
export default (context, inject) => {
let liste_favoris = localStorage.favourites
......@@ -6,20 +7,21 @@ export default (context, inject) => {
: []
let toggleFavourite = (uid, e) => {
// $(e.target).tooltip({
// title: function () {
// return context.$favourites.list.includes(uid)
// ? context.app.i18n.t("favoris.supprime")
// : context.app.i18n.t("favoris.enregistre")
// },
// html: true,
// trigger: "manual"
// })
let btn = e.currentTarget
let tooltip = new Tooltip(btn, {
title: function () {
return context.$favourites.list.includes(uid)
? context.app.i18n.t("favoris.supprime")
: context.app.i18n.t("favoris.enregistre")
},
html: true,
trigger: "manual"
})
// $(e.target).tooltip("show")
// setTimeout(() => {
// $(e.target).tooltip("hide")
// }, 600)
tooltip.show()
setTimeout(() => {
tooltip.hide()
}, 1000)
if (!context.$favourites.list.includes(uid)) {
context.$favourites.list.push(uid)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment