diff options
Diffstat (limited to 'client/components/sidebar')
-rw-r--r-- | client/components/sidebar/sidebarArchives.js | 2 | ||||
-rw-r--r-- | client/components/sidebar/sidebarFilters.jade | 16 | ||||
-rw-r--r-- | client/components/sidebar/sidebarFilters.js | 19 |
3 files changed, 37 insertions, 0 deletions
diff --git a/client/components/sidebar/sidebarArchives.js b/client/components/sidebar/sidebarArchives.js index 53fc29b9..a4846561 100644 --- a/client/components/sidebar/sidebarArchives.js +++ b/client/components/sidebar/sidebarArchives.js @@ -1,3 +1,4 @@ +archivedRequested = false; const subManager = new SubsManager(); BlazeComponent.extendComponent({ @@ -12,6 +13,7 @@ BlazeComponent.extendComponent({ const currentBoardId = Session.get('currentBoard'); if (!currentBoardId) return; const handle = subManager.subscribe('board', currentBoardId, true); + archivedRequested = true; Tracker.nonreactive(() => { Tracker.autorun(() => { this.isArchiveReady.set(handle.ready()); diff --git a/client/components/sidebar/sidebarFilters.jade b/client/components/sidebar/sidebarFilters.jade index f11528b1..55ab213a 100644 --- a/client/components/sidebar/sidebarFilters.jade +++ b/client/components/sidebar/sidebarFilters.jade @@ -56,6 +56,22 @@ template(name="filterSidebar") if Filter.customFields.isSelected _id i.fa.fa-check hr + ul.sidebar-list + li(class="{{#if Filter.archive.isSelected _id}}active{{/if}}") + a.name.js-toggle-archive-filter + span.sidebar-list-item-description + | {{_ 'filter-show-archive'}} + if Filter.archive.isSelected _id + i.fa.fa-check + hr + ul.sidebar-list + li(class="{{#if Filter.hideEmpty.isSelected _id}}active{{/if}}") + a.name.js-toggle-hideEmpty-filter + span.sidebar-list-item-description + | {{_ 'filter-hide-empty'}} + if Filter.hideEmpty.isSelected _id + i.fa.fa-check + hr span {{_ 'advanced-filter-label'}} input.js-field-advanced-filter(type="text") span {{_ 'advanced-filter-description'}} diff --git a/client/components/sidebar/sidebarFilters.js b/client/components/sidebar/sidebarFilters.js index 88438a7a..3483d00c 100644 --- a/client/components/sidebar/sidebarFilters.js +++ b/client/components/sidebar/sidebarFilters.js @@ -1,3 +1,5 @@ +const subManager = new SubsManager(); + BlazeComponent.extendComponent({ events() { return [ @@ -12,6 +14,23 @@ BlazeComponent.extendComponent({ Filter.members.toggle(this.currentData()._id); Filter.resetExceptions(); }, + 'click .js-toggle-archive-filter'(evt) { + evt.preventDefault(); + Filter.archive.toggle(this.currentData()._id); + Filter.resetExceptions(); + const currentBoardId = Session.get('currentBoard'); + if (!currentBoardId) return; + subManager.subscribe( + 'board', + currentBoardId, + Filter.archive.isSelected(), + ); + }, + 'click .js-toggle-hideEmpty-filter'(evt) { + evt.preventDefault(); + Filter.hideEmpty.toggle(this.currentData()._id); + Filter.resetExceptions(); + }, 'click .js-toggle-custom-fields-filter'(evt) { evt.preventDefault(); Filter.customFields.toggle(this.currentData()._id); |