Skip to content

Commit

Permalink
Merge branch 'develop' into issue-47-add-new-step-wizard-sequence
Browse files Browse the repository at this point in the history
  • Loading branch information
geoffreykwan committed Apr 7, 2021
2 parents f898fc6 + a4f6e4c commit 23c73b1
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@ <h5>{{ ::'chooseStructureLocation' | translate }}</h5>
<div
id="{{::group.$key}}"
layout="row"
ng-class="groupHeader"
ng-style='::{"background-color": projectController.getStepBackgroundColor(group.$key)}'>
ng-class="groupHeader">
<div layout="row" class="projectItemTitleDiv">
<div layout="row">
<h6 style="display:inline; cursor:pointer;" ng-if="::group.order !== 0">
{{::projectController.getNodePositionById(group.$key)}}:
{{::projectController.getNodeTitleByNodeId(group.$key)}}
{{::chooseStructureLocationController.getNodePositionById(group.$key)}}:
{{::chooseStructureLocationController.getNodeTitleByNodeId(group.$key)}}
</h6>
</div>
<div layout="row">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,14 @@ class ChooseStructureLocationController {
});
}

getNodeTitleByNodeId(nodeId: string): string {
return this.ProjectService.getNodeTitleByNodeId(nodeId);
}

getNodePositionById(nodeId: string): string {
return this.ProjectService.getNodePositionById(nodeId);
}

cancel() {
this.$state.go('root.at.project');
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Component } from '@angular/core';
import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
import { NodeService } from '../../../services/nodeService';
import { UtilService } from '../../../services/utilService';
import { ComponentStudent } from '../../component-student.component';
Expand All @@ -8,15 +9,21 @@ import { ComponentStudent } from '../../component-student.component';
templateUrl: 'html-student.component.html'
})
export class HtmlStudent extends ComponentStudent {
html: string = '';
html: SafeHtml = '';

constructor(protected NodeService: NodeService, protected UtilService: UtilService) {
constructor(
protected NodeService: NodeService,
private sanitizer: DomSanitizer,
protected UtilService: UtilService
) {
super(NodeService);
}

ngOnInit() {
super.ngOnInit();
this.html = this.UtilService.replaceWISELinks(this.componentContent.html);
this.html = this.sanitizer.bypassSecurityTrustHtml(
this.UtilService.replaceWISELinks(this.componentContent.html)
);
this.broadcastDoneRenderingComponent();
}
}

0 comments on commit 23c73b1

Please sign in to comment.