Skip to content

Commit

Permalink
Merge pull request #3315 from zaknafain/multiselect_options
Browse files Browse the repository at this point in the history
Multi select Search Placeholder Fix
  • Loading branch information
mshibuya committed Feb 28, 2021
2 parents 2dba791 + 6820898 commit 4474486
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 17 deletions.
14 changes: 7 additions & 7 deletions app/assets/javascripts/rails_admin/ra.filtering-multiselect.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@
sortable: false,
removable: true,
regional: {
up: "Up",
down: "Down",
add: "Add",
chooseAll: "Choose all",
chosen: "Chosen records",
clearAll: "Clear all",
remove: "Remove"
add: 'Add',
chooseAll: 'Choose all',
clearAll: 'Clear all',
down: 'Down',
remove: 'Remove',
search: 'Search',
up: 'Up'
},
searchDelay: 400,
remote_source: null,
Expand Down
7 changes: 4 additions & 3 deletions app/views/rails_admin/main/_form_enumeration.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@
sortable: false,
cacheAll: true,
regional: {
add: t("admin.misc.add_new"),
chooseAll: t("admin.misc.chose_all"),
chosen: t("admin.misc.chosen", name: config.label_plural),
clearAll: t("admin.misc.clear_all"),
down: t("admin.misc.down"),
remove: t("admin.misc.remove"),
search: t("admin.misc.search"),
up: t("admin.misc.up"),
down: t("admin.misc.down")
up: t("admin.misc.up")
}
}
= form.select field.method_name, field.enum, { selected: field.form_value, object: form.object }, field.html_attributes.reverse_merge({data: { filteringmultiselect: true, options: js_data.to_json }, multiple: true})
13 changes: 7 additions & 6 deletions app/views/rails_admin/main/_form_filtering_multiselect.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,13 @@
removable: !!field.removable,
cacheAll: !!field.associated_collection_cache_all,
regional: {
chooseAll: t("admin.misc.chose_all"),
chosen: t("admin.misc.chosen", name: config.label_plural),
clearAll: t("admin.misc.clear_all"),
search: t("admin.misc.search"),
up: t("admin.misc.up"),
down: t("admin.misc.down")
add: t('admin.misc.add_new'),
chooseAll: t('admin.misc.chose_all'),
clearAll: t('admin.misc.clear_all'),
down: t('admin.misc.down'),
remove: t('admin.misc.remove'),
search: t('admin.misc.search'),
up: t('admin.misc.up')
}
}

Expand Down
1 change: 0 additions & 1 deletion config/locales/rails_admin.en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ en:
bulk_menu_title: "Selected items"
remove: "Remove"
add_new: "Add new"
chosen: "Chosen %{name}"
chose_all: "Choose all"
clear_all: "Clear all"
up: "Up"
Expand Down

0 comments on commit 4474486

Please sign in to comment.