Page 1 of 1

closing modal window automatically?

Posted: 2022-11-22 16:13
by onoehring
Hi,

when I open a modal window (subrecord) using the "eye" symbol next to a dropdown, I am wondering if there is a chance to have a modal window close automatically after it's record has been saved.
It seems, that when adding a new record in the details tabs using modal windows, the modal window is closed automatically.
Also, when deleting a record the modal window closes.

Suggestion
If there is currently no way to accomplish this, I want to suggest, to have a checkbox in AG (next to my red circle) which can be checked to automatically close a (modal) window / return to the previous "parent record" if the details are opened in the same window.
modal_window.png
modal_window.png (121.23 KiB) Viewed 1931 times
Olaf

Re: closing modal window automatically?

Posted: 2022-11-23 00:37
by D Oliveira
you can use the .click() js method on the element that closes the modal an run this on the parent js in case you wanna trigger any action after modal has been closed:

Code: Select all

$j(function() {
    $j(window).on('child-modal-closed', function(e, data) {
        // do something
        $j('form').submit(); // reload the current DV
    });
});