Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RA-2047 - Registration app personAddressWithHierarchy does not naviga… #144

Merged
merged 1 commit into from
Sep 30, 2024
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -318,27 +318,32 @@ function PersonAddressWithHierarchy(personAddressWithHierarchy) {
});
_.each(ui.item.data, function (value, key) {
setValue(key, value);
if (typeof (NavigatorController) != 'undefined') {
NavigatorController.stepForward();
}
});

// go to the first level we didn't just set
// go to the first level we didn't just set if there is one defined
var goToLevel = firstLevelNotIncluded(ui.item.data);
//this will disable next mandatory levels if no entries are configured in the system
preloadLevels(goToLevel);
if (goToLevel) {
//this will disable next mandatory levels if no entries are configured in the system
preloadLevels(goToLevel);

// if we are using the simple UI navigator, use the NavigatorController so that the simple for UI keeps up
if (typeof(NavigatorController) != 'undefined') {
var field = NavigatorController.getFieldById(personAddressWithHierarchy.id + '-' + goToLevel.addressField);
setTimeout(function () {
var oldField = selectedModel(NavigatorController.getFields());
if (oldField) {
oldField.toggleSelection();
}
field.select();
});
}
// otherwise just jump manually
else {
getInputElementFor(goToLevel.addressField).focus();
// if we are using the simple UI navigator, use the NavigatorController so that the simple for UI keeps up
if (typeof (NavigatorController) != 'undefined') {
var field = NavigatorController.getFieldById(personAddressWithHierarchy.id + '-' + goToLevel.addressField);
setTimeout(function () {
var oldField = selectedModel(NavigatorController.getFields());
if (oldField) {
oldField.toggleSelection();
}
field.select();
});
}
// otherwise just jump manually
else {
getInputElementFor(goToLevel.addressField).focus();
}
}
},
change: function (event, ui) {
Expand Down
Loading