[ACA-1432] unified selection and single info drawer (#385)

* track document list selection state

* selection management enhancements

* (fix) hide info drawer on selection reset

* use store selection

* remove event handler

* upgrade info drawer for personal files

* upgrade favorties

* upgrade recent files

* move info drawer to a separate component

* test fixes

* update tests

* test fixes

* remove obsolete directive

* use last selection entry

* switch back to first selected node

* selection improvements, versioning uses same node

* optimised toolbar visibility evaluation

* upgrade libs

* update js api

* test fixes

* test fixes

* test updates

* test fixes

* fix e2e tests

* show metadata for last clicked node
This commit is contained in:
Denys Vuika
2018-06-06 12:44:13 +01:00
committed by GitHub
parent a67dd43ad6
commit f0c0fe162b
39 changed files with 512 additions and 671 deletions

View File

@@ -38,6 +38,8 @@ import { NodeActionsService } from '../../common/services/node-actions.service';
import { NodePermissionService } from '../../common/services/node-permission.service';
import { PageComponent } from '../page.component';
import { Store } from '@ngrx/store';
import { AcaState } from '../../store/states/app.state';
@Component({
templateUrl: './files.component.html'
@@ -48,8 +50,9 @@ export class FilesComponent extends PageComponent implements OnInit, OnDestroy {
private nodePath: PathElement[];
constructor(private router: Router,
constructor(router: Router,
route: ActivatedRoute,
store: Store<AcaState>,
private nodesApi: NodesApiService,
private nodeActionsService: NodeActionsService,
private uploadService: UploadService,
@@ -60,10 +63,12 @@ export class FilesComponent extends PageComponent implements OnInit, OnDestroy {
private notificationService: NotificationService,
public permission: NodePermissionService,
preferences: UserPreferencesService) {
super(preferences, route);
super(preferences, router, route, store);
}
ngOnInit() {
super.ngOnInit();
const { route, contentManagementService, contentService, nodeActionsService, uploadService } = this;
const { data } = route.snapshot;
@@ -156,14 +161,6 @@ export class FilesComponent extends PageComponent implements OnInit, OnDestroy {
}
}
showPreview(node: MinimalNodeEntryEntity) {
if (node) {
if (node.isFile) {
this.router.navigate(['./preview', node.id], { relativeTo: this.route });
}
}
}
onBreadcrumbNavigate(route: PathElementEntity) {
// todo: review this approach once 5.2.3 is out
if (this.nodePath && this.nodePath.length > 2) {