PAGE_SIZE = 50
ALL_FACETS = ['severities', 'statuses', 'resolutions', 'componentRootUuids', 'assignees', 'reporters', 'rules',
'languages', 'actionPlans', 'componentUuids', 'creationDate']
- FACET_DATA_FIELDS = ['components', 'projects', 'users', 'rules', 'actionPlans']
+ FACET_DATA_FIELDS = ['components', 'projects', 'users', 'rules', 'actionPlans', 'languages']
FACETS_FROM_SERVER = ['severities', 'statuses', 'resolutions', 'actionPlans', 'componentRootUuids', 'rules',
'assignees', 'reporters', 'componentUuids', 'languages']
'issues/facets/action-plan-facet'
'issues/facets/component-facet'
'issues/facets/reporter-facet'
+ 'issues/facets/language-facet'
], (
Marionette
BaseFacet
ActionPlanFacet
ComponentFacet
ReporterFacet
+ LanguageFacet
) ->
class extends Marionette.CollectionView
when 'actionPlans' then ActionPlanFacet
when 'componentUuids' then ComponentFacet
when 'reporters' then ReporterFacet
+ when 'languages' then LanguageFacet
else BaseFacet
--- /dev/null
+define [
+ 'issues/facets/base-facet'
+], (
+ BaseFacet
+) ->
+
+
+ class extends BaseFacet
+
+ getValuesWithLabels: ->
+ values = @model.getValues()
+ source = @options.app.facets.languages
+ values.forEach (v) =>
+ key = v.val
+ label = null
+ if key
+ item = _.findWhere source, key: key
+ label = item.name if item?
+ v.label = label
+ values
+
+
+ serializeData: ->
+ _.extend super,
+ values: @getValuesWithLabels()