mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-05-12 17:04:46 +00:00
parent
79f8ec33a9
commit
c1e9001c38
@ -141,6 +141,9 @@
|
|||||||
|
|
||||||
</data-columns>
|
</data-columns>
|
||||||
</adf-document-list>
|
</adf-document-list>
|
||||||
<adf-pagination [target]="documentList"></adf-pagination>
|
<adf-pagination
|
||||||
|
[target]="documentList"
|
||||||
|
(changePageSize)="onChangePageSize($event)">
|
||||||
|
</adf-pagination>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -20,7 +20,7 @@ import { Router } from '@angular/router';
|
|||||||
import { Subscription } from 'rxjs/Rx';
|
import { Subscription } from 'rxjs/Rx';
|
||||||
|
|
||||||
import { MinimalNodeEntryEntity, MinimalNodeEntity, PathElementEntity, PathInfo } from 'alfresco-js-api';
|
import { MinimalNodeEntryEntity, MinimalNodeEntity, PathElementEntity, PathInfo } from 'alfresco-js-api';
|
||||||
import { ContentService, NodesApiService } from '@alfresco/adf-core';
|
import { ContentService, NodesApiService, UserPreferencesService } from '@alfresco/adf-core';
|
||||||
import { DocumentListComponent } from '@alfresco/adf-content-services';
|
import { DocumentListComponent } from '@alfresco/adf-content-services';
|
||||||
|
|
||||||
import { ContentManagementService } from '../../common/services/content-management.service';
|
import { ContentManagementService } from '../../common/services/content-management.service';
|
||||||
@ -40,8 +40,9 @@ export class FavoritesComponent extends PageComponent implements OnInit, OnDestr
|
|||||||
private router: Router,
|
private router: Router,
|
||||||
private nodesApi: NodesApiService,
|
private nodesApi: NodesApiService,
|
||||||
private contentService: ContentService,
|
private contentService: ContentService,
|
||||||
private content: ContentManagementService) {
|
private content: ContentManagementService,
|
||||||
super();
|
preferences: UserPreferencesService) {
|
||||||
|
super(preferences);
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
@ -143,8 +143,10 @@
|
|||||||
|
|
||||||
<ng-container *ngIf="!isEmpty">
|
<ng-container *ngIf="!isEmpty">
|
||||||
<adf-pagination
|
<adf-pagination
|
||||||
|
[supportedPageSizes]="documentList.supportedPageSizes"
|
||||||
[pagination]="pagination"
|
[pagination]="pagination"
|
||||||
(change)="load(true, $event)">
|
(change)="load(true, $event)"
|
||||||
|
(changePageSize)="onChangePageSize($event)">
|
||||||
</adf-pagination>
|
</adf-pagination>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
</adf-upload-drag-area>
|
</adf-upload-drag-area>
|
||||||
|
@ -19,7 +19,10 @@ import { Observable, Subscription } from 'rxjs/Rx';
|
|||||||
import { Component, OnInit, OnDestroy, ChangeDetectorRef } from '@angular/core';
|
import { Component, OnInit, OnDestroy, ChangeDetectorRef } from '@angular/core';
|
||||||
import { Router, ActivatedRoute, Params } from '@angular/router';
|
import { Router, ActivatedRoute, Params } from '@angular/router';
|
||||||
import { MinimalNodeEntity, MinimalNodeEntryEntity, PathElementEntity, NodePaging, PathElement } from 'alfresco-js-api';
|
import { MinimalNodeEntity, MinimalNodeEntryEntity, PathElementEntity, NodePaging, PathElement } from 'alfresco-js-api';
|
||||||
import { UploadService, FileUploadEvent, NodesApiService, ContentService, AlfrescoApiService } from '@alfresco/adf-core';
|
import {
|
||||||
|
UploadService, FileUploadEvent, NodesApiService,
|
||||||
|
ContentService, AlfrescoApiService, UserPreferencesService
|
||||||
|
} from '@alfresco/adf-core';
|
||||||
|
|
||||||
import { BrowsingFilesService } from '../../common/services/browsing-files.service';
|
import { BrowsingFilesService } from '../../common/services/browsing-files.service';
|
||||||
import { ContentManagementService } from '../../common/services/content-management.service';
|
import { ContentManagementService } from '../../common/services/content-management.service';
|
||||||
@ -47,8 +50,9 @@ export class FilesComponent extends PageComponent implements OnInit, OnDestroy {
|
|||||||
private contentManagementService: ContentManagementService,
|
private contentManagementService: ContentManagementService,
|
||||||
private browsingFilesService: BrowsingFilesService,
|
private browsingFilesService: BrowsingFilesService,
|
||||||
private contentService: ContentService,
|
private contentService: ContentService,
|
||||||
private apiService: AlfrescoApiService) {
|
private apiService: AlfrescoApiService,
|
||||||
super();
|
preferences: UserPreferencesService) {
|
||||||
|
super(preferences);
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
@ -64,6 +64,9 @@
|
|||||||
</data-column>
|
</data-column>
|
||||||
</data-columns>
|
</data-columns>
|
||||||
</adf-document-list>
|
</adf-document-list>
|
||||||
<adf-pagination [target]="documentList"></adf-pagination>
|
<adf-pagination
|
||||||
|
[target]="documentList"
|
||||||
|
(changePageSize)="onChangePageSize($event)">
|
||||||
|
</adf-pagination>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
import { Component, ViewChild } from '@angular/core';
|
import { Component, ViewChild } from '@angular/core';
|
||||||
import { Router, ActivatedRoute } from '@angular/router';
|
import { Router, ActivatedRoute } from '@angular/router';
|
||||||
import { NodesApiService } from '@alfresco/adf-core';
|
import { NodesApiService, UserPreferencesService } from '@alfresco/adf-core';
|
||||||
import { DocumentListComponent, ShareDataRow } from '@alfresco/adf-content-services';
|
import { DocumentListComponent, ShareDataRow } from '@alfresco/adf-content-services';
|
||||||
|
|
||||||
import { PageComponent } from '../page.component';
|
import { PageComponent } from '../page.component';
|
||||||
@ -33,8 +33,9 @@ export class LibrariesComponent extends PageComponent {
|
|||||||
constructor(
|
constructor(
|
||||||
private nodesApi: NodesApiService,
|
private nodesApi: NodesApiService,
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
private router: Router) {
|
private router: Router,
|
||||||
super();
|
preferences: UserPreferencesService) {
|
||||||
|
super(preferences);
|
||||||
}
|
}
|
||||||
|
|
||||||
makeLibraryTooltip(library: any): string {
|
makeLibraryTooltip(library: any): string {
|
||||||
|
@ -23,7 +23,7 @@ class TestClass extends PageComponent {
|
|||||||
node: any;
|
node: any;
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
fetchNodes(parentNodeId?: string, options?: any) {
|
fetchNodes(parentNodeId?: string, options?: any) {
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { MinimalNodeEntity, MinimalNodeEntryEntity, NodePaging, Pagination } from 'alfresco-js-api';
|
import { MinimalNodeEntity, MinimalNodeEntryEntity, NodePaging, Pagination } from 'alfresco-js-api';
|
||||||
|
import { UserPreferencesService } from '@alfresco/adf-core';
|
||||||
|
|
||||||
export abstract class PageComponent {
|
export abstract class PageComponent {
|
||||||
|
|
||||||
@ -31,6 +32,9 @@ export abstract class PageComponent {
|
|||||||
|
|
||||||
abstract fetchNodes(parentNodeId?: string, options?: any): void;
|
abstract fetchNodes(parentNodeId?: string, options?: any): void;
|
||||||
|
|
||||||
|
constructor(private preferences: UserPreferencesService) {
|
||||||
|
}
|
||||||
|
|
||||||
onFetchError(error: any) {
|
onFetchError(error: any) {
|
||||||
this.isLoading = false;
|
this.isLoading = false;
|
||||||
}
|
}
|
||||||
@ -121,4 +125,8 @@ export abstract class PageComponent {
|
|||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onChangePageSize(event: Pagination): void {
|
||||||
|
this.preferences.paginationSize = event.maxItems;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -130,6 +130,9 @@
|
|||||||
</data-columns>
|
</data-columns>
|
||||||
|
|
||||||
</adf-document-list>
|
</adf-document-list>
|
||||||
<adf-pagination [target]="documentList"></adf-pagination>
|
<adf-pagination
|
||||||
|
[target]="documentList"
|
||||||
|
(changePageSize)="onChangePageSize($event)">
|
||||||
|
</adf-pagination>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -19,6 +19,7 @@ import { Subscription } from 'rxjs/Rx';
|
|||||||
import { Component, ViewChild, OnInit, OnDestroy } from '@angular/core';
|
import { Component, ViewChild, OnInit, OnDestroy } from '@angular/core';
|
||||||
import { Router } from '@angular/router';
|
import { Router } from '@angular/router';
|
||||||
import { MinimalNodeEntryEntity } from 'alfresco-js-api';
|
import { MinimalNodeEntryEntity } from 'alfresco-js-api';
|
||||||
|
import { UserPreferencesService } from '@alfresco/adf-core';
|
||||||
import { DocumentListComponent } from '@alfresco/adf-content-services';
|
import { DocumentListComponent } from '@alfresco/adf-content-services';
|
||||||
|
|
||||||
import { ContentManagementService } from '../../common/services/content-management.service';
|
import { ContentManagementService } from '../../common/services/content-management.service';
|
||||||
@ -36,8 +37,9 @@ export class RecentFilesComponent extends PageComponent implements OnInit, OnDes
|
|||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private content: ContentManagementService) {
|
private content: ContentManagementService,
|
||||||
super();
|
preferences: UserPreferencesService) {
|
||||||
|
super(preferences);
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
@ -138,6 +138,9 @@
|
|||||||
|
|
||||||
</data-columns>
|
</data-columns>
|
||||||
</adf-document-list>
|
</adf-document-list>
|
||||||
<adf-pagination [target]="documentList"></adf-pagination>
|
<adf-pagination
|
||||||
|
[target]="documentList"
|
||||||
|
(changePageSize)="onChangePageSize($event)">
|
||||||
|
</adf-pagination>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -19,7 +19,7 @@ import { Component, OnInit, ViewChild, OnDestroy } from '@angular/core';
|
|||||||
import { Router } from '@angular/router';
|
import { Router } from '@angular/router';
|
||||||
import { Subscription } from 'rxjs/Rx';
|
import { Subscription } from 'rxjs/Rx';
|
||||||
import { MinimalNodeEntity } from 'alfresco-js-api';
|
import { MinimalNodeEntity } from 'alfresco-js-api';
|
||||||
import { AlfrescoApiService } from '@alfresco/adf-core';
|
import { AlfrescoApiService, UserPreferencesService } from '@alfresco/adf-core';
|
||||||
import { DocumentListComponent } from '@alfresco/adf-content-services';
|
import { DocumentListComponent } from '@alfresco/adf-content-services';
|
||||||
|
|
||||||
import { ContentManagementService } from '../../common/services/content-management.service';
|
import { ContentManagementService } from '../../common/services/content-management.service';
|
||||||
@ -38,8 +38,9 @@ export class SharedFilesComponent extends PageComponent implements OnInit, OnDes
|
|||||||
constructor(
|
constructor(
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private content: ContentManagementService,
|
private content: ContentManagementService,
|
||||||
private apiService: AlfrescoApiService) {
|
private apiService: AlfrescoApiService,
|
||||||
super();
|
preferences: UserPreferencesService) {
|
||||||
|
super(preferences);
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
@ -94,6 +94,9 @@
|
|||||||
</data-columns>
|
</data-columns>
|
||||||
|
|
||||||
</adf-document-list>
|
</adf-document-list>
|
||||||
<adf-pagination [target]="documentList"></adf-pagination>
|
<adf-pagination
|
||||||
|
[target]="documentList"
|
||||||
|
(changePageSize)="onChangePageSize($event)">
|
||||||
|
</adf-pagination>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -17,7 +17,8 @@
|
|||||||
|
|
||||||
import { Component, ViewChild, OnInit, OnDestroy } from '@angular/core';
|
import { Component, ViewChild, OnInit, OnDestroy } from '@angular/core';
|
||||||
import { Subscription } from 'rxjs/Rx';
|
import { Subscription } from 'rxjs/Rx';
|
||||||
|
import { Pagination } from 'alfresco-js-api';
|
||||||
|
import { UserPreferencesService } from '@alfresco/adf-core';
|
||||||
import { DocumentListComponent } from '@alfresco/adf-content-services';
|
import { DocumentListComponent } from '@alfresco/adf-content-services';
|
||||||
import { ContentManagementService } from '../../common/services/content-management.service';
|
import { ContentManagementService } from '../../common/services/content-management.service';
|
||||||
|
|
||||||
@ -29,7 +30,9 @@ export class TrashcanComponent implements OnInit, OnDestroy {
|
|||||||
|
|
||||||
@ViewChild(DocumentListComponent) documentList;
|
@ViewChild(DocumentListComponent) documentList;
|
||||||
|
|
||||||
constructor(private contentManagementService: ContentManagementService) {}
|
constructor(
|
||||||
|
private contentManagementService: ContentManagementService,
|
||||||
|
private preferences: UserPreferencesService) {}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.subscriptions.push(this.contentManagementService.restoreNode.subscribe(() => this.refresh()));
|
this.subscriptions.push(this.contentManagementService.restoreNode.subscribe(() => this.refresh()));
|
||||||
@ -43,4 +46,8 @@ export class TrashcanComponent implements OnInit, OnDestroy {
|
|||||||
ngOnDestroy() {
|
ngOnDestroy() {
|
||||||
this.subscriptions.forEach(s => s.unsubscribe());
|
this.subscriptions.forEach(s => s.unsubscribe());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onChangePageSize(event: Pagination): void {
|
||||||
|
this.preferences.paginationSize = event.maxItems;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user