mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-11-15 01:05:42 +00:00
init materialize elements the right way.
This commit is contained in:
parent
5660318450
commit
28171eb525
@ -182,14 +182,7 @@
|
||||
document.getElementById("nav-account"),
|
||||
{"alignment": "right", "constrainWidth": false, "coverTrigger": false}
|
||||
);
|
||||
M.Dropdown.init(
|
||||
document.getElementById("new-job"),
|
||||
{"coverTrigger": false}
|
||||
);
|
||||
var loadingModal = document.getElementById("loading-modal");
|
||||
console.log(loadingModal);
|
||||
M.Modal.init(loadingModal, {"dismissible": false});
|
||||
M.Modal.getInstance(loadingModal).open();
|
||||
// Highlight current navigation entry
|
||||
var entry;
|
||||
for (entry of document.querySelectorAll("#slide-out a:not(.subheader)")) {
|
||||
if (entry.href === window.location.href) {
|
||||
|
@ -1,15 +1,6 @@
|
||||
{% extends "full_width.html.j2" %}
|
||||
|
||||
{% block page_content %}
|
||||
<script>
|
||||
socket.emit('init_corpus_analysis', {{ corpus_id }});
|
||||
socket.on('init_corpus_analysis', function(msg) {
|
||||
if (msg === 'Ready') {M.Modal.getInstance(document.getElementById("loading-modal")).close();}
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<div class="col s12 m3 l3 sticky">
|
||||
<a class="waves-effect waves-light btn" href="{{ url_for('corpora.corpus', corpus_id=corpus_id) }}"><i class="material-icons left">arrow_back</i>Back to corpus overview</a>
|
||||
<div class="card">
|
||||
@ -141,4 +132,18 @@ function sendQueryData() {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var loadingModal;
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
loadingModal = M.Modal.init(document.getElementById("loading-modal"), {"dismissible": false});
|
||||
loadingModal.open();
|
||||
});
|
||||
|
||||
socket.emit('init_corpus_analysis', {{ corpus_id }});
|
||||
socket.on('init_corpus_analysis', function(msg) {
|
||||
if (msg === 'Ready') {loadingModal.close();}
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
@ -89,4 +89,13 @@
|
||||
<li><a href="{{ url_for('services.service', service='nlp') }}"><i class="material-icons">format_textdirection_l_to_r</i>NLP</a></li>
|
||||
<li><a href="{{ url_for('services.service', service='ocr') }}"><i class="material-icons">find_in_page</i>OCR</a></li>
|
||||
</ul>
|
||||
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
M.Dropdown.init(
|
||||
document.getElementById("new-job"),
|
||||
{"coverTrigger": false}
|
||||
);
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
Loading…
Reference in New Issue
Block a user