From e6ab111f4d5db0a9af5c7b0a12b1eceeeb4b768e Mon Sep 17 00:00:00 2001 From: Mads Rasmussen Date: Mon, 18 Jan 2016 11:29:23 +0100 Subject: [PATCH] Fixes: U4-7676 Don't show "Reorder" link in initial row-view for grid --- .../src/views/propertyeditors/grid/grid.controller.js | 11 +++++++++++ .../src/views/propertyeditors/grid/grid.html | 1 + 2 files changed, 12 insertions(+) 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 28982280d7..8272f032ee 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 @@ -233,6 +233,17 @@ angular.module("umbraco") } }; + $scope.showReorderButton = function() { + if($scope.model.value && $scope.model.value.sections) { + for(var i = 0; $scope.model.value.sections.length > i; i++) { + var section = $scope.model.value.sections[i]; + if(section.rows && section.rows.length > 0) { + return true; + } + } + } + }; + // ********************************************* // Add items overlay menu // ********************************************* diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/grid.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/grid.html index 89373867e9..99b207a627 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/grid.html +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/grid.html @@ -4,6 +4,7 @@