This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

waffle search suggestions on gaia

  • Loading branch information...
cvan committed Oct 8, 2012
1 parent 9f1e204 commit 9f707914ef98fef5a0914d690eaae28ed905adce
Showing with 3 additions and 1 deletion.
  1. +1 −0 media/js/mkt/init.js
  2. +1 −1 media/js/mkt/mkt_suggestions.js
  3. +1 −0 mkt/templates/mkt/base.html
View
@@ -16,6 +16,7 @@ var z = {
},
canInstallApps: true,
allowAnonInstalls: !!$('body').data('allow-anon-installs'),
+ enableSearchSuggestions: !!$('body').data('enable-search-suggestions'),
// if ($('#myDialog li').length > z.confirmBreakNum) add class 'two-col'.
confirmBreakNum: 6
};
@@ -1,7 +1,7 @@
// Init site search suggestions and populate the suggestions container.
(function() {
// MKT search init.
- if (!z.capabilities.gaia) { // Disable suggestions on Gaia for now.
+ if (!z.capabilities.gaia || z.enableSearchSuggestions) { // Disable suggestions on Gaia for now.
$('#search #search-q').searchSuggestions($('#site-search-suggestions'),
processResults, 'MKT');
}
@@ -45,6 +45,7 @@
data-collect-timings="{{ url('mkt.timing.record') }}:{{ collect_timings_percent }}"
data-simulate-nav-pay="{{ settings.SIMULATE_NAV_PAY|json }}"
data-page-type="{{ pagetype or 'leaf' }}"
+ data-enable-search-suggestions="{{ waffle.switch('enable-search-suggestions-gaia')|json }}"
{% if not logged %}data-recaptcha="{{ settings.RECAPTCHA_PUBLIC_KEY }}"{% endif %}
{% block bodyattrs %}{% endblock %}>

0 comments on commit 9f70791

Please sign in to comment.