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