summaryrefslogtreecommitdiffstats
path: root/extensions/ProdCompSearch
diff options
context:
space:
mode:
authorByron Jones <bjones@mozilla.com>2013-03-06 09:40:29 +0100
committerByron Jones <bjones@mozilla.com>2013-03-06 09:40:29 +0100
commit4ac63bb2181e9e07851bf73520cd068818947b6a (patch)
tree8d6098dbfec3248686519c7f5577eb8c47115e3c /extensions/ProdCompSearch
parent6b5c91b2f020e9a1ab0e9efd5d4d339fa8f7b22d (diff)
downloadbugzilla-4ac63bb2181e9e07851bf73520cd068818947b6a.tar.gz
bugzilla-4ac63bb2181e9e07851bf73520cd068818947b6a.tar.xz
Bug 848217: The product component search field is not putting bugzilla.mozilla.org components before upstream Bugzilla components
Diffstat (limited to 'extensions/ProdCompSearch')
-rw-r--r--extensions/ProdCompSearch/Extension.pm7
-rw-r--r--extensions/ProdCompSearch/lib/WebService.pm2
-rw-r--r--extensions/ProdCompSearch/web/js/prod_comp_search.js6
3 files changed, 11 insertions, 4 deletions
diff --git a/extensions/ProdCompSearch/Extension.pm b/extensions/ProdCompSearch/Extension.pm
index 4a4fae355..a5955fd8b 100644
--- a/extensions/ProdCompSearch/Extension.pm
+++ b/extensions/ProdCompSearch/Extension.pm
@@ -11,4 +11,11 @@ use base qw(Bugzilla::Extension);
our $VERSION = '1';
+sub webservice {
+ my ($self, $args) = @_;
+ my $dispatch = $args->{dispatch};
+ $dispatch->{PCS} = "Bugzilla::Extension::ProdCompSearch::WebService";
+}
+
+
__PACKAGE__->NAME;
diff --git a/extensions/ProdCompSearch/lib/WebService.pm b/extensions/ProdCompSearch/lib/WebService.pm
index bbc355e00..dea2e5e51 100644
--- a/extensions/ProdCompSearch/lib/WebService.pm
+++ b/extensions/ProdCompSearch/lib/WebService.pm
@@ -22,7 +22,7 @@ sub prod_comp_search {
my $search = $params->{'search'};
$search || ThrowCodeError('param_required',
- { function => 'Bug.prod_comp_search', param => 'search' });
+ { function => 'PCS.prod_comp_search', param => 'search' });
my $limit = detaint_natural($params->{'limit'})
? $dbh->sql_limit($params->{'limit'})
diff --git a/extensions/ProdCompSearch/web/js/prod_comp_search.js b/extensions/ProdCompSearch/web/js/prod_comp_search.js
index 1aa65d5e6..f58a8d330 100644
--- a/extensions/ProdCompSearch/web/js/prod_comp_search.js
+++ b/extensions/ProdCompSearch/web/js/prod_comp_search.js
@@ -24,7 +24,7 @@ YUI({
autoComplete = null;
var resultListFormat = function(query, results) {
- return Y.Array.map(results, function (result) {
+ return Y.Array.map(results, function(result) {
var data = result.raw;
result.text = data.product + ' :: ' + data.component;
return Y.Escape.html(result.text);
@@ -35,7 +35,7 @@ YUI({
counter = counter + 1;
var json_object = {
version: "1.1",
- method : "MyDashboard.prod_comp_search",
+ method : "PCS.prod_comp_search",
id : counter,
params : { search: query }
};
@@ -99,7 +99,7 @@ YUI({
}
window.location.href = url;
}
- },
+ }
});
input.on('focus', function (e) {