This is the codeAbility Sharing Platform! Learn more about the codeAbility Sharing Platform.

Skip to content
Snippets Groups Projects
Commit 40029867 authored by Daniel Rainer's avatar Daniel Rainer
Browse files

Add "Clear all" button

parent e9aa8a8c
No related merge requests found
<div class="solid" [hidden]="frequencies == null">
<span class="meta" jhiTranslate="search.metadata.{{parameter}}">file format</span>
<span class="clear" float="right" jhiTranslate="search.metadata.clearLocalFilters"
(click)="clearFilters()"
>clear all</span>
<li class="meta" *ngFor="let frequency of frequencies"
(click)="toggleSelection(parameter, frequency.key)"
[style.background-color]="isSelected(frequency.key) ? 'rgba(0,255,0,0.5)' : 'rgba(0,0,0,0)'">
......@@ -8,6 +11,5 @@
<span class="count">{{frequency.value}}</span>
</a>
</div>
</li>
</div>
......@@ -28,4 +28,8 @@ export class MetadataComponent {
isSelected(name: string): boolean {
return this.selectedItems.has(name);
}
clearFilters(): void {
this.selectedItems = new Set();
}
}
li.meta:hover {
background-color: #CACACA;
background-color: #cacaca;
}
li.meta {
list-style-type: none;
......@@ -23,3 +23,12 @@ div.solid {
border-color: rgb(223, 226, 230);
margin-bottom: 20px;
}
span.clear {
float: right;
padding-left: 10px;
padding-right: 10px;
cursor: pointer;
}
span.clear:hover {
background-color: rgba(0, 0, 0, 0.1);
}
......@@ -5,6 +5,7 @@
"usage": "Die Suchmaske erlaubt es aufbauend auf diversen Suchkriterien (z.B. Volltextsuche, Programmiersprachen, Schlüsselwörter usw.) nach Volltexten in der Sharing Plattform zu suchen. In der Suchmaske für Volltexte können boolsche Operatoren verwendet werden. Abgesehen von der Volltextsuche sind keine weitern Felder angegeben werden.",
"metadata": {
"filter": "Suchfilter",
"clearLocalFilters": "Alle löschen",
"information": "Suchinformation",
"fileFormat": "Dateiformat",
"repository": "Repository",
......
......@@ -5,6 +5,7 @@
"usage": "The search mask allows you to search for full texts in the sharing platform based on various search criteria (e.g. full text search, programming languages, keywords, etc.). Boolean operators can be used in the search mask for full texts. Apart from the full text search, no further fields are to be specified.",
"metadata": {
"filter": "Search filter",
"clearLocalFilters": "Clear all",
"information": "Search information",
"fileFormat": "File format",
"repository": "Repository",
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment