forked from ScoDoc/ScoDoc
Fix bubble.js initialization
This commit is contained in:
parent
c88191b0ca
commit
74b9816713
@ -100,7 +100,14 @@ _HTML_BEGIN = f"""<!DOCTYPE html>
|
|||||||
<script src="{scu.STATIC_DIR}/libjs/menu.js"></script>
|
<script src="{scu.STATIC_DIR}/libjs/menu.js"></script>
|
||||||
<script src="{scu.STATIC_DIR}/libjs/bubble.js"></script>
|
<script src="{scu.STATIC_DIR}/libjs/bubble.js"></script>
|
||||||
<script>
|
<script>
|
||||||
window.onload=function(){{enableTooltips("gtrcontent"); enableTooltips("sidebar");}};
|
window.onload=function(){{
|
||||||
|
if (document.getElementById('gtrcontent')) {{
|
||||||
|
enableTooltips("gtrcontent");
|
||||||
|
}}
|
||||||
|
if (document.getElementById('sidebar')) {{
|
||||||
|
enableTooltips("sidebar");
|
||||||
|
}}
|
||||||
|
}};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script src="{scu.STATIC_DIR}/jQuery/jquery.js"></script>
|
<script src="{scu.STATIC_DIR}/jQuery/jquery.js"></script>
|
||||||
@ -217,8 +224,14 @@ def sco_header(
|
|||||||
<script src="{scu.STATIC_DIR}/libjs/menu.js"></script>
|
<script src="{scu.STATIC_DIR}/libjs/menu.js"></script>
|
||||||
<script src="{scu.STATIC_DIR}/libjs/bubble.js"></script>
|
<script src="{scu.STATIC_DIR}/libjs/bubble.js"></script>
|
||||||
<script>
|
<script>
|
||||||
window.onload=function(){{enableTooltips("gtrcontent"); enableTooltips("sidebar");}};
|
window.onload=function(){{
|
||||||
|
if (document.getElementById('gtrcontent')) {{
|
||||||
|
enableTooltips("gtrcontent");
|
||||||
|
}}
|
||||||
|
if (document.getElementById('sidebar')) {{
|
||||||
|
enableTooltips("sidebar");
|
||||||
|
}}
|
||||||
|
}};
|
||||||
const SCO_URL="{url_for("scolar.index_html", scodoc_dept=g.scodoc_dept)}";
|
const SCO_URL="{url_for("scolar.index_html", scodoc_dept=g.scodoc_dept)}";
|
||||||
const SCO_TIMEZONE="{scu.TIME_ZONE}";
|
const SCO_TIMEZONE="{scu.TIME_ZONE}";
|
||||||
</script>"""
|
</script>"""
|
||||||
|
@ -49,8 +49,14 @@
|
|||||||
<script src="{{scu.STATIC_DIR}}/js/scodoc.js"></script>
|
<script src="{{scu.STATIC_DIR}}/js/scodoc.js"></script>
|
||||||
<script src="{{scu.STATIC_DIR}}/DataTables/datatables.min.js"></script>
|
<script src="{{scu.STATIC_DIR}}/DataTables/datatables.min.js"></script>
|
||||||
<script>
|
<script>
|
||||||
window.onload = function () { enableTooltips("gtrcontent"); enableTooltips("sidebar"); };
|
window.onload = function () {
|
||||||
|
if (document.getElementById('gtrcontent')) {
|
||||||
|
enableTooltips("gtrcontent");
|
||||||
|
}
|
||||||
|
if (document.getElementById('sidebar')) {
|
||||||
|
enableTooltips("sidebar");
|
||||||
|
}
|
||||||
|
};
|
||||||
const SCO_URL = "{{ url_for('scolar.index_html', scodoc_dept=g.scodoc_dept) }}";
|
const SCO_URL = "{{ url_for('scolar.index_html', scodoc_dept=g.scodoc_dept) }}";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user