Fixes: U4-7676 Don't show "Reorder" link in initial row-view for grid

This commit is contained in:
Mads Rasmussen
2016-01-18 11:29:23 +01:00
parent c9936da37f
commit e6ab111f4d
2 changed files with 12 additions and 0 deletions

View File

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

View File

@@ -4,6 +4,7 @@
<umb-editor-sub-header-content-right>
<umb-button
ng-if="showReorderButton()"
type="button"
icon="icon-navigation"
button-style="link"