-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GDB-10692 - edit styling and logic to reflect review notes. Known iss…
…ue: main checkbox goes out of sync with list after indeterminate click
- Loading branch information
1 parent
0759938
commit 4e35494
Showing
4 changed files
with
53 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
src/js/angular/models/import/checkbox-control-resource-wrapper.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
export class CheckboxControlModel { | ||
constructor(resourceList) { | ||
this.resources = resourceList; | ||
} | ||
|
||
areMixedSelections() { | ||
return this.resources.some((resource) => resource.selected) && this.resources.some((resource) => !resource.selected); | ||
} | ||
|
||
areNoneSelected() { | ||
return this.resources.every((resource) => !resource.selected); | ||
} | ||
|
||
areAllSelected() { | ||
return this.resources.every((resource) => resource.selected); | ||
} | ||
|
||
getResourcesList() { | ||
return this.resources; | ||
} | ||
} |