From 4a6995be18b15de1834a39c8921a0e4109671bb6 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 3 Jun 2016 22:08:03 +0200 Subject: First draft to use webpack instead of systemjs --- client/app/shared/search/index.ts | 3 -- client/app/shared/search/search-field.type.ts | 1 - client/app/shared/search/search.component.html | 17 ---------- client/app/shared/search/search.component.ts | 46 -------------------------- client/app/shared/search/search.model.ts | 6 ---- 5 files changed, 73 deletions(-) delete mode 100644 client/app/shared/search/index.ts delete mode 100644 client/app/shared/search/search-field.type.ts delete mode 100644 client/app/shared/search/search.component.html delete mode 100644 client/app/shared/search/search.component.ts delete mode 100644 client/app/shared/search/search.model.ts (limited to 'client/app/shared/search') diff --git a/client/app/shared/search/index.ts b/client/app/shared/search/index.ts deleted file mode 100644 index a49a4f1a9..000000000 --- a/client/app/shared/search/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './search-field.type'; -export * from './search.component'; -export * from './search.model'; diff --git a/client/app/shared/search/search-field.type.ts b/client/app/shared/search/search-field.type.ts deleted file mode 100644 index 846236290..000000000 --- a/client/app/shared/search/search-field.type.ts +++ /dev/null @@ -1 +0,0 @@ -export type SearchField = "name" | "author" | "podUrl" | "magnetUri"; diff --git a/client/app/shared/search/search.component.html b/client/app/shared/search/search.component.html deleted file mode 100644 index fb13ac72e..000000000 --- a/client/app/shared/search/search.component.html +++ /dev/null @@ -1,17 +0,0 @@ -
-
- - -
- - -
diff --git a/client/app/shared/search/search.component.ts b/client/app/shared/search/search.component.ts deleted file mode 100644 index d541cd0d6..000000000 --- a/client/app/shared/search/search.component.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { Component, EventEmitter, Output } from '@angular/core'; - -import { DROPDOWN_DIRECTIVES} from 'ng2-bootstrap/components/dropdown'; - -import { Search } from './search.model'; -import { SearchField } from './search-field.type'; - -@Component({ - selector: 'my-search', - templateUrl: 'client/app/shared/search/search.component.html', - directives: [ DROPDOWN_DIRECTIVES ] -}) - -export class SearchComponent { - @Output() search = new EventEmitter(); - - fieldChoices = { - name: 'Name', - author: 'Author', - podUrl: 'Pod Url', - magnetUri: 'Magnet Uri' - }; - searchCriterias: Search = { - field: 'name', - value: '' - }; - - get choiceKeys() { - return Object.keys(this.fieldChoices); - } - - choose($event: MouseEvent, choice: SearchField) { - $event.preventDefault(); - $event.stopPropagation(); - - this.searchCriterias.field = choice; - } - - doSearch() { - this.search.emit(this.searchCriterias); - } - - getStringChoice(choiceKey: SearchField) { - return this.fieldChoices[choiceKey]; - } -} diff --git a/client/app/shared/search/search.model.ts b/client/app/shared/search/search.model.ts deleted file mode 100644 index 932a6566c..000000000 --- a/client/app/shared/search/search.model.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { SearchField } from './search-field.type'; - -export interface Search { - field: SearchField; - value: string; -} -- cgit v1.2.3