mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-868] Use new ADF prefix in all tags (#2035)
* use new ADF prefix in all thr tag * fix failing test * fix datatable test
This commit is contained in:
@@ -37,7 +37,7 @@ npm install ng2-alfresco-webscript
|
||||
## Basic usage
|
||||
|
||||
```html
|
||||
<alfresco-webscript-get
|
||||
<adf-webscript-get
|
||||
[scriptPath]="string"
|
||||
[scriptArgs]="Object"
|
||||
[contextRoot]="string"
|
||||
@@ -45,7 +45,7 @@ npm install ng2-alfresco-webscript
|
||||
[showData]="boolean"
|
||||
[contentType]="JSON | HTML | DATATABLE | TEXT"
|
||||
(onSuccess)= "logData($event)">
|
||||
</alfresco-webscript-get>
|
||||
</adf-webscript-get>
|
||||
```
|
||||
|
||||
Another example:
|
||||
@@ -53,13 +53,13 @@ Another example:
|
||||
**app.component.html**
|
||||
|
||||
```html
|
||||
<alfresco-webscript-get
|
||||
<adf-webscript-get
|
||||
[scriptPath]="scriptPath"
|
||||
[scriptArgs]="scriptArgs"
|
||||
[contextRoot]="contextRoot"
|
||||
[servicePath]="servicePath"
|
||||
[contentType]="'HTML'">
|
||||
</alfresco-webscript-get>
|
||||
</adf-webscript-get>
|
||||
```
|
||||
|
||||
**app.component.ts**
|
||||
@@ -97,13 +97,13 @@ This sample Web Scripts reside in your Alfresco Server AND you can access the
|
||||
http://localhost:8080/alfresco/service/sample/folder/Company%20Home
|
||||
|
||||
```html
|
||||
<alfresco-webscript-get
|
||||
<adf-webscript-get
|
||||
[scriptPath]="scriptPath"
|
||||
[contextRoot]="'alfresco'"
|
||||
[servicePath]="'service'";
|
||||
[scriptPath]="'Sample/folder/Company%20Home'"
|
||||
[contentType]="'HTML'">
|
||||
</alfresco-webscript-get>
|
||||
</adf-webscript-get>
|
||||
```
|
||||
|
||||

|
||||
@@ -115,13 +115,13 @@ This sample demonstrates how to implement a Webscript component that renders the
|
||||
http://localhost:8080/alfresco/service/sample/folder/DATATABLE
|
||||
|
||||
```html
|
||||
<alfresco-webscript-get
|
||||
<adf-webscript-get
|
||||
[scriptPath]="scriptPath"
|
||||
[contextRoot]="'alfresco'"
|
||||
[servicePath]="'service'";
|
||||
[scriptPath]="'Sample/folder/DATATABLE'"
|
||||
[contentType]="'DATATABLE'">
|
||||
</alfresco-webscript-get>
|
||||
</adf-webscript-get>
|
||||
```
|
||||
|
||||
If you want show the result from a webscript inside a ng2-alfresco-datatable you have to return from the GET of the webscript the datatructure below:
|
||||
@@ -173,7 +173,7 @@ This sample Web Scripts reside in your Alfresco Server AND you can access the
|
||||
http://localhost:8080/alfresco/service/sample/folder/JSON%EXAMPLE
|
||||
|
||||
```html
|
||||
<alfresco-webscript-get
|
||||
<adf-webscript-get
|
||||
[scriptPath]="scriptPath"
|
||||
[contextRoot]="'alfresco'"
|
||||
[servicePath]="'service'";
|
||||
@@ -181,7 +181,7 @@ http://localhost:8080/alfresco/service/sample/folder/JSON%EXAMPLE
|
||||
[contentType]="'HTML'"
|
||||
[showData]="false"
|
||||
(onSuccess)="logDataExample($event)">
|
||||
</alfresco-webscript-get>
|
||||
</adf-webscript-get>
|
||||
```
|
||||
|
||||
You can get the plain data from the webscript through the **onSuccess** event parameter and use it as you need in your application
|
||||
|
@@ -20,13 +20,13 @@ import { AlfrescoApiService, LogService } from 'ng2-alfresco-core';
|
||||
import { ObjectDataTableAdapter } from 'ng2-alfresco-datatable';
|
||||
|
||||
/**
|
||||
* <alfresco-webscript-get [scriptPath]="string"
|
||||
* <adf-webscript-get [scriptPath]="string"
|
||||
* [scriptArgs]="Object"
|
||||
* [contextRoot]="string"
|
||||
* [servicePath]="string"
|
||||
* [contentType]="JSON|HTML|DATATABLE"
|
||||
* (onSuccess)="customMethod($event)>
|
||||
* </alfresco-webscript-get>
|
||||
* </adf-webscript-get>
|
||||
*
|
||||
* This component, provide a get webscript viewer
|
||||
*
|
||||
@@ -41,7 +41,7 @@ import { ObjectDataTableAdapter } from 'ng2-alfresco-datatable';
|
||||
* @returns {WebscriptComponent} .
|
||||
*/
|
||||
@Component({
|
||||
selector: 'alfresco-webscript-get',
|
||||
selector: 'adf-webscript-get, alfresco-webscript-get',
|
||||
template: `
|
||||
<div *ngIf="showData">
|
||||
<div *ngIf="contentType === 'JSON'" id="webscript-data-JSON">{{data | json}}</div>
|
||||
|
Reference in New Issue
Block a user