Skip to content

A community-supported supercharged document management system: scan, index and archive all your documents

Disable any/all toggle when not needed

Michael Shamoon3766d8687fb6
diff --git a/src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown.component.html b/src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown.component.html
index 46fcf2164..fbba66818 100644
--- a/src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown.component.html
+++ b/src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown.component.html
@@ -15,10 +15,10 @@
<div *ngIf="!editing && multiple" class="list-group-item d-flex">
<div class="btn-group btn-group-xs btn-group-toggle flex-fill" ngbRadioGroup [(ngModel)]="selectionModel.logicalOperator" (change)="selectionModel.toggleOperator()">
<label ngbButtonLabel class="btn btn-outline-primary">
- <input ngbButton type="radio" name="logicalOperator" value="and"> All
+ <input ngbButton type="radio" name="logicalOperator" value="and" [disabled]="selectionModel.selectionSize() < 2"> All
</label>
<label ngbButtonLabel class="btn btn-outline-primary">
- <input ngbButton type="radio" name="logicalOperator" value="or"> Any
+ <input ngbButton type="radio" name="logicalOperator" value="or" [disabled]="selectionModel.selectionSize() < 2"> Any
</label>
</div>
</div>
diff --git a/src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown.component.scss b/src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown.component.scss
index 918b6118e..a937291f3 100644
--- a/src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown.component.scss
+++ b/src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown.component.scss
@@ -31,3 +31,7 @@
border-bottom-right-radius: 0;
}
}
+
+.btn-group > label.disabled {
+ filter: brightness(0.5);
+}