mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2026-09-09 18:02:54 +00:00
[ACA-2045] reset selection on toggle join action (#829)
This commit is contained in:
committed by
Denys Vuika
parent
32083576c3
commit
8952be634f
@@ -34,6 +34,7 @@ import {
|
|||||||
SnackbarErrorAction,
|
SnackbarErrorAction,
|
||||||
SnackbarInfoAction
|
SnackbarInfoAction
|
||||||
} from '../../../store/actions/snackbar.actions';
|
} from '../../../store/actions/snackbar.actions';
|
||||||
|
import { SetSelectedNodesAction } from '../../../store/actions/node.actions';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-toggle-join-library',
|
selector: 'app-toggle-join-library',
|
||||||
@@ -98,6 +99,13 @@ export class ToggleJoinLibraryComponent {
|
|||||||
if (event.shouldReload) {
|
if (event.shouldReload) {
|
||||||
this.content.libraryJoined.next();
|
this.content.libraryJoined.next();
|
||||||
} else {
|
} else {
|
||||||
|
if (event.updatedEntry) {
|
||||||
|
this.store.dispatch(
|
||||||
|
new SetSelectedNodesAction([
|
||||||
|
<any>{ entry: event.updatedEntry, isLibrary: true }
|
||||||
|
])
|
||||||
|
);
|
||||||
|
}
|
||||||
this.content.joinLibraryToggle.next();
|
this.content.joinLibraryToggle.next();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -84,6 +84,7 @@ export class LibraryMembershipDirective implements OnChanges {
|
|||||||
this.targetSite.joinRequested = false;
|
this.targetSite.joinRequested = false;
|
||||||
this.isJoinRequested.next(false);
|
this.isJoinRequested.next(false);
|
||||||
const info = {
|
const info = {
|
||||||
|
updatedEntry: this.targetSite,
|
||||||
shouldReload: false,
|
shouldReload: false,
|
||||||
i18nKey: 'APP.MESSAGES.INFO.JOIN_CANCELED'
|
i18nKey: 'APP.MESSAGES.INFO.JOIN_CANCELED'
|
||||||
};
|
};
|
||||||
@@ -117,6 +118,7 @@ export class LibraryMembershipDirective implements OnChanges {
|
|||||||
this.toggle.emit(info);
|
this.toggle.emit(info);
|
||||||
} else {
|
} else {
|
||||||
const info = {
|
const info = {
|
||||||
|
updatedEntry: this.targetSite,
|
||||||
shouldReload: false,
|
shouldReload: false,
|
||||||
i18nKey: 'APP.MESSAGES.INFO.JOIN_REQUESTED'
|
i18nKey: 'APP.MESSAGES.INFO.JOIN_REQUESTED'
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user