mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Prevent opening of multiple dirty dialogs on navigation
Facets which performs AJAX call after update refresh (clear dirty state) after calling callback of dirty dialog. It might lead to multiple openings of dirty dialog. Assuming that calling dirty dialog's callback can be evaluated as "dirty state is gone", we can call reset in the callback to prevent the issue. There will be an incorrect state in the facet for a moment. It will be fixed soon on execute of callback of the refresh AJAX call. It is not an issue because it will happen in background. User will be looking on different facet. https://fedorahosted.org/freeipa/ticket/2667
This commit is contained in:
parent
1f831393a2
commit
b4d35718a5
@ -134,6 +134,11 @@ IPA.navigation = function(spec) {
|
||||
});
|
||||
|
||||
dialog.callback = function() {
|
||||
|
||||
// Some facet's might not call reset before this call but after
|
||||
// so they are still dirty. Calling reset prevent's opening of
|
||||
// dirty dialog again.
|
||||
if (prev_facet.is_dirty()) prev_facet.reset();
|
||||
$.bbq.pushState(params);
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user