Reload templates when creating a doc type with template
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user