fixes Backoffice UI - checkboxes on doctype compositions uncheck after selecting an item #9432

This commit is contained in:
Mads Rasmussen
2021-01-12 14:13:09 +01:00
parent 8a65a0f92b
commit 7a73e24ecd
2 changed files with 4 additions and 21 deletions

View File

@@ -64,24 +64,7 @@
var contentType = compositeContentType.contentType;
$scope.model.selectCompositeContentType(contentType).then(function (response) {
Utilities.forEach(vm.availableGroups, function (group) {
Utilities.forEach(group.compositeContentTypes, function (obj) {
if (obj.allowed === false) {
obj.selected = false;
}
});
});
$timeout(function () {
vm.loading = false;
}, 500);
}, function () {
$timeout(function () {
vm.loading = false;
}, 500);
vm.loading = false;
});
// Check if the template is already selected.

View File

@@ -68,17 +68,17 @@
</li>
<li class="umb-checkbox-list__item"
ng-repeat="compositeContentType in group.compositeContentTypes | orderBy:'contentType.name' | filter:searchTerm"
ng-class="{'-disabled': compositeContentType.allowed === false || compositeContentType.inherited, '-selected': compositeContentType.selected}">
ng-class="{'-disabled': (compositeContentType.allowed === false && !compositeContentType.selected) || compositeContentType.inherited, '-selected': compositeContentType.selected}">
<div class="umb-checkbox-list__item-checkbox" ng-class="{'-selected': compositeContentType.selected }">
<umb-checkbox input-id="umb-overlay-comp-{{compositeContentType.contentType.key}}"
model="compositeContentType.selected"
on-change="vm.selectCompositeContentType(compositeContentType)"
disabled="compositeContentType.allowed === false || compositeContentType.inherited">
disabled="(compositeContentType.allowed === false && !compositeContentType.selected) || compositeContentType.inherited || vm.loading">
</umb-checkbox>
</div>
<label for="umb-overlay-comp-{{compositeContentType.contentType.key}}" class="umb-checkbox-list__item-text" ng-class="{'-faded': compositeContentType.allowed === false}">
<label for="umb-overlay-comp-{{compositeContentType.contentType.key}}" class="umb-checkbox-list__item-text" ng-class="{'-faded': compositeContentType.allowed === false && !compositeContentType.selected}">
<i class="{{ compositeContentType.contentType.icon }} umb-checkbox-list__item-icon"></i>
{{ compositeContentType.contentType.name }}
<span class="umb-checkbox-list__item-caption" ng-if="compositeContentType.inherited">(inherited)</span>