#421 add config tab for BPM in demo app

This commit is contained in:
Mario Romano
2016-07-25 11:54:40 +01:00
parent 4b6785c91b
commit dab19277f4
2 changed files with 23 additions and 11 deletions

View File

@@ -33,7 +33,7 @@
<li class="mdl-menu__item " (click)="changeLanguage('en')"><span class="flag-icon flag-icon-gb"></span> English</li>
<li class="mdl-menu__item" (click)="changeLanguage('gr')"><span class="flag-icon flag-icon-gr"></span> Greek</li>
<li class="mdl-menu__item" (click)="changeLanguage('it')"><span class="flag-icon flag-icon-it"></span> Italian</li>
<li *ngIf="!isLoggedIn()" class="mdl-menu__item" >More</li>
<li *ngIf="!isLoggedIn()" class="mdl-menu__item">More</li>
<li *ngIf="!isLoggedIn()" class="mdl-menu__item" [routerLink]="['Login']">Login</li>
<li *ngIf="isLoggedIn()" class="mdl-menu__item" (click)="onLogout($event)">Logout</li>
</ul>
@@ -51,10 +51,15 @@
<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>
<span class="mdl-layout-title">Configurations ECM</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}}"/>
<input type="text" class="mdl-textfield__input" id="ecmHost" data-automation-id="ecmHost"
tabindex="1" (change)="onChangeECMHost($event)" value="{{ecmHost}}"/>
</nav>
<span class="mdl-layout-title">Configurations BPM</span>
<nav class="mdl-navigation">
<input type="text" class="mdl-textfield__input" id="bpmHost" data-automation-id="bpmHost"
tabindex="1" (change)="onChangeBPMHost($event)" value="{{bpmHost}}"/>
</nav>
</div>
<main class="mdl-layout__content">

View File

@@ -61,24 +61,31 @@ declare var document: any;
export class AppComponent {
translate: AlfrescoTranslationService;
searchTerm: string = '';
hostecm: string = 'http://localhost:8080';
ecmHost: string = 'http://localhost:8080';
bpmHost: string = 'http://localhost:9999';
constructor(public auth: AlfrescoAuthenticationService,
public router: Router,
translate: AlfrescoTranslationService,
alfrescoSettingsService: AlfrescoSettingsService) {
alfrescoSettingsService.ecmHost = 'http://localhost:8080';
alfrescoSettingsService.bpmHost = 'http://localhost:9999';
alfrescoSettingsService.host = this.hostecm;
alfrescoSettingsService.bpmHost = this.bpmHost;
alfrescoSettingsService.ecmHost = this.ecmHost;
this.translate = translate;
this.translate.addTranslationFolder();
}
public onChangeHost(event: KeyboardEvent): void {
public onChangeECMHost(event: KeyboardEvent): void {
console.log( (<HTMLInputElement>event.target).value);
this.hostecm = (<HTMLInputElement>event.target).value;
this.alfrescoSettingsService.host = this.hostecm;
this.ecmHost = (<HTMLInputElement>event.target).value;
this.alfrescoSettingsService.ecmHost = this.ecmHost;
}
public onChangeBPMHost(event: KeyboardEvent): void {
console.log((<HTMLInputElement>event.target).value);
this.bpmHost = (<HTMLInputElement>event.target).value;
this.alfrescoSettingsService.bpmHost = this.bpmHost;
}
isActive(instruction: any[]): boolean {