From bbe672a2aea1651a4a0eeca20b8339f0799f3431 Mon Sep 17 00:00:00 2001 From: Petr Vobornik Date: Thu, 22 Mar 2012 17:03:57 +0100 Subject: Facet expiration flag Problem: For performance reason a facet may cache the data in browser's memory. There should be a flag to indicate whether a facet has expired and should be refreshed. The expired flag could be set by these events: 1) any update operation 2) changing search filter in search facet 3) switching page in a multi-paged search/association facet 4) switching direct/indirect view in association facet 5) facet expiration time A facet should be able to use these methods to refresh itself: 6) on demand: an expired facet should be refreshed when a user opens it. 7) automatic: an open facet should automatically refresh itself when it expires. Solution: This patch solves cases: #2, #3, #5, #6. Case #4 works without any change. Case #1 will be solved later. Case #7 is deffered. Default expiration timeout was set to 10 minutes. In this patch are also updated facet.needs_update methods to reflect changes in containing facets. https://fedorahosted.org/freeipa/ticket/2075 --- install/ui/association.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'install/ui/association.js') diff --git a/install/ui/association.js b/install/ui/association.js index 238006f4..ab43518f 100644 --- a/install/ui/association.js +++ b/install/ui/association.js @@ -1064,9 +1064,7 @@ IPA.association_facet = function (spec) { var page = parseInt(IPA.nav.get_state(that.entity.name+'-page'), 10) || 1; if (that.table.current_page !== page) return true; - if (that.error_displayed()) return true; - - return false; + return that.facet_needs_update(); }; init(); -- cgit