add loader to document type
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
vm.currentNode = null;
|
||||
vm.contentType = {};
|
||||
vm.page = {};
|
||||
vm.page.loading = false;
|
||||
vm.page.navigation = [
|
||||
{
|
||||
"name": "Design",
|
||||
@@ -108,17 +109,30 @@
|
||||
];
|
||||
|
||||
if ($routeParams.create) {
|
||||
|
||||
vm.page.loading = true;
|
||||
|
||||
//we are creating so get an empty data type item
|
||||
contentTypeResource.getScaffold($routeParams.id)
|
||||
.then(function(dt) {
|
||||
|
||||
init(dt);
|
||||
|
||||
vm.page.loading = false;
|
||||
|
||||
});
|
||||
}
|
||||
else {
|
||||
|
||||
vm.page.loading = true;
|
||||
|
||||
contentTypeResource.getById($routeParams.id).then(function(dt){
|
||||
init(dt);
|
||||
|
||||
syncTreeNode(vm.contentType, dt.path, true);
|
||||
|
||||
vm.page.loading = false;
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
<div ng-controller="Umbraco.Editors.DocumentType.EditController as vm">
|
||||
|
||||
<umb-load-indicator ng-if="vm.page.loading"></umb-load-indicator>
|
||||
|
||||
<form novalidate name="contentTypeForm"
|
||||
ng-show="vm.contentType"
|
||||
ng-show="!vm.page.loading"
|
||||
ng-submit="vm.save()"
|
||||
val-form-manager>
|
||||
<umb-editor-view>
|
||||
|
||||
Reference in New Issue
Block a user