mirror of
				https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
				synced 2025-11-03 20:02:47 +00:00 
			
		
		
		
	Simplify corpus and job list data structure.
This commit is contained in:
		@@ -4,7 +4,7 @@
 | 
			
		||||
<div class="col s12 m4">
 | 
			
		||||
  <h3 id="title">{{ corpus.title }}</h3>
 | 
			
		||||
  <p id="description">{{ corpus.description }}</p>
 | 
			
		||||
  <a class="waves-effect waves-light btn" id="status"></a>
 | 
			
		||||
  <a class="btn status waves-effect waves-light" id="status"></a>
 | 
			
		||||
</div>
 | 
			
		||||
 | 
			
		||||
<div class="col s12 m8">
 | 
			
		||||
@@ -150,9 +150,7 @@
 | 
			
		||||
      let analyseBtn, statusElement;
 | 
			
		||||
 | 
			
		||||
      statusElement = document.getElementById("status");
 | 
			
		||||
      statusElement.classList.remove(...Object.values(CorpusList.STATUS_COLORS));
 | 
			
		||||
      statusElement.classList.add(CorpusList.STATUS_COLORS[status] || CorpusList.STATUS_COLORS['default']);
 | 
			
		||||
      statusElement.innerText = status;
 | 
			
		||||
      statusElement.dataset.status = status;
 | 
			
		||||
      analyseBtn = document.getElementById('analyse');
 | 
			
		||||
      if (status === 'prepared' || status === 'analysing' || status === 'failed') {
 | 
			
		||||
        analyseBtn.classList.remove('hide', 'disabled');
 | 
			
		||||
 
 | 
			
		||||
@@ -4,7 +4,7 @@
 | 
			
		||||
<div class="col s12 m4">
 | 
			
		||||
  <h3 id="title">{{ job.title }}</h3>
 | 
			
		||||
  <p id="description">{{ job.description }}</p>
 | 
			
		||||
  <a class="waves-effect waves-light btn" id="status"></a>
 | 
			
		||||
  <a class="btn status waves-effect waves-light" id="status"></a>
 | 
			
		||||
</div>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -269,9 +269,7 @@
 | 
			
		||||
      let statusElement;
 | 
			
		||||
 | 
			
		||||
      statusElement = document.getElementById("status");
 | 
			
		||||
      statusElement.classList.remove(...Object.values(JobList.STATUS_COLORS));
 | 
			
		||||
      statusElement.classList.add(JobList.STATUS_COLORS[status] || JobList.STATUS_COLORS['default']);
 | 
			
		||||
      statusElement.innerText = status;
 | 
			
		||||
      statusElement.dataset.status = status;
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user