Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
anis
anis-client
Commits
84f0a9af
Commit
84f0a9af
authored
Sep 04, 2019
by
Tifenn Guillas
Browse files
WIP: select all
parent
871ce3ab
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/app/search/components/output/output-by-family.component.html
View file @
84f0a9af
...
...
@@ -2,13 +2,13 @@
<div
*ngFor=
"let category of getCategoryByFamily(outputFamily.id)"
class=
"col-12 col-md-6 text-center"
>
{{ category.label }}
<br
/>
<div
class=
"selectbox p
t
-1"
>
<!--
<button (click)="toggleSelectAll()" class="btn btn-block text-left py-0 m-0">
<div
class=
"selectbox p
y
-1"
>
<button
(click)=
"toggleSelectAll()"
class=
"btn btn-block text-left py-0 m-0"
>
<div
*ngIf=
"isAllSelected; then selected else unselected"
></div>
<span
*ngIf=
"!isAllSelected"
>
Select All
</span>
<span
*ngIf=
"isAllSelected"
>
Unselect All
</span>
</button>
<hr class="m
-0"> --
>
<hr
class=
"m
y-1"
>
<button
*ngFor=
"let attribute of getAttributeByCategory(category.id)"
class=
"btn btn-block text-left py-0 m-0"
(click)=
"toggleSelection(attribute.id)"
>
<div
*ngIf=
"isSelected(attribute.id); then selected else unselected"
></div>
...
...
src/app/search/components/output/output-by-family.component.ts
View file @
84f0a9af
...
...
@@ -29,7 +29,6 @@ export class OutputByFamilyComponent {
}
isSelected
(
id
:
number
)
{
console
.
log
(
this
.
outputList
.
filter
(
i
=>
i
===
id
));
return
this
.
outputList
.
filter
(
i
=>
i
===
id
).
length
>
0
;
}
...
...
@@ -44,7 +43,7 @@ export class OutputByFamilyComponent {
this
.
changed
.
emit
(
clonedOutputList
);
}
//
toggleSelectAll(): void {
//
this.isAllSelected = !this.isAllSelected;
//
}
toggleSelectAll
():
void
{
this
.
isAllSelected
=
!
this
.
isAllSelected
;
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment