From 4fd8aa327004b27530fd96bdde5df60e6745a1f6 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 27 May 2016 17:49:18 +0200 Subject: Alphabetical --- client/app/shared/search.component.ts | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'client/app/shared/search.component.ts') diff --git a/client/app/shared/search.component.ts b/client/app/shared/search.component.ts index 674518aba..e1e30b9af 100644 --- a/client/app/shared/search.component.ts +++ b/client/app/shared/search.component.ts @@ -14,26 +14,21 @@ import { SearchField } from './search-field.type'; export class SearchComponent { @Output() search = new EventEmitter(); - searchCriterias: Search = { - field: 'name', - value: '' - }; - fieldChoices = { name: 'Name', author: 'Author', podUrl: 'Pod Url', magnetUri: 'Magnet Uri' }; + searchCriterias: Search = { + field: 'name', + value: '' + }; get choiceKeys() { return Object.keys(this.fieldChoices); } - getStringChoice(choiceKey: SearchField) { - return this.fieldChoices[choiceKey]; - } - choose($event: MouseEvent, choice: SearchField) { $event.preventDefault(); $event.stopPropagation(); @@ -45,4 +40,7 @@ export class SearchComponent { this.search.emit(this.searchCriterias); } + getStringChoice(choiceKey: SearchField) { + return this.fieldChoices[choiceKey]; + } } -- cgit v1.2.3