[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:
Popovics András
2017-11-01 09:38:51 +00:00
committed by Eugenio Romano
parent b67ed7e545
commit 092e07c545
19 changed files with 105 additions and 28 deletions

View File

@@ -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);