summaryrefslogtreecommitdiffstats
path: root/extensions/ProdCompSearch
diff options
context:
space:
mode:
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) {