From 66eeaceb8cc50902b408e5c97c6d04e59e57f97a Mon Sep 17 00:00:00 2001 From: Adam Young Date: Tue, 28 Jun 2011 13:39:10 -0400 Subject: shorten url cache state in a javascript variable, and leave on information about the current entity in the URL hash params https://fedorahosted.org/freeipa/ticket/674 decrement depth for hidden tabs. Initialize state from url useing delete for removing state stricter attribute matching not incrementing depth for all hidden tabs. whitespace cleanup --- install/ui/search.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'install/ui/search.js') diff --git a/install/ui/search.js b/install/ui/search.js index 4f3802781..b5f71e0d5 100644 --- a/install/ui/search.js +++ b/install/ui/search.js @@ -102,7 +102,7 @@ IPA.search_facet = function(spec) { that.filter = $('', { type: 'text', - 'class': 'search-filter', + 'class': 'search-filter', name: 'filter' }).appendTo(span); @@ -156,7 +156,7 @@ IPA.search_facet = function(spec) { that.facet_show(); if (that.filter) { - var filter = $.bbq.getState(that.entity_name+'-filter'); + var filter = IPA.nav.get_state(that.entity_name+'-filter'); that.filter.val(filter); } }; @@ -301,11 +301,11 @@ IPA.search_facet = function(spec) { var filter = []; var current_entity = entity; - filter.unshift($.bbq.getState(current_entity.name+'-filter')); + filter.unshift(IPA.nav.get_state(current_entity.name+'-filter')); current_entity = current_entity.containing_entity; while(current_entity !== null){ filter.unshift( - $.bbq.getState(current_entity.name+'-pkey')); + IPA.nav.get_state(current_entity.name+'-pkey')); current_entity = current_entity.containing_entity; } @@ -349,17 +349,17 @@ IPA.nested_search_facet = function(spec) { that.facet_show(); that.header.set_pkey( - $.bbq.getState(IPA.current_entity.name+'-pkey')); + IPA.nav.get_state(IPA.current_entity.name+'-pkey')); if (that.filter) { - var filter = $.bbq.getState(that.managed_entity_name+'-filter'); + var filter = IPA.nav.get_state(that.managed_entity_name+'-filter'); that.filter.val(filter); } }; that.refresh = function(){ - var pkey = $.bbq.getState(that.entity.name+'-pkey'); + var pkey = IPA.nav.get_state(that.entity.name+'-pkey'); if ((!pkey) && (that.entity.redirect_facet)) { that.redirect(); -- cgit