diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/dialogs/config.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/dialogs/config.controller.js index 30c89d5f2e..7330d69b2f 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/dialogs/config.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/dialogs/config.controller.js @@ -16,7 +16,25 @@ function ConfigController($scope) { $scope.model.close(); } } - + + vm.showEmptyState = false; + vm.showConfig = false; + vm.showStyles = false; + + $scope.$watchCollection('model.config', onWatch); + $scope.$watchCollection('model.styles', onWatch); + + function onWatch() { + + vm.showConfig = $scope.model.config && + ($scope.model.config.length > 0 || Object.keys($scope.model.config).length > 0); + vm.showStyles = $scope.model.styles && + ($scope.model.styles.length > 0 || Object.keys($scope.model.styles).length > 0); + + vm.showEmptyState = vm.showConfig === false && vm.showStyles === false; + + } + } angular.module("umbraco").controller("Umbraco.PropertyEditors.GridPrevalueEditor.ConfigController", ConfigController); diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/dialogs/config.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/dialogs/config.html index a7cabd1636..88585b76fa 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/dialogs/config.html +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/dialogs/config.html @@ -13,11 +13,11 @@ - + No further configuration available - +
@@ -29,7 +29,7 @@ - +
@@ -52,7 +52,7 @@ shortcut="esc" action="vm.close()"> -