mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-12-24 10:34:17 +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 corpora;
|
||||
@ -90,7 +88,7 @@ socket.on('update-foreign-jobs', function(msg) {
|
||||
});
|
||||
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
M.AutoInit();
|
||||
M.CharacterCounter.init(document.querySelectorAll(`input[data-length][type="text"]`));
|
||||
M.Dropdown.init(document.getElementById("nav-notifications"),
|
||||
@ -102,11 +100,5 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
entry.parentNode.classList.add("active");
|
||||
}
|
||||
}
|
||||
if (darkModeEnabled) {
|
||||
DarkReader.enable({"brightness": 100, "contrast": 100, "sepia": 0});
|
||||
}
|
||||
for (flashedMessage of flashedMessages) {
|
||||
toast(flashedMessage);
|
||||
}
|
||||
socket.emit('subscribe_user_ressources');
|
||||
socket.emit("subscribe_user_ressources");
|
||||
});
|
||||
|
@ -100,9 +100,8 @@
|
||||
|
||||
|
||||
<script>
|
||||
socket.emit('subscribe_foreign_user_ressources', {{ user.id }});
|
||||
|
||||
var corpusList = new CorpusList("corpora", foreignCorporaSubscribers);
|
||||
var jobList = new JobList("jobs", foreignJobsSubscribers);
|
||||
socket.emit("subscribe_foreign_user_ressources", {{ user.id }});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
@ -20,14 +20,6 @@
|
||||
<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/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>
|
||||
<body>
|
||||
<header>
|
||||
@ -105,5 +97,15 @@
|
||||
</div>
|
||||
</footer>
|
||||
<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>
|
||||
</html>
|
||||
|
Loading…
Reference in New Issue
Block a user