add loader to document type

This commit is contained in:
Mads Rasmussen
2015-08-28 13:12:37 +02:00
parent 6f51660406
commit f042db66f4
2 changed files with 18 additions and 1 deletions

View File

@@ -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;
});
}

View File

@@ -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>