Upgrade core, documentList, dataTable

This commit is contained in:
Denys Vuika
2016-09-21 17:36:29 +01:00
parent 4c7547494c
commit b09e0bc1b3
34 changed files with 203 additions and 183 deletions

View File

@@ -15,13 +15,6 @@
* limitations under the License.
*/
import {
it,
describe,
expect,
beforeEach
} from '@angular/core/testing';
import { DataTableComponent } from './datatable.component';
import {
DataRow,

View File

@@ -17,7 +17,6 @@
import {
Component,
// NgZone,
OnInit,
Input,
Output,
@@ -26,11 +25,6 @@ import {
TemplateRef
} from '@angular/core';
import {
MATERIAL_DESIGN_DIRECTIVES,
CONTEXT_MENU_DIRECTIVES
} from 'ng2-alfresco-core';
import {
DataTableAdapter,
DataRow,
@@ -47,8 +41,7 @@ declare let __moduleName: string;
moduleId: __moduleName,
selector: 'alfresco-datatable',
styleUrls: ['./datatable.component.css'],
templateUrl: './datatable.component.html',
directives: [MATERIAL_DESIGN_DIRECTIVES, CONTEXT_MENU_DIRECTIVES]
templateUrl: './datatable.component.html'
})
export class DataTableComponent implements OnInit, AfterViewChecked {
@@ -83,10 +76,6 @@ export class DataTableComponent implements OnInit, AfterViewChecked {
@Output()
executeRowAction: EventEmitter<any> = new EventEmitter();
// TODO: left for reference, will be removed during future revisions
constructor(/*private _ngZone?: NgZone*/) {
}
ngOnInit() {
if (!this.data) {
this.data = new ObjectDataTableAdapter([], []);

View File

@@ -15,13 +15,5 @@
* limitations under the License.
*/
import { DataTableComponent } from './datatable.component';
import { NoContentTemplateComponent } from './no-content-template.component';
export * from './datatable.component';
export * from './no-content-template.component';
export const ALFRESCO_DATATABLE_DIRECTIVES: [any] = [
DataTableComponent,
NoContentTemplateComponent
];

View File

@@ -17,7 +17,6 @@
import { Component, Input } from '@angular/core';
import { MATERIAL_DESIGN_DIRECTIVES } from 'ng2-alfresco-core';
import { PaginationProvider } from './pagination-provider';
declare let __moduleName: string;
@@ -26,8 +25,7 @@ declare let __moduleName: string;
moduleId: __moduleName,
selector: 'alfresco-pagination',
templateUrl: './pagination.component.html',
styleUrls: ['./pagination.component.css'],
directives: [MATERIAL_DESIGN_DIRECTIVES]
styleUrls: ['./pagination.component.css']
})
export class PaginationComponent {

View File

@@ -15,22 +15,8 @@
* limitations under the License.
*/
import {
it,
describe,
expect
} from '@angular/core/testing';
import {
DataColumn,
DataRow, DataSorting
} from './datatable-adapter';
import {
ObjectDataTableAdapter,
ObjectDataRow,
ObjectDataColumn
} from './object-datatable-adapter';
import { DataColumn, DataRow, DataSorting } from './datatable-adapter';
import { ObjectDataTableAdapter, ObjectDataRow, ObjectDataColumn } from './object-datatable-adapter';
describe('ObjectDataTableAdapter', () => {

View File

@@ -108,7 +108,7 @@ export class ObjectDataTableAdapter implements DataTableAdapter {
let value = row.getValue(col.key);
if (col.type === 'date') {
let datePipe = new DatePipe();
let datePipe = new DatePipe('en-US');
let format = col.format || 'medium';
try {
return datePipe.transform(value, format);