Mercurial > hg > ng2-query-ismi
comparison app/query.service.ts @ 34:e19d4c5e10a1
restricted selectable options for first query step.
author | casties |
---|---|
date | Wed, 03 Feb 2016 16:18:46 +0100 |
parents | 4c046f3244ec |
children | b47614a9d23d |
comparison
equal
deleted
inserted
replaced
33:739eb38ec2a2 | 34:e19d4c5e10a1 |
---|---|
2 import {Http, Headers} from 'angular2/http'; | 2 import {Http, Headers} from 'angular2/http'; |
3 | 3 |
4 import 'rxjs/Rx'; // import all RxJS operators | 4 import 'rxjs/Rx'; // import all RxJS operators |
5 //import 'rxjs/add/operator/map'; | 5 //import 'rxjs/add/operator/map'; |
6 | 6 |
7 import {QueryMode, QUERY_MODES} from './query-mode'; | 7 import {QueryMode, QUERY_MODES, FIRST_QUERY_MODES} from './query-mode'; |
8 import {QueryState} from './query-state'; | 8 import {QueryState} from './query-state'; |
9 import {QueryStep} from './query-step'; | 9 import {QueryStep} from './query-step'; |
10 import {getResultType} from './result-type'; | 10 import {getResultType} from './result-type'; |
11 import {ISMI_RESULT_TYPES} from './ismi-result-types'; | 11 import {ISMI_RESULT_TYPES} from './ismi-result-types'; |
12 | 12 |
33 | 33 |
34 getState() { | 34 getState() { |
35 return this.state; | 35 return this.state; |
36 } | 36 } |
37 | 37 |
38 getQueryModes(): QueryMode[] { | 38 getQueryModes(index: number): QueryMode[] { |
39 return QUERY_MODES; | 39 if (index == 0) { |
40 return FIRST_QUERY_MODES; | |
41 } else { | |
42 return QUERY_MODES; | |
43 } | |
40 } | 44 } |
41 | 45 |
42 /** | 46 /** |
43 * return the first set of options for the given query mode. | 47 * return the first set of options for the given query mode. |
44 */ | 48 */ |