mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
#421 set host url in the left menu bar
This commit is contained in:
@@ -51,6 +51,11 @@
|
||||
<a class="mdl-navigation__link" href="" [routerLink]="['Webscript']" (click)="hideDrawer()">Webscript</a>
|
||||
<a class="mdl-navigation__link" href="" [routerLink]="['About']" (click)="hideDrawer()">About</a>
|
||||
</nav>
|
||||
<span class="mdl-layout-title">Configurations</span>
|
||||
<nav class="mdl-navigation">
|
||||
<input type="text" class="mdl-textfield__input" id="hostecm" data-automation-id="hostecm"
|
||||
tabindex="1" (change)="onChangeHost($event)" value="{{hostecm}}"/>
|
||||
</nav>
|
||||
</div>
|
||||
<main class="mdl-layout__content">
|
||||
<div class="page-content">
|
||||
|
@@ -61,6 +61,7 @@ declare var document: any;
|
||||
export class AppComponent {
|
||||
translate: AlfrescoTranslationService;
|
||||
searchTerm: string = '';
|
||||
hostecm: string = 'http://localhost:8080';
|
||||
|
||||
constructor(public auth: AlfrescoAuthenticationService,
|
||||
public router: Router,
|
||||
@@ -68,11 +69,18 @@ export class AppComponent {
|
||||
alfrescoSettingsService: AlfrescoSettingsService) {
|
||||
alfrescoSettingsService.ecmHost = 'http://localhost:8080';
|
||||
alfrescoSettingsService.bpmHost = 'http://localhost:9999';
|
||||
alfrescoSettingsService.host = this.hostecm;
|
||||
|
||||
this.translate = translate;
|
||||
this.translate.addTranslationFolder();
|
||||
}
|
||||
|
||||
public onChangeHost(event: KeyboardEvent): void {
|
||||
console.log( (<HTMLInputElement>event.target).value);
|
||||
this.hostecm = (<HTMLInputElement>event.target).value;
|
||||
this.alfrescoSettingsService.host = this.hostecm;
|
||||
}
|
||||
|
||||
isActive(instruction: any[]): boolean {
|
||||
return this.router.isRouteActive(this.router.generate(instruction));
|
||||
}
|
||||
|
Reference in New Issue
Block a user