aboutsummaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2015-06-02 16:11:19 +0200
committerStas Vilchik <vilchiks@gmail.com>2015-06-02 16:11:19 +0200
commit66a868f92cb3d10e054a5d8322f91d99bb6942d4 (patch)
tree05f6bf556dd6ff498788552e404ece528d12e2be /server
parentfb31400daf90743eeed0095a148f8888caab281c (diff)
downloadsonarqube-66a868f92cb3d10e054a5d8322f91d99bb6942d4.tar.gz
sonarqube-66a868f92cb3d10e054a5d8322f91d99bb6942d4.zip
SONAR-6602 use "q" for search
Diffstat (limited to 'server')
-rw-r--r--server/sonar-web/src/main/js/apps/groups/users-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/users/groups-view.js1
-rw-r--r--server/sonar-web/src/main/js/components/common/select-list.js8
3 files changed, 8 insertions, 2 deletions
diff --git a/server/sonar-web/src/main/js/apps/groups/users-view.js b/server/sonar-web/src/main/js/apps/groups/users-view.js
index 59f84d74b08..cfe6468ce0e 100644
--- a/server/sonar-web/src/main/js/apps/groups/users-view.js
+++ b/server/sonar-web/src/main/js/apps/groups/users-view.js
@@ -17,6 +17,7 @@ define([
format: function (item) {
return item.name + '<br><span class="note">' + item.login + '</span>';
},
+ queryParam: 'q',
searchUrl: baseUrl + '/api/usergroups/users?ps=100&id=' + this.model.id,
selectUrl: baseUrl + '/api/usergroups/add_user',
deselectUrl: baseUrl + '/api/usergroups/remove_user',
diff --git a/server/sonar-web/src/main/js/apps/users/groups-view.js b/server/sonar-web/src/main/js/apps/users/groups-view.js
index cf5f5da9eb6..1634fb1d244 100644
--- a/server/sonar-web/src/main/js/apps/users/groups-view.js
+++ b/server/sonar-web/src/main/js/apps/users/groups-view.js
@@ -18,6 +18,7 @@ define([
format: function (item) {
return item.name + '<br><span class="note">' + item.description + '</span>';
},
+ queryParam: 'q',
searchUrl: baseUrl + '/api/users/groups?ps=100&login=' + this.model.id,
selectUrl: baseUrl + '/api/usergroups/add_user',
deselectUrl: baseUrl + '/api/usergroups/remove_user',
diff --git a/server/sonar-web/src/main/js/components/common/select-list.js b/server/sonar-web/src/main/js/components/common/select-list.js
index 480fbd9d690..5716ed2fa10 100644
--- a/server/sonar-web/src/main/js/components/common/select-list.js
+++ b/server/sonar-web/src/main/js/components/common/select-list.js
@@ -329,7 +329,8 @@ define(function () {
search: function () {
var query = this.$('.select-list-search-control input').val(),
hasQuery = query.length > 0,
- that = this;
+ that = this,
+ data = {};
this.$('.select-list-check-control').toggleClass('disabled', hasQuery);
this.$('.select-list-search-control').toggleClass('disabled', !hasQuery);
@@ -338,10 +339,11 @@ define(function () {
this.showFetchSpinner();
this.currentFilter = 'all';
+ data[this.settings.queryParam] = query;
this.collection.fetch({
url: this.settings.searchUrl,
reset: true,
- data: { query: query },
+ data: data,
success: function () {
that.hideFetchSpinner();
},
@@ -431,6 +433,8 @@ define(function () {
return r.results;
},
+ queryParam: 'query',
+
labels: {
selected: 'Selected',
deselected: 'Deselected',