Reload templates when creating a doc type with template

This commit is contained in:
Bjarke Berg
2019-02-12 15:11:07 +01:00
parent 06a8569570
commit 1def9014cd

View File

@@ -480,6 +480,15 @@
loadDocumentType();
}));
evts.push(eventsService.on("editors.documentType.saved", function(name, args) {
if(args.documentType.allowedTemplates.length > 0){
navigationService.syncTree({ tree: "templates", path: [], forceReload: true })
.then(function (syncArgs) {
navigationService.reloadNode(syncArgs.node)
});
}
}));
//ensure to unregister from all events!
$scope.$on('$destroy', function () {
for (var e in evts) {