mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-10-08 14:51:32 +00:00
Sanitise the component and Demo shell from embedded strings (#2474)
This commit is contained in:
committed by
Denys Vuika
parent
bfe8fc8d15
commit
9663971256
@@ -1,3 +1,5 @@
|
||||
{
|
||||
|
||||
"WEBSCRIPT": {
|
||||
"ERROR": "Error during the deserialization of {{data}} as {{contentType}}"
|
||||
}
|
||||
}
|
||||
|
@@ -0,0 +1,16 @@
|
||||
<div *ngIf="showData">
|
||||
<div *ngIf="contentType === 'JSON'" id="webscript-data-JSON">{{data | json}}</div>
|
||||
<div *ngIf="contentType === 'HTML'" id="webscript-data-HTML" [innerHTML]="data"></div>
|
||||
<div *ngIf="contentType === 'TEXT'" id="webscript-data-TEXT">{{data}}</div>
|
||||
<div *ngIf="isDataTableContent()">
|
||||
<alfresco-datatable id="webscript-datatable-wrapper" [data]="data"></alfresco-datatable>
|
||||
<div>
|
||||
<div *ngIf="showError" id="error">{{'WEBSCRIPT.ERROR' | translate: {
|
||||
data: data,
|
||||
contentType: contentType
|
||||
}
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@@ -42,15 +42,7 @@ import { ObjectDataTableAdapter } from 'ng2-alfresco-datatable';
|
||||
*/
|
||||
@Component({
|
||||
selector: 'adf-webscript-get, alfresco-webscript-get',
|
||||
template: `
|
||||
<div *ngIf="showData">
|
||||
<div *ngIf="contentType === 'JSON'" id="webscript-data-JSON">{{data | json}}</div>
|
||||
<div *ngIf="contentType === 'HTML'" id="webscript-data-HTML" [innerHTML]="data"></div>
|
||||
<div *ngIf="contentType === 'TEXT'" id="webscript-data-TEXT" >{{data}}</div>
|
||||
<div *ngIf="isDataTableContent()"><alfresco-datatable id="webscript-datatable-wrapper" [data]="data"></alfresco-datatable><div>
|
||||
<div *ngIf="showError" id="error">Error during the deserialization of {{data}} as {{contentType}}</div>
|
||||
</div>
|
||||
`
|
||||
templateUrl: 'webscript.component.html'
|
||||
})
|
||||
export class WebscriptComponent implements OnChanges {
|
||||
|
||||
|
Reference in New Issue
Block a user