Merge pull request #3146 from floriank/fix/20170-sorting-in-wp-list-menus

[20170] order the options in the modal selects
pull/3173/head
Florian Kraft 9 years ago
commit 74ca8c3ff5
  1. 2
      frontend/app/templates/work_packages/modals/columns.html
  2. 2
      frontend/app/templates/work_packages/modals/group_by.html
  3. 2
      frontend/app/templates/work_packages/modals/sorting.html
  4. 4
      spec/features/support/ui_select.rb

@ -10,7 +10,7 @@
<ui-select-match>
{{$item.title}}
</ui-select-match>
<ui-select-choices repeat="column in vm.unusedColumns | filter: { title: $select.search }"
<ui-select-choices repeat="column in vm.unusedColumns | filter: { title: $select.search } | orderBy:'title'"
refresh="updateUnusedColumns($select.selected)" refresh-delay="0">
<div ng-bind-html="column.title | highlight: $select.search"></div>
</ui-select-choices>

@ -7,7 +7,7 @@
<div>
<ui-select ng-model="vm.selectedColumnName" theme="select2" focus id="selected_columns_new" aria-labelledby="column_select_description">
<ui-select-match>{{$select.selected.title}}</ui-select-match>
<ui-select-choices repeat="column.name as column in vm.groupableColumns | filter: { title: $select.search }">
<ui-select-choices repeat="column.name as column in vm.groupableColumns | filter: { title: $select.search } | orderBy:'title'">
<div ng-bind-html="column.title | highlight: $select.search"></div>
</ui-select-choices>
</ui-select>

@ -11,7 +11,7 @@
<div class="form--field-container">
<ui-select ng-model="element[0]" theme="select2" focus="!$index" aria-labelledby="sorting_select_description">
<ui-select-match>{{$select.selected.label}}</ui-select-match>
<ui-select-choices repeat="column as column in getRemainingAvailableColumnsData() | filter: { label: $select.search }">
<ui-select-choices repeat="column as column in getRemainingAvailableColumnsData() | filter: { label: $select.search } | orderBy:'label'">
<div ng-bind-html="column.label | highlight: $select.search"></div>
</ui-select-choices>
</ui-select>

@ -28,7 +28,11 @@
shared_context 'ui-select helpers' do
def ui_select_choose(select2_element, option_name)
# Open the element
select2_element.find('.select2-choice').click
# Insert the text to find
select2_element.find('.select2-search input').set(option_name)
# click the element to select it
select2_element.find('ul.select2-result-single li', text: option_name).click
end
end

Loading…
Cancel
Save