diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/grid.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/grid.controller.js index 24aa722cc3..d62a1bf2ca 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/grid.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/grid.controller.js @@ -9,6 +9,7 @@ angular.module("umbraco") $scope.currentControl = null; $scope.openRTEToolbarId = null; $scope.hasSettings = false; + $scope.showRowConfigurations = false; // ********************************************* // Sortable options @@ -277,6 +278,9 @@ angular.module("umbraco") if (row) { section.rows.push(row); } + + $scope.showRowConfigurations = false; + }; $scope.removeRow = function (section, $index) { @@ -287,6 +291,10 @@ angular.module("umbraco") //$scope.initContent(); } + + if(section.rows.length === 0) { + $scope.showRowConfigurations = true; + } }; $scope.editGridItemSettings = function (gridItem, itemType) { @@ -438,6 +446,10 @@ angular.module("umbraco") scopedObject.deletePrompt = true; }; + $scope.toggleAddRow = function() { + $scope.showRowConfigurations = !$scope.showRowConfigurations; + }; + // ********************************************* // INITIALISATION