mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-10-08 14:51:32 +00:00
fix translate
This commit is contained in:
@@ -15,22 +15,21 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {Component} from 'angular2/core';
|
||||
import {TranslatePipe} from 'ng2-translate/ng2-translate';
|
||||
|
||||
import { Component } from 'angular2/core';
|
||||
import { AlfrescoPipeTranslate } from 'ng2-alfresco-core/services';
|
||||
import {
|
||||
ALFRESCO_DATATABLE_DIRECTIVES,
|
||||
ObjectDataTableAdapter, DataSorting
|
||||
} from 'ng2-alfresco-datatable/ng2-alfresco-datatable';
|
||||
|
||||
declare let __moduleName:string;
|
||||
declare let __moduleName: string;
|
||||
|
||||
@Component({
|
||||
moduleId: __moduleName,
|
||||
selector: 'datatable-demo',
|
||||
templateUrl: './datatable-demo.component.html',
|
||||
directives: [ALFRESCO_DATATABLE_DIRECTIVES],
|
||||
pipes: [TranslatePipe]
|
||||
pipes: [AlfrescoPipeTranslate]
|
||||
})
|
||||
export class DataTableDemoComponent {
|
||||
data: ObjectDataTableAdapter;
|
||||
@@ -45,19 +44,19 @@ export class DataTableDemoComponent {
|
||||
|
||||
this.data = new ObjectDataTableAdapter(
|
||||
[
|
||||
{ id: 1, name: 'Name 1', createdBy: createdBy, icon: 'material-icons://folder_open' },
|
||||
{ id: 2, name: 'Name 2', createdBy: createdBy, icon: 'material-icons://accessibility' },
|
||||
{ id: 3, name: 'Name 3', createdBy: createdBy, icon: 'material-icons://alarm' },
|
||||
{ id: 4, name: 'Image 1', createdBy: createdBy, icon: imageUrl }
|
||||
{id: 1, name: 'Name 1', createdBy: createdBy, icon: 'material-icons://folder_open'},
|
||||
{id: 2, name: 'Name 2', createdBy: createdBy, icon: 'material-icons://accessibility'},
|
||||
{id: 3, name: 'Name 3', createdBy: createdBy, icon: 'material-icons://alarm'},
|
||||
{id: 4, name: 'Image 1', createdBy: createdBy, icon: imageUrl}
|
||||
],
|
||||
[
|
||||
{ type: 'image', key: 'icon', title: '', srTitle: 'Thumbnail' },
|
||||
{ type: 'text', key: 'id', title: 'Id', sortable: true},
|
||||
{ type: 'text', key: 'name', title: 'Name', cssClass: 'full-width name-column', sortable: true },
|
||||
{ type: 'text', key: 'createdBy.name', title: 'Created By', sortable: true }
|
||||
{type: 'image', key: 'icon', title: '', srTitle: 'Thumbnail'},
|
||||
{type: 'text', key: 'id', title: 'Id', sortable: true},
|
||||
{type: 'text', key: 'name', title: 'Name', cssClass: 'full-width name-column', sortable: true},
|
||||
{type: 'text', key: 'createdBy.name', title: 'Created By', sortable: true}
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
this.data.setSorting(new DataSorting('name', 'asc'));
|
||||
}
|
||||
}
|
||||
|
@@ -23,7 +23,7 @@ import {
|
||||
} from 'ng2-alfresco-documentlist/ng2-alfresco-documentlist';
|
||||
import { MDL } from 'ng2-alfresco-core/material';
|
||||
import { ALFRESCO_ULPOAD_COMPONENT } from 'ng2-alfresco-upload/ng2-alfresco-upload';
|
||||
import { TranslatePipe } from 'ng2-translate/ng2-translate';
|
||||
import { AlfrescoPipeTranslate } from 'ng2-alfresco-core/services';
|
||||
|
||||
declare let __moduleName: string;
|
||||
|
||||
@@ -33,7 +33,7 @@ declare let __moduleName: string;
|
||||
templateUrl: './files.component.html',
|
||||
directives: [DOCUMENT_LIST_DIRECTIVES, MDL, ALFRESCO_ULPOAD_COMPONENT],
|
||||
providers: [DOCUMENT_LIST_PROVIDERS],
|
||||
pipes: [TranslatePipe]
|
||||
pipes: [AlfrescoPipeTranslate]
|
||||
})
|
||||
export class FilesComponent {
|
||||
breadcrumb: boolean = false;
|
||||
|
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
import { ElementRef, DynamicComponentLoader, Directive, Attribute } from 'angular2/core';
|
||||
import { Router, RouterOutlet, ComponentInstruction } from 'angular2/router';
|
||||
import {AlfrescoAuthenticationService} from 'ng2-alfresco-login/ng2-alfresco-login';
|
||||
import { AlfrescoAuthenticationService } from 'ng2-alfresco-login/ng2-alfresco-login';
|
||||
|
||||
@Directive({selector: 'auth-router-outlet'})
|
||||
export class AuthRouterOutlet extends RouterOutlet {
|
||||
@@ -24,11 +24,9 @@ export class AuthRouterOutlet extends RouterOutlet {
|
||||
publicRoutes: Array<string>;
|
||||
private router: Router;
|
||||
|
||||
constructor(
|
||||
_elementRef: ElementRef, _loader: DynamicComponentLoader,
|
||||
_parentRouter: Router, @Attribute('name') nameAttr: string,
|
||||
private authentication: AlfrescoAuthenticationService
|
||||
) {
|
||||
constructor(_elementRef: ElementRef, _loader: DynamicComponentLoader,
|
||||
_parentRouter: Router, @Attribute('name') nameAttr: string,
|
||||
private authentication: AlfrescoAuthenticationService) {
|
||||
super(_elementRef, _loader, _parentRouter, nameAttr);
|
||||
|
||||
this.router = _parentRouter;
|
||||
|
Reference in New Issue
Block a user