mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-2743] changes gallery manager
This commit is contained in:
@@ -39,7 +39,6 @@ import { SocialComponent } from './components/social/social.component';
|
||||
import { FilesComponent } from './components/files/files.component';
|
||||
import { FormComponent } from './components/form/form.component';
|
||||
|
||||
import { UploadButtonComponent } from '@alfresco/adf-content-services';
|
||||
import { FileViewComponent } from './components/file-view/file-view.component';
|
||||
import { CustomSourcesComponent } from './components/files/custom-sources.component';
|
||||
import { FormListComponent } from './components/form/form-list.component';
|
||||
@@ -80,13 +79,19 @@ export const appRoutes: Routes = [
|
||||
},
|
||||
{
|
||||
path: 'files',
|
||||
redirectTo: 'files/-my-'
|
||||
component: FilesComponent,
|
||||
canActivate: [AuthGuardEcm]
|
||||
},
|
||||
{
|
||||
path: 'files/:id',
|
||||
component: FilesComponent,
|
||||
canActivate: [AuthGuardEcm]
|
||||
},
|
||||
{
|
||||
path: 'files/:id/display/:mode',
|
||||
component: FilesComponent,
|
||||
canActivate: [AuthGuardEcm]
|
||||
},
|
||||
{
|
||||
path: 'dl-custom-sources',
|
||||
component: CustomSourcesComponent,
|
||||
@@ -96,11 +101,6 @@ export const appRoutes: Routes = [
|
||||
path: 'datatable',
|
||||
component: DataTableComponent
|
||||
},
|
||||
{
|
||||
path: 'uploader',
|
||||
component: UploadButtonComponent,
|
||||
canActivate: [AuthGuardEcm]
|
||||
},
|
||||
{
|
||||
path: 'search',
|
||||
component: SearchResultComponent,
|
||||
|
@@ -19,7 +19,7 @@
|
||||
}
|
||||
|
||||
.adf-app-layout-toolbar {
|
||||
z-index: 200000;
|
||||
z-index: 1001;
|
||||
position: relative;
|
||||
overflow: visible !important;
|
||||
}
|
||||
|
@@ -39,7 +39,6 @@ export class AppLayoutComponent {
|
||||
{ href: '/form', icon: 'poll', title: 'APP_LAYOUT.FORM' },
|
||||
{ href: '/form-list', icon: 'library_books', title: 'APP_LAYOUT.FORM_LIST' },
|
||||
{ href: '/form-loading', icon: 'cached', title: 'APP_LAYOUT.FORM_LOADING' },
|
||||
{ href: '/uploader', icon: 'file_upload', title: 'APP_LAYOUT.UPLOADER' },
|
||||
{ href: '/webscript', icon: 'extension', title: 'APP_LAYOUT.WEBSCRIPT' },
|
||||
{ href: '/tag', icon: 'local_offer', title: 'APP_LAYOUT.TAG' },
|
||||
{ href: '/social', icon: 'thumb_up', title: 'APP_LAYOUT.SOCIAL' },
|
||||
|
@@ -252,7 +252,7 @@
|
||||
</data-column>
|
||||
<data-column
|
||||
title="{{'DOCUMENT_LIST.COLUMNS.CREATED_BY' | translate}}"
|
||||
key="createdByUser?.displayName"
|
||||
key="createdByUser.displayName"
|
||||
class="desktop-only">
|
||||
</data-column>
|
||||
<data-column
|
||||
|
@@ -19,6 +19,8 @@ import {
|
||||
Component, Input, OnInit, OnChanges, OnDestroy, Optional,
|
||||
EventEmitter, ViewChild, SimpleChanges, Output
|
||||
} from '@angular/core';
|
||||
import { Location } from '@angular/common';
|
||||
|
||||
import { MatDialog } from '@angular/material';
|
||||
import { ActivatedRoute, Params, Router } from '@angular/router';
|
||||
import { MinimalNodeEntity, NodePaging, Pagination, MinimalNodeEntryEntity, SiteEntry } from 'alfresco-js-api';
|
||||
@@ -155,6 +157,7 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
|
||||
private uploadService: UploadService,
|
||||
private contentService: ContentService,
|
||||
private dialog: MatDialog,
|
||||
private location: Location,
|
||||
private translateService: TranslationService,
|
||||
private router: Router,
|
||||
private logService: LogService,
|
||||
@@ -194,6 +197,10 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
|
||||
if (params['id'] && this.currentFolderId !== params['id']) {
|
||||
this.currentFolderId = params['id'];
|
||||
}
|
||||
|
||||
if (params['mode']) {
|
||||
this.displayMode = DisplayMode.Gallery;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -459,10 +466,17 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
|
||||
}
|
||||
|
||||
toogleGalleryView(): void {
|
||||
const url = this
|
||||
.router
|
||||
.createUrlTree(['/files', this.currentFolderId, 'display', this.displayMode])
|
||||
.toString();
|
||||
|
||||
if (this.displayMode === DisplayMode.List) {
|
||||
this.displayMode = DisplayMode.Gallery;
|
||||
this.location.go(url);
|
||||
} else {
|
||||
this.displayMode = DisplayMode.List;
|
||||
this.location.go(url);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -92,6 +92,10 @@ export class InfinitePaginationComponent implements OnInit, OnDestroy, Paginatio
|
||||
this.pagination.merge = true;
|
||||
this.loadMore.next(this.pagination);
|
||||
|
||||
if ((this.pagination.skipCount + this.pageSize) > this.pagination.totalItems) {
|
||||
this.pagination.hasMoreItems = false;
|
||||
}
|
||||
|
||||
if (this.target) {
|
||||
this.target.pagination.value.merge = this.pagination.merge;
|
||||
this.target.pagination.value.skipCount = this.pagination.skipCount;
|
||||
|
Reference in New Issue
Block a user