Hide prepare button

This commit is contained in:
stephan 2020-03-11 15:51:55 +01:00
parent fa7d2da973
commit 7d37f802b1

View File

@ -36,7 +36,7 @@
<div class="card-action right-align">
<a href="{{ url_for('corpora.analyse_corpus', corpus_id=corpus.id) }}" class="btn hide waves-effect waves-light" id="analyse"><i class="material-icons left">help</i>Analyse</a>
{% if corpus.files[0] is defined %}
<a href="{{ url_for('corpora.prepare_corpus', corpus_id=corpus.id) }}" class="btn waves-effect waves-light" id="prepare"><i class="material-icons left">whatshot</i>Build Corpus</a>
<a href="{{ url_for('corpora.prepare_corpus', corpus_id=corpus.id) }}" class="btn waves-effect waves-light hide" id="prepare"><i class="material-icons left">whatshot</i>Build Corpus</a>
{% endif %}
<a data-target="delete-corpus-modal" class="btn modal-trigger red waves-effect waves-light"><i class="material-icons left">delete</i>Delete</a>
</div>
@ -175,9 +175,9 @@
analyseBtn.classList.remove('hide');
analyseBtn.classList.add('disabled');
}
if (status === 'prepared' || status === 'preparable' || status === 'preparing' || status === 'start analysis' || status === 'analysing' || status === 'stop analysis') {
if (status === 'unprepared') {
var prepareBtn = document.getElementById('prepare');
prepareBtn.classList.add('hide');
prepareBtn.classList.remove('hide');
}
}
}