Skip to content

Commit

Permalink
[BUGFIX] Fix issue in JS - "Relations" (#624)
Browse files Browse the repository at this point in the history
* [BUGFIX] Revert changes in JS Code to its previous version
  • Loading branch information
PKuhlmay authored Oct 10, 2022
1 parent 35fb0e3 commit 192bf90
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions Resources/Public/jsDomainModeling/extbaseModeling.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,25 @@ Element.prototype.parents = function (selector) {
if (YAHOO.util.Dom.get(selectElement).parentNode.classList.contains('isDependant')) {
return;
}
var fieldset = $(selectElement).parents('fieldset').first();

var fieldSets = selectElement.parents('fieldset');
if (fieldSets.length === 0) {
return;
}
if (selectElement.name === 'relationType') {
// relations
var fieldSets = selectElement.parents('fieldset');
if (fieldSets.length === 0) {
var fieldSet = fieldSets[0];
var outerFieldSets = fieldSet.parents('fieldset');
if (outerFieldSets.length === 0) {
return;
}
fieldset = $(fieldset).parents('fieldset').first();
var renderTypeSelect = fieldset.find("select[name='renderType']").first();
fieldSet = outerFieldSets[0];
var renderTypeSelect = fieldSet.querySelectorAll('select[name="renderType"]')[0];
updateRenderTypeOptions(selectElement.value, renderTypeSelect);
}

fieldset.attr('class', '');
fieldset.addClass(selectElement.value);
fieldSet.classList.value = '';
fieldSet.classList.add(selectElement.value);
}
}

/**
Expand Down

0 comments on commit 192bf90

Please sign in to comment.