mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-12-25 02:44:18 +00:00
Minor updates
This commit is contained in:
parent
04bfe108c3
commit
501eb3756c
@ -1,5 +1,3 @@
|
|||||||
var darkModeEnabled = false;
|
|
||||||
var flashedMessages = [];
|
|
||||||
var socket = io();
|
var socket = io();
|
||||||
|
|
||||||
var corpora;
|
var corpora;
|
||||||
@ -90,7 +88,7 @@ socket.on('update-foreign-jobs', function(msg) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
document.addEventListener('DOMContentLoaded', function() {
|
document.addEventListener("DOMContentLoaded", function() {
|
||||||
M.AutoInit();
|
M.AutoInit();
|
||||||
M.CharacterCounter.init(document.querySelectorAll(`input[data-length][type="text"]`));
|
M.CharacterCounter.init(document.querySelectorAll(`input[data-length][type="text"]`));
|
||||||
M.Dropdown.init(document.getElementById("nav-notifications"),
|
M.Dropdown.init(document.getElementById("nav-notifications"),
|
||||||
@ -102,11 +100,5 @@ document.addEventListener('DOMContentLoaded', function() {
|
|||||||
entry.parentNode.classList.add("active");
|
entry.parentNode.classList.add("active");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (darkModeEnabled) {
|
socket.emit("subscribe_user_ressources");
|
||||||
DarkReader.enable({"brightness": 100, "contrast": 100, "sepia": 0});
|
|
||||||
}
|
|
||||||
for (flashedMessage of flashedMessages) {
|
|
||||||
toast(flashedMessage);
|
|
||||||
}
|
|
||||||
socket.emit('subscribe_user_ressources');
|
|
||||||
});
|
});
|
||||||
|
@ -100,9 +100,8 @@
|
|||||||
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
socket.emit('subscribe_foreign_user_ressources', {{ user.id }});
|
|
||||||
|
|
||||||
var corpusList = new CorpusList("corpora", foreignCorporaSubscribers);
|
var corpusList = new CorpusList("corpora", foreignCorporaSubscribers);
|
||||||
var jobList = new JobList("jobs", foreignJobsSubscribers);
|
var jobList = new JobList("jobs", foreignJobsSubscribers);
|
||||||
|
socket.emit("subscribe_foreign_user_ressources", {{ user.id }});
|
||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -20,14 +20,6 @@
|
|||||||
<script src="{{ url_for('static', filename='js/add_job.js') }}"></script>
|
<script src="{{ url_for('static', filename='js/add_job.js') }}"></script>
|
||||||
<script src="{{ url_for('static', filename='js/CorpusList.js') }}"></script>
|
<script src="{{ url_for('static', filename='js/CorpusList.js') }}"></script>
|
||||||
<script src="{{ url_for('static', filename='js/JobList.js') }}"></script>
|
<script src="{{ url_for('static', filename='js/JobList.js') }}"></script>
|
||||||
<script>
|
|
||||||
{% if current_user.is_authenticated and current_user.is_dark %}
|
|
||||||
darkModeEnabled = true;
|
|
||||||
{% endif %}
|
|
||||||
{% for flashed_message in get_flashed_messages() %}
|
|
||||||
flashedMessages.push("{{ flashed_message }}");
|
|
||||||
{% endfor %}
|
|
||||||
</script>
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
@ -105,5 +97,15 @@
|
|||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
<script src="{{ url_for('static', filename='js/Materialize/materialize.min.js') }}"></script>
|
<script src="{{ url_for('static', filename='js/Materialize/materialize.min.js') }}"></script>
|
||||||
|
<script>
|
||||||
|
document.addEventListener("DOMContentLoaded", function() {
|
||||||
|
{% if current_user.is_authenticated and current_user.is_dark %}
|
||||||
|
DarkReader.enable({"brightness": 100, "contrast": 100, "sepia": 0});
|
||||||
|
{% endif %}
|
||||||
|
{% for flashed_message in get_flashed_messages() %}
|
||||||
|
toast("{{ flashed_message }}");
|
||||||
|
{% endfor %}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
Loading…
Reference in New Issue
Block a user