diff options
author | Petr Vobornik <pvoborni@redhat.com> | 2013-05-29 10:12:44 +0200 |
---|---|---|
committer | Petr Vobornik <pvoborni@redhat.com> | 2013-06-03 09:23:24 +0200 |
commit | ec41744e7638a233869f3e65fe07fdea55f0ff5c (patch) | |
tree | f964ecee2c2b5608340fb4354e409a8506f59152 | |
parent | b1321e95d7bb2cd52fc4eb9caa1d3b9b384eea83 (diff) | |
download | freeipa-ec41744e7638a233869f3e65fe07fdea55f0ff5c.tar.gz freeipa-ec41744e7638a233869f3e65fe07fdea55f0ff5c.tar.xz freeipa-ec41744e7638a233869f3e65fe07fdea55f0ff5c.zip |
Regression fix: missing control buttons in nested search facets
Regression introduced by 6e90920233cc9a7c9feb040dea22cda837715c39 - 'Move spec modifications from facet factories to pre_ops'.
https://fedorahosted.org/freeipa/ticket/3605
-rw-r--r-- | install/ui/src/freeipa/search.js | 40 |
1 files changed, 24 insertions, 16 deletions
diff --git a/install/ui/src/freeipa/search.js b/install/ui/src/freeipa/search.js index e923316f6..03ec0b12a 100644 --- a/install/ui/src/freeipa/search.js +++ b/install/ui/src/freeipa/search.js @@ -33,22 +33,7 @@ define([ var exp = {}; -exp.search_facet_pre_op = function(spec, context) { - - var entity = context.entity; - su.context_entity(spec, context); - - spec.name = spec.name || 'search'; - spec.title = spec.title || entity.metadata.label; - spec.label = spec.label || entity.metadata.label; - spec.tab_label = spec.tab_label || '@i18n:facets.search'; - - spec.managed_entity = spec.managed_entity ? IPA.get_entity(spec.managed_entity) : spec.entity; - - spec.disable_breadcrumb = - spec.disable_breadcrumb === undefined ? true : spec.disable_breadcrumb; - spec.disable_facet_tabs = - spec.disable_facet_tabs === undefined ? true : spec.disable_facet_tabs; +exp.search_facet_control_buttons_pre_op = function(spec, context) { spec.actions = spec.actions || []; spec.actions.unshift( @@ -83,7 +68,27 @@ exp.search_facet_pre_op = function(spec, context) { spec.state.evaluators.push( IPA.selected_state_evaluator, IPA.self_service_state_evaluator); + return spec; +}; +exp.search_facet_pre_op = function(spec, context) { + + var entity = context.entity; + su.context_entity(spec, context); + + spec.name = spec.name || 'search'; + spec.title = spec.title || entity.metadata.label; + spec.label = spec.label || entity.metadata.label; + spec.tab_label = spec.tab_label || '@i18n:facets.search'; + + spec.managed_entity = spec.managed_entity ? IPA.get_entity(spec.managed_entity) : spec.entity; + + spec.disable_breadcrumb = + spec.disable_breadcrumb === undefined ? true : spec.disable_breadcrumb; + spec.disable_facet_tabs = + spec.disable_facet_tabs === undefined ? true : spec.disable_facet_tabs; + + exp.search_facet_control_buttons_pre_op(spec, context); return spec; }; @@ -372,6 +377,7 @@ exp.nested_search_facet_preop = function(spec, context) { var entity = context.entity; su.context_entity(spec, context); + spec.name = spec.name || 'search'; spec.title = spec.title || entity.metadata.label_singular; spec.label = spec.label || entity.metadata.label; spec.tab_label = spec.tab_label || '@i18n:facets.search'; @@ -380,6 +386,8 @@ exp.nested_search_facet_preop = function(spec, context) { spec.disable_breadcrumb = false; spec.disable_facet_tabs = false; + + exp.search_facet_control_buttons_pre_op(spec, context); return spec; }; |