Add disinclude option for assignments from other classes
This commit is contained in:
parent
5577214005
commit
8acc77e441
8 changed files with 230 additions and 17 deletions
|
|
@ -116,6 +116,9 @@
|
|||
<button type="button" class="tab-btn" data-filter="overdue">
|
||||
Overdue (<span id="tabOverdueCount"><%= stats.overdue %></span>)
|
||||
</button>
|
||||
<button type="button" class="tab-btn" data-filter="excluded">
|
||||
Excluded (<span id="tabExcludedCount"><%= stats.excludedCount || 0 %></span>)
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="filter-controls">
|
||||
|
|
@ -154,11 +157,12 @@
|
|||
<div class="assignment-list" id="assignmentList">
|
||||
<% assignments.forEach(function(item) { %>
|
||||
<div
|
||||
class="assignment-card <%= item.completed ? 'is-completed' : '' %> status-<%= item.status %>"
|
||||
class="assignment-card <%= item.completed ? 'is-completed' : '' %> <%= item.excluded ? 'is-excluded' : '' %> status-<%= item.status %>"
|
||||
data-id="<%= item.id %>"
|
||||
data-status="<%= item.status %>"
|
||||
data-subject="<%= item.subject %>"
|
||||
data-completed="<%= item.completed ? 'true' : 'false' %>"
|
||||
data-excluded="<%= item.excluded ? 'true' : 'false' %>"
|
||||
data-search="<%= (item.subject + ' ' + item.description + ' ' + (item.detectedCheckDate || '') + ' ' + (item.topic || '') + ' ' + (item.unit || '')).toLowerCase() %>"
|
||||
>
|
||||
<div class="card-checkbox-col">
|
||||
|
|
@ -167,6 +171,7 @@
|
|||
class="assignment-toggle"
|
||||
data-id="<%= item.id %>"
|
||||
<%= item.completed ? 'checked' : '' %>
|
||||
<%= item.excluded ? 'disabled' : '' %>
|
||||
>
|
||||
</div>
|
||||
|
||||
|
|
@ -186,7 +191,9 @@
|
|||
</span>
|
||||
<% } %>
|
||||
|
||||
<% if (item.completed) { %>
|
||||
<% if (item.excluded) { %>
|
||||
<span class="badge badge-excluded">Disincluded</span>
|
||||
<% } else if (item.completed) { %>
|
||||
<span class="badge badge-completed">Done</span>
|
||||
<% } else if (item.status === 'next-week') { %>
|
||||
<span class="badge badge-next-week">Next Week</span>
|
||||
|
|
@ -197,6 +204,15 @@
|
|||
<% } else { %>
|
||||
<span class="badge badge-active">Active</span>
|
||||
<% } %>
|
||||
|
||||
<button
|
||||
type="button"
|
||||
class="btn-disinclude"
|
||||
data-id="<%= item.id %>"
|
||||
title="<%= item.excluded ? 'Restore this homework to your active list' : 'Disinclude this homework (e.g. from another class)' %>"
|
||||
>
|
||||
<%= item.excluded ? 'Restore' : 'Disinclude' %>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue