add registry

This commit is contained in:
Géry Debongnie
2019-01-27 09:41:56 +01:00
parent 0dfa47e405
commit 5570df8bf0
4 changed files with 53 additions and 3 deletions
+4 -1
View File
@@ -1,6 +1,7 @@
import { EventBus, Callback } from "../core/event_bus";
import { Widget } from "../core/widget";
import { Env } from "../env";
import { Registry } from "../registry";
import { CRM } from "../widgets/crm";
import { Discuss } from "../widgets/discuss";
import { Query, IRouter } from "./router";
@@ -50,11 +51,13 @@ const actions: any[] = [
export class ActionManager extends EventBus implements IActionManager {
router: IRouter;
registry: Registry;
currentAction: ActionWidget | null = null;
constructor(router: IRouter) {
constructor(router: IRouter, registry: Registry) {
super();
this.router = router;
this.registry = registry;
const query = this.router.getQuery();
this.update(query);
this.router.on("query_changed", this, this.update);