[ADF-1356] Single configuration of i18n service per project (#2199)

* rework i18n layer init

* fix unit tests

* fix tests

* test fixes

* remove obsolete tests
This commit is contained in:
Denys Vuika
2017-08-11 10:55:52 +01:00
committed by Mario Romano
parent bb53844f92
commit 003b0c133b
85 changed files with 333 additions and 431 deletions

View File

@@ -15,9 +15,9 @@
* limitations under the License.
*/
import { Component, ElementRef, EventEmitter, Input, OnChanges, OnInit, Output, ViewChild } from '@angular/core';
import { Component, ElementRef, EventEmitter, Input, OnChanges, Output, ViewChild } from '@angular/core';
import { MinimalNodeEntity } from 'alfresco-js-api';
import { AlfrescoTranslationService, SearchOptions, SearchService } from 'ng2-alfresco-core';
import { SearchOptions, SearchService } from 'ng2-alfresco-core';
import { ThumbnailService } from 'ng2-alfresco-core';
@Component({
@@ -25,7 +25,7 @@ import { ThumbnailService } from 'ng2-alfresco-core';
templateUrl: './search-autocomplete.component.html',
styleUrls: ['./search-autocomplete.component.css']
})
export class SearchAutocompleteComponent implements OnInit, OnChanges {
export class SearchAutocompleteComponent implements OnChanges {
@Input()
searchTerm: string = '';
@@ -70,16 +70,9 @@ export class SearchAutocompleteComponent implements OnInit, OnChanges {
@ViewChild('resultsTableBody', {}) resultsTableBody: ElementRef;
constructor(private searchService: SearchService,
private translateService: AlfrescoTranslationService,
private thumbnailService: ThumbnailService) {
}
ngOnInit(): void {
if (this.translateService) {
this.translateService.addTranslationFolder('ng2-alfresco-search', 'assets/ng2-alfresco-search');
}
}
ngOnChanges(changes) {
if (changes.searchTerm) {
this.results = null;