aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/coffee
diff options
context:
space:
mode:
authorJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>2015-05-12 14:07:42 +0200
committerJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>2015-05-18 10:10:41 +0200
commitc8faf0972b6dc91c88f668572b760d24dd7d007e (patch)
tree1790a23cb43293d75077bdb4cb4bcc2b3403508a /server/sonar-web/src/main/coffee
parent6558440736ca0053d98aa289c92563181dc4be80 (diff)
downloadsonarqube-c8faf0972b6dc91c88f668572b760d24dd7d007e.tar.gz
sonarqube-c8faf0972b6dc91c88f668572b760d24dd7d007e.zip
SONAR-6520 Refactor WS to select2 format conversion function to utilities
Diffstat (limited to 'server/sonar-web/src/main/coffee')
-rw-r--r--server/sonar-web/src/main/coffee/issues/facets/assignee-facet.coffee7
-rw-r--r--server/sonar-web/src/main/coffee/issues/facets/reporter-facet.coffee7
2 files changed, 2 insertions, 12 deletions
diff --git a/server/sonar-web/src/main/coffee/issues/facets/assignee-facet.coffee b/server/sonar-web/src/main/coffee/issues/facets/assignee-facet.coffee
index dfeb669741c..b1b91c7e207 100644
--- a/server/sonar-web/src/main/coffee/issues/facets/assignee-facet.coffee
+++ b/server/sonar-web/src/main/coffee/issues/facets/assignee-facet.coffee
@@ -39,12 +39,7 @@ define [
quietMillis: 300
url: @getUrl()
data: (term, page) -> { q: term, p: page }
- results: (data) ->
- more: false,
- results: _.map(data.users, (user) ->
- id: user.login,
- text: "#{user.name} (#{user.login})"
- )
+ results: window.usersToSelect2
onRender: ->
super
diff --git a/server/sonar-web/src/main/coffee/issues/facets/reporter-facet.coffee b/server/sonar-web/src/main/coffee/issues/facets/reporter-facet.coffee
index af5be0934e7..aa2c9dcd659 100644
--- a/server/sonar-web/src/main/coffee/issues/facets/reporter-facet.coffee
+++ b/server/sonar-web/src/main/coffee/issues/facets/reporter-facet.coffee
@@ -34,12 +34,7 @@ define [
quietMillis: 300
url: @getUrl()
data: (term, page) -> { q: term, p: page }
- results: (data) ->
- more: false,
- results: _.map(data.users, (user) ->
- id: user.login,
- text: "#{user.name} (#{user.login})"
- )
+ results: window.usersToSelect2
getValuesWithLabels: ->
values = @model.getValues()