[ACA-1530] allow calling download action from extensions (#500)

* download action

* use download action everywhere
This commit is contained in:
Denys Vuika
2018-07-08 18:40:36 +01:00
committed by GitHub
parent f503880f72
commit 1c48198e79
11 changed files with 62 additions and 75 deletions

View File

@@ -30,7 +30,7 @@ import { Store } from '@ngrx/store';
import { MinimalNodeEntity, MinimalNodeEntryEntity } from 'alfresco-js-api';
import { takeUntil } from 'rxjs/operators';
import { Subject, Subscription } from 'rxjs/Rx';
import { ViewNodeAction, SetSelectedNodesAction } from '../store/actions';
import { ViewNodeAction, SetSelectedNodesAction, DownloadNodesAction } from '../store/actions';
import { appSelection, sharedUrl, currentFolder } from '../store/selectors/app.selectors';
import { AppStore } from '../store/states/app.state';
import { SelectionState } from '../store/states/selection.state';
@@ -154,6 +154,10 @@ export abstract class PageComponent implements OnInit, OnDestroy {
this.documentList.display = this.displayMode;
}
downloadSelection() {
this.store.dispatch(new DownloadNodesAction());
}
// this is where each application decides how to treat an action and what to do
// the ACA maps actions to the NgRx actions as an example
runAction(actionId: string) {