[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:
Eugenio Romano
2017-07-04 09:47:29 +02:00
parent 6ac4edde24
commit c3561510b9
95 changed files with 373 additions and 471 deletions

View File

@@ -54,9 +54,9 @@ npm install ng2-alfresco-datatable
**app.component.html**
```html
<alfresco-datatable
<adf-datatable
[data]="data">
</alfresco-datatable>
</adf-datatable>
```
**app.component.ts**
@@ -100,7 +100,7 @@ export class DataTableDemo {
You can also use HTML-based schema declaration like shown below:
```html
<alfresco-datatable [data]="data">
<adf-datatable [data]="data">
<data-columns>
<data-column key="icon" type="image" [sortable]="false"></data-column>
<data-column key="id" title="Id"></data-column>
@@ -108,7 +108,7 @@ You can also use HTML-based schema declaration like shown below:
<data-column key="name" title="Name" class="full-width name-column"></data-column>
<data-column key="createdBy.name" title="Created By"></data-column>
</data-columns>
</alfresco-datatable>
</adf-datatable>
```
```ts
@@ -198,7 +198,7 @@ These events are bubbled up the element tree and can be subscribed to from withi
```html
<root-component (row-click)="onRowClick($event)">
<child-component>
<alfresco-datatable></alfresco-datatable>
<adf-datatable></adf-datatable>
</child-component>
</root-component>
```
@@ -216,7 +216,7 @@ onRowClick(event) {
You can add a template that will be showed when there are no result in your datatable:
```html
<alfresco-datatable
<adf-datatable
[data]="data"
[actions]="contentActions"
[multiselect]="multiselect"
@@ -235,7 +235,7 @@ You can add a template that will be showed when there are no result in your data
</ng-template>
</no-content-template>
</alfresco-datatable>
</adf-datatable>
```
### Loading content template
@@ -243,7 +243,7 @@ You can add a template that will be showed when there are no result in your data
You can add a template that will be showed during the loading of your data:
```html
<alfresco-datatable
<adf-datatable
[data]="data"
[actions]="contentActions"
[multiselect]="multiselect"
@@ -265,7 +265,7 @@ You can add a template that will be showed during the loading of your data:
</ng-template>
</loading-content-template>
</alfresco-datatable>
</adf-datatable>
```
```js
@@ -281,7 +281,7 @@ Note: the `<loading-content-template>` and `<no-content-template>` can be used t
It is possible assigning a custom column template like the following:
```html
<alfresco-datatable ...>
<adf-datatable ...>
<data-columns>
<data-column title="Version" key="properties.cm:versionLabel">
<template let-value="value">
@@ -289,7 +289,7 @@ It is possible assigning a custom column template like the following:
</template>
</data-column>
</data-columns>
</alfresco-datatable>
</adf-datatable>
```
Example above shows access to the underlying cell value by binding `value` property to the underlying context `value`:
@@ -433,13 +433,13 @@ then `executeRowAction` will be automatically executed when user clicks
corresponding menu item.
```html
<alfresco-datatable
<adf-datatable
[data]="data"
[multiselect]="multiselect"
[actions]="true"
(showRowActionsMenu)="onShowRowActionsMenu($event)"
(executeRowAction)="onExecuteRowAction($event)">
</alfresco-datatable>
</adf-datatable>
```
```ts

View File

@@ -19,7 +19,7 @@ import { Component, Input, ChangeDetectionStrategy } from '@angular/core';
import { DataTableAdapter, DataColumn, DataRow } from '../../data/datatable-adapter';
@Component({
selector: 'alfresco-datatable-cell',
selector: 'adf-datatable-cell, alfresco-datatable-cell',
changeDetection: ChangeDetectionStrategy.OnPush,
template: '<ng-container>{{value}}</ng-container>'
})

View File

@@ -81,11 +81,11 @@
</div>
<div *ngSwitchCase="'date'" class="cell-value"
[attr.data-automation-id]="'date_' + data.getValue(row, col)">
<alfresco-datatable-cell [data]="data" [column]="col" [row]="row"></alfresco-datatable-cell>
<adf-datatable-cell [data]="data" [column]="col" [row]="row"></adf-datatable-cell>
</div>
<div *ngSwitchCase="'text'" class="cell-value"
[attr.data-automation-id]="'text_' + data.getValue(row, col)">
<alfresco-datatable-cell [data]="data" [column]="col" [row]="row"></alfresco-datatable-cell>
<adf-datatable-cell [data]="data" [column]="col" [row]="row"></adf-datatable-cell>
</div>
<span *ngSwitchDefault class="cell-value">
<!-- empty cell for unknown column type -->

View File

@@ -30,7 +30,7 @@ import { Observable, Observer } from 'rxjs/Rx';
declare var componentHandler;
@Component({
selector: 'alfresco-datatable',
selector: 'adf-datatable, alfresco-datatable',
styleUrls: ['./datatable.component.css'],
templateUrl: './datatable.component.html'
})

View File

@@ -20,7 +20,7 @@ import { PaginationData } from '../../models/pagination.data';
import { Pagination } from 'alfresco-js-api';
@Component({
selector: 'alfresco-pagination',
selector: 'adf-pagination, alfresco-pagination',
templateUrl: './pagination.component.html',
styleUrls: ['./pagination.component.css']
})