mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-10-08 14:51:32 +00:00
[ADF-1600] Change translation (#2574)
* Change translation * Add browser test runner to scripts * Adding option to hide the My Files option * Add documentation and fix property's name
This commit is contained in:
committed by
Eugenio Romano
parent
b67ed7e545
commit
092e07c545
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { Component, EventEmitter, OnInit, Output } from '@angular/core';
|
||||
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
||||
import { SiteModel, SitesApiService } from 'ng2-alfresco-core';
|
||||
|
||||
@Component({
|
||||
@@ -25,17 +25,19 @@ import { SiteModel, SitesApiService } from 'ng2-alfresco-core';
|
||||
})
|
||||
export class DropdownSitesComponent implements OnInit {
|
||||
|
||||
@Input()
|
||||
hideMyFiles: boolean = false;
|
||||
|
||||
@Output()
|
||||
change: EventEmitter<SiteModel> = new EventEmitter();
|
||||
|
||||
public DEFAULT_VALUE = 'default';
|
||||
public MY_FILES_VALUE = 'default';
|
||||
|
||||
siteList = [];
|
||||
|
||||
public siteSelected: string;
|
||||
|
||||
constructor(private sitesService: SitesApiService) {
|
||||
}
|
||||
constructor(private sitesService: SitesApiService) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.sitesService.getSites().subscribe((result) => {
|
||||
@@ -45,7 +47,7 @@ export class DropdownSitesComponent implements OnInit {
|
||||
|
||||
selectedSite() {
|
||||
let siteFound;
|
||||
if (this.siteSelected === this.DEFAULT_VALUE) {
|
||||
if (this.siteSelected === this.MY_FILES_VALUE) {
|
||||
siteFound = new SiteModel();
|
||||
}else {
|
||||
siteFound = this.siteList.find( site => site.guid === this.siteSelected);
|
||||
|
Reference in New Issue
Block a user