1
0
forked from ScoDoc/ScoDoc

data-tooltip + enableToolTip sur la sidebar

This commit is contained in:
Iziram 2024-05-24 10:37:11 +02:00
parent 2ed4516a97
commit 881bf82000
5 changed files with 8 additions and 9 deletions

View File

@ -25,8 +25,7 @@
#
##############################################################################
"""HTML Header/Footer for ScoDoc pages
"""
"""HTML Header/Footer for ScoDoc pages"""
import html
@ -101,7 +100,7 @@ _HTML_BEGIN = f"""<!DOCTYPE html>
<script src="{scu.STATIC_DIR}/libjs/menu.js"></script>
<script src="{scu.STATIC_DIR}/libjs/bubble.js"></script>
<script>
window.onload=function(){{enableTooltips("gtrcontent")}};
window.onload=function(){{enableTooltips("gtrcontent"); enableTooltips("sidebar");}};
</script>
<script src="{scu.STATIC_DIR}/jQuery/jquery.js"></script>
@ -218,7 +217,7 @@ def sco_header(
<script src="{scu.STATIC_DIR}/libjs/menu.js"></script>
<script src="{scu.STATIC_DIR}/libjs/bubble.js"></script>
<script>
window.onload=function(){{enableTooltips("gtrcontent")}};
window.onload=function(){{enableTooltips("gtrcontent"); enableTooltips("sidebar");}};
const SCO_URL="{url_for("scolar.index_html", scodoc_dept=g.scodoc_dept)}";
const SCO_TIMEZONE="{scu.TIME_ZONE}";

View File

@ -152,7 +152,7 @@ def sidebar(etudid: int = None):
H = [
f"""
<!-- sidebar py -->
<div class="sidebar">
<div class="sidebar" id="sidebar">
{ sidebar_common() }
<div class="box-chercheetud">Chercher étudiant:<br>
<form method="get" id="form-chercheetud"

View File

@ -11,8 +11,8 @@ h.id="btc";
h.setAttribute("id","btc");
h.style.position="absolute";
document.getElementsByTagName("body")[0].appendChild(h);
if(id==null) links=document.getElementsByTagName("a");
else links=document.getElementById(id).getElementsByTagName("a");
if(id==null) links=document.querySelectorAll("a, [data-tooltip]"); // was document.getElementsByTagName("a")
else links=document.getElementById(id).querySelectorAll("a, [data-tooltip]");// was document.getElementById(id).getElementsByTagName("a")
for(i=0;i<links.length;i++){
Prepare(links[i]);
}

View File

@ -49,7 +49,7 @@
<script src="{{scu.STATIC_DIR}}/js/scodoc.js"></script>
<script src="{{scu.STATIC_DIR}}/DataTables/datatables.min.js"></script>
<script>
window.onload = function () { enableTooltips("gtrcontent") };
window.onload = function () { enableTooltips("gtrcontent"); enableTooltips("sidebar"); };
const SCO_URL = "{{ url_for('scolar.index_html', scodoc_dept=g.scodoc_dept) }}";
</script>

View File

@ -1,7 +1,7 @@
{# Barre marge gauche ScoDoc #}
{# -*- mode: jinja-html -*- #}
<!-- sidebar -->
<div class="sidebar">
<div class="sidebar" id="sidebar">
{# sidebar_common #}
<a class="scodoc_title" href="{{
url_for('scodoc.index', scodoc_dept=g.scodoc_dept) }}">ScoDoc {{ sco.SCOVERSION }}</a>