Skip to content

Commit

Permalink
Add toggles re #1305
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobtylerwalls committed Oct 25, 2023
1 parent ac5cddc commit 99eec1f
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 0 deletions.
21 changes: 21 additions & 0 deletions arches_for_science/media/css/project.css
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,27 @@
padding-right: 5px;
}

.child-exclusion {
display: inline-flex;
flex-direction: row;
justify-content: center;
margin-left: 10px;
}

.child-exclusion .toggle-container {
padding-bottom: 0px;
display: inline-flex;
}

.child-exclusion .toggle-container .arches-toggle-sm {
margin: 0;
color: #888;
}

.child-exclusion .toggle-container .arches-toggle-subtitle {
display: none;
}

.object-search-step .search-results-footer {
height: 55px;
background-color: #f3f3f3;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,13 @@ define([
self.updateSearchResults(self.termFilter(), query['paging-filter']);
});

this.includeSamples.subscribe(function(val) {
self.updateSearchResults(self.termFilter());
});
this.includeAnalysisAreas.subscribe(function(val) {
self.updateSearchResults(self.termFilter());
});

this.initialize();

this.stripTags = (original) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,34 @@
<div class="workflow-search-count">
<div class="count-number" data-bind="text: totalResults()"></div><div>Physical Things</div>
</div>
<div class="child-exclusion">
<div
data-bind="
component: {
name: 'views/components/simple-switch',
params: {
value: includeSamples,
config: {
label: 'Include samples',
}
}
}
"
></div>
<div
data-bind="
component: {
name: 'views/components/simple-switch',
params: {
value: includeAnalysisAreas,
config: {
label: 'Include analysis areas',
}
}
}
"
></div>
</div>
</div>
<div class="workflow-search-results">
<div class="workflow-search-results-full-container">
Expand Down

0 comments on commit 99eec1f

Please sign in to comment.