fix first item always selected; added aria-label for null option

pull/2375/head
Mihail Maxacov 10 years ago
parent d1c4ced43c
commit 1e24e69fc9
  1. 2
      config/locales/js-de.yml
  2. 2
      config/locales/js-en.yml
  3. 2
      frontend/app/ui_components/inplace-editor-directive.js
  4. 5
      frontend/public/templates/components/inplace_editor/editable/select2.html

@ -333,6 +333,7 @@ de:
type: "Typ"
updatedAt: "Aktualisiert"
versionName: "Version"
version: "Version"
query:
column_names: "Spalten"
group_by: "Gruppiere Ergebnisse nach"
@ -395,6 +396,7 @@ de:
link_formatting_help: "Textformatierung"
btn_preview_enable: "Vorschau"
btn_preview_disable: "Vorschau deaktivieren"
null_value_label: "Kein Wert"
error_could_not_resolve_version_name: "Versionsbezeichner konnte nicht aufgelöst werden"
error_could_not_resolve_user_name: "Benutzername konnte nicht aufgelöst werden"

@ -336,6 +336,7 @@ en:
type: "Type"
updatedAt: "Updated on"
versionName: "Version"
version: "Version"
query:
column_names: "Columns"
group_by: "Group results by"
@ -398,6 +399,7 @@ en:
link_formatting_help: "Text formatting"
btn_preview_enable: "Preview"
btn_preview_disable: "Disable preview"
null_value_label: "No value"
error_could_not_resolve_version_name: "Couldn't resolve version name"
error_could_not_resolve_user_name: "Couldn't resolve user name"

@ -104,6 +104,8 @@ module.exports = function(
$scope.acceptErrors = acceptErrors;
$scope.pathHelper = PathHelper;
$scope.nullValueLabel = I18n.t('js.inplace.null_value_label');
activate();
function activate() {

@ -3,10 +3,11 @@
ng-disabled="isBusy"
ng-model="dataObject.value"
title="{{ editTitle }}"
reset-search-input="true"
theme="select2">
<ui-select-match>{{$select.selected.name}}</ui-select-match>
<ui-select-match>{{ $select.selected.name }}</ui-select-match>
<ui-select-choices
repeat="item.href as item in options | filter: $select.search">
<div ng-bind-html="item.name | highlight: $select.search"></div>
<div aria-label="{{ item.name || nullValueLabel }}" ng-bind-html="item.name | highlight: $select.search"></div>
</ui-select-choices>
</ui-select>

Loading…
Cancel
Save