Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions themes/common-theme/webapp/common-theme/js/util/OfbizUtil.js
Original file line number Diff line number Diff line change
Expand Up @@ -666,15 +666,11 @@ function ajaxUpdateArea(areaId, target, targetParams) {

function updateArea(areaId, data) {
// If the area is indicate as embedded why replace the area instead inject into
var bindObserversArea = "#" + areaId
if (/^embedded/.test(areaId)) {
jQuery("#" + areaId).replaceWith(data);
const newContentId = $(data).filter('.embeddedScreen').attr('id');
bindObserversArea = "#" + newContentId;
} else {
jQuery("#" + areaId).html(data);
}
bindObservers(bindObserversArea);
}

/** Update multiple areas (HTML container elements).
Expand Down Expand Up @@ -847,6 +843,12 @@ function ajaxSubmitFormUpdateAreas(formName, areaCsvString, close) {
areaId = $form[0].target
}
updateArea(areaId, data)
var bindObserversArea = "#" + areaId
if (/^embedded/.test(areaId)) {
const newContentId = $(data).filter('.embeddedScreen').attr('id');
bindObserversArea = "#" + newContentId;
}
bindObservers(bindObserversArea);
} else {
if (containsErrorMessages(data)) {
displayErrorMessages(data)
Expand Down
Loading