Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Bugzilla/Template.pm
Original file line number Diff line number Diff line change
Expand Up @@ -994,6 +994,8 @@ sub create {

'feature_enabled' => sub { return Bugzilla->feature(@_); },

'has_extension' => sub { return Bugzilla->has_extension(@_); },

# field_descs can be somewhat slow to generate, so we generate
# it only once per-language no matter how many times
# $template->process() is called.
Expand Down
4 changes: 2 additions & 2 deletions js/instant-search.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ YAHOO.bugzilla.instantSearch = {

YAHOO.bugzilla.instantSearch.dataTable.showTableMessage(
'Searching...   ' +
'<img src="extensions/GuidedBugEntry/web/images/throbber.gif"' +
'<img src="images/throbber.gif"' +
' width="16" height="11">',
YAHOO.widget.DataTable.CLASS_LOADING
);
Expand Down Expand Up @@ -189,7 +189,7 @@ YAHOO.bugzilla.instantSearch = {
var result = [];
var name = Dom.get('product').value;
result.push(name);
if (products[name] && products[name].related) {
if (typeof products !== 'undefined' && products[name] && products[name].related) {
for (var i = 0, n = products[name].related.length; i < n; i++) {
result.push(products[name].related[i]);
}
Expand Down
8 changes: 6 additions & 2 deletions template/en/default/search/search-instant.html.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,15 @@

[% PROCESS global/variables.none.tmpl %]

[% javascript_urls = [ 'js/instant-search.js' ] %]
[% IF has_extension('GuidedBugEntry') %]
[% javascript_urls.import(['extensions/GuidedBugEntry/web/js/products.js']); %]
[% END %]

[% PROCESS global/header.html.tmpl
title = "Instant Search"
generate_api_token = 1
javascript_urls = [ 'extensions/GuidedBugEntry/web/js/products.js',
'js/instant-search.js', ]
javascript_urls = javascript_urls
%]

[% UNLESS default.exists('product') && default.product.size %]
Expand Down