Skip to content

Commit

Permalink
Sort field dropdowns on visualization dialog.
Browse files Browse the repository at this point in the history
PP-141
  • Loading branch information
lo5 committed Jun 13, 2014
1 parent f54d605 commit 98d7b46
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions client/src/scripts/scoring-sheet-view.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -580,15 +580,19 @@ Steam.ScoringSheetView = (_, _scorings) ->
_metricTypeFilter = null
_metricCriteriaFilter = null
_allFilters = null

getSortedFloatVariables = (variables) ->
sortBy (filter variables, (variable) -> variable.type is 'float'), (variable) -> variable.caption

_metricsVisualizationType =
type: 'scoring'
caption: 'Scoring'
variables: filter metricVariables, (variable) -> variable.type is 'float'
variables: getSortedFloatVariables metricVariables

_thresholdVisualizationType =
type: 'threshold'
caption: 'Threshold'
variables: filter thresholdVariables, (variable) -> variable.type is 'float'
variables: getSortedFloatVariables thresholdVariables

_visualizationTypes = [ _metricsVisualizationType, _thresholdVisualizationType ]

Expand Down

0 comments on commit 98d7b46

Please sign in to comment.