mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-11-15 01:05:42 +00:00
Remove legacy code
This commit is contained in:
parent
715c37813c
commit
30bde863c9
@ -33,10 +33,9 @@
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var users = {{ users|tojson|safe }};
|
||||
var userList = new RessourceList('users', null, "User");
|
||||
let userList = new RessourceList('users', null, "User", RessourceList.options.extended);
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
userList.addRessources(users);
|
||||
userList._add({{ users|tojson|safe }});
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
@ -88,28 +88,6 @@
|
||||
|
||||
|
||||
<!-- Modals -->
|
||||
<div id="delete-corpus-modal" class="modal">
|
||||
<div class="modal-content">
|
||||
<h4>Confirm corpus deletion</h4>
|
||||
<p>Do you really want to delete the corpus <b id="selected-corpus-title"></b>? All files will be permanently deleted!</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<a href="#!" class="btn modal-close waves-effect waves-light">Cancel</a>
|
||||
<a class="btn modal-close red waves-effect waves-light" id="selected-corpus-delete-link"><i class="material-icons left">delete</i>Delete</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="delete-job-modal" class="modal">
|
||||
<div class="modal-content">
|
||||
<h4>Confirm job deletion</h4>
|
||||
<p>Do you really want to delete the job <b id="selected-job-title"></b>? All files will be permanently deleted!</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<a href="#!" class="btn modal-close waves-effect waves-light">Cancel</a>
|
||||
<a class="btn modal-close red waves-effect waves-light" id="selected-job-delete-link"><i class="material-icons left">delete</i>Delete</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="delete-user-modal" class="modal">
|
||||
<div class="modal-content">
|
||||
<h4>Confirm user deletion</h4>
|
||||
@ -123,46 +101,10 @@
|
||||
|
||||
|
||||
<script>
|
||||
var corpusList = new RessourceList("corpora", nopaque.foreignCorporaSubscribers, "Corpus");
|
||||
var jobList = new RessourceList("jobs", nopaque.foreignJobsSubscribers, "Job");
|
||||
var deleteCorpusModalElement = document.getElementById("delete-corpus-modal");
|
||||
var deleteCorpusModal;
|
||||
var deleteJobModalElement = document.getElementById("delete-job-modal");
|
||||
var deleteJobModal;
|
||||
var selectedCorpusDeleteLinkElement = document.getElementById("selected-corpus-delete-link");
|
||||
var selectedCorpusTitleElement = document.getElementById("selected-corpus-title");
|
||||
var selectedJobDeleteLinkElement = document.getElementById("selected-job-delete-link");
|
||||
var selectedJobTitleElement = document.getElementById("selected-job-title");
|
||||
function prepareDeleteCorpusModal(selectedCorpusId) {
|
||||
var selectedCorpus;
|
||||
if (selectedCorpusId in nopaque.foreignUser.corpora) {
|
||||
selectedCorpus = nopaque.foreignUser.corpora[selectedCorpusId];
|
||||
selectedCorpusDeleteLinkElement.href = `/corpora/${selectedCorpus.id}/delete`;
|
||||
selectedCorpusTitleElement.innerText = selectedCorpus.title;
|
||||
} else {
|
||||
selectedQueryResult = undefined;
|
||||
selectedCorpusDeleteLinkElement.href = "";
|
||||
selectedCorpusTitleElement.innerText = "";
|
||||
}
|
||||
deleteCorpusModal.open();
|
||||
}
|
||||
function prepareDeleteJobModal(selectedJobId) {
|
||||
var selectedJob;
|
||||
if (selectedJobId in nopaque.foreignUser.jobs) {
|
||||
selectedJob = nopaque.foreignUser.jobs[selectedJobId];
|
||||
selectedJobDeleteLinkElement.href = `/jobs/${selectedJob.id}/delete`;
|
||||
selectedJobTitleElement.innerText = selectedJob.title;
|
||||
} else {
|
||||
selectedJob = undefined;
|
||||
selectedJobDeleteLinkElement.href = "";
|
||||
selectedJobTitleElement.innerText = "";
|
||||
}
|
||||
deleteJobModal.open();
|
||||
}
|
||||
let corpusList = new RessourceList("corpora", nopaque.foreignCorporaSubscribers, "Corpus");
|
||||
let jobList = new RessourceList("jobs", nopaque.foreignJobsSubscribers, "Job");
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
nopaque.socket.emit("foreign_user_data_stream_init", {{ user.id }});
|
||||
deleteCorpusModal = M.Modal.init(deleteCorpusModalElement);
|
||||
deleteJobModal = M.Modal.init(deleteJobModalElement);
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
@ -107,19 +107,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% for file in corpus.files %}
|
||||
<div id="delete-corpus-file-{{ file.id }}-modal" class="modal">
|
||||
<div class="modal-content">
|
||||
<h4>Confirm corpus file deletion</h4>
|
||||
<p>Do you really want to delete the corpus file {{ file.filename }}? The file will be permanently deleted!</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<a href="#!" class="btn modal-close waves-effect waves-light">Cancel</a>
|
||||
<a class="btn modal-close red waves-effect waves-light" href="{{ url_for('corpora.delete_corpus_file', corpus_file_id=file.id, corpus_id=corpus.id) }}"><i class="material-icons left">delete</i>Delete</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
|
||||
<script>
|
||||
class InformationUpdater {
|
||||
|
Loading…
Reference in New Issue
Block a user