Skip to content

Commit

Permalink
Fix #24641 Cannot filter deployed applications by Engines in Admin Co…
Browse files Browse the repository at this point in the history
…nsole

Signed-off-by: kaido207 <kaido.hiroki@fujitsu.com>
  • Loading branch information
kaido207 committed Oct 20, 2023
1 parent ef006f7 commit 83ef262
Showing 1 changed file with 36 additions and 37 deletions.
73 changes: 36 additions & 37 deletions appserver/admingui/common/src/main/resources/js/adminjsf.js
Original file line number Diff line number Diff line change
Expand Up @@ -2717,49 +2717,48 @@ admingui.woodstock = {
},

dropDownChanged: function(jumpDropdown) {

if (typeof(jumpDropdown) === "string") {

require(['webui/suntheme/dropDown'], function (dropDown) {
require(['webui/suntheme/dropDown'], function (dropDown) {
if (typeof(jumpDropdown) === "string") {
jumpDropdown = dropDown.getSelectElement(jumpDropdown);

// Force WS "submitter" flag to true
var submitterFieldId = jumpDropdown.id + "_submitter";
var submitterField = document.getElementById(submitterFieldId);
}

// Force WS "submitter" flag to true
var submitterFieldId = jumpDropdown.id + "_submitter";
var submitterField = document.getElementById(submitterFieldId);
if (!submitterField) {
submitterFieldId = jumpDropdown.parentNode.id + "_submitter";
submitterField = document.getElementById(submitterFieldId);
if (!submitterField) {
submitterFieldId = jumpDropdown.parentNode.id + "_submitter";
submitterField = document.getElementById(submitterFieldId);
if (!submitterField) {
admingui.util.log("Unable to find dropDown submitter for: "
+ jumpDropdown.id);
return false;
}
admingui.util.log("Unable to find dropDown submitter for: "
+ jumpDropdown.id);
return false;
}
submitterField.value = "true";

require(['webui/suntheme/props'], function (props) {
// FIXME: Not sure why the following is done...
var listItem = jumpDropdown.options;
for (var cntr=0; cntr < listItem.length; ++cntr) {
if (listItem[cntr].className == props.jumpDropDown.optionSeparatorClassName
|| listItem[cntr].className == props.jumpDropDown.optionGroupClassName) {
continue;
} else if (listItem[cntr].disabled) {
// Regardless if the option is currently selected or not,
// the disabled option style should be used when the option
// is disabled. So, check for the disabled item first.
// See CR 6317842.
listItem[cntr].className = props.jumpDropDown.optionDisabledClassName;
} else if (listItem[cntr].selected) {
listItem[cntr].className = props.jumpDropDown.optionSelectedClassName;
} else {
listItem[cntr].className = props.jumpDropDown.optionClassName;
}
}
submitterField.value = "true";

require(['webui/suntheme/props'], function (props) {
// FIXME: Not sure why the following is done...
var listItem = jumpDropdown.options;
for (var cntr=0; cntr < listItem.length; ++cntr) {
if (listItem[cntr].className == props.jumpDropDown.optionSeparatorClassName
|| listItem[cntr].className == props.jumpDropDown.optionGroupClassName) {
continue;
} else if (listItem[cntr].disabled) {
// Regardless if the option is currently selected or not,
// the disabled option style should be used when the option
// is disabled. So, check for the disabled item first.
// See CR 6317842.
listItem[cntr].className = props.jumpDropDown.optionDisabledClassName;
} else if (listItem[cntr].selected) {
listItem[cntr].className = props.jumpDropDown.optionSelectedClassName;
} else {
listItem[cntr].className = props.jumpDropDown.optionClassName;
}
admingui.ajax.postAjaxRequest(jumpDropdown);
});
}
admingui.ajax.postAjaxRequest(jumpDropdown);
});
}
});

return false;

Expand Down

0 comments on commit 83ef262

Please sign in to comment.