From ae1743c61f3006b72d80dcb10be7d6862ce36b79 Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Thu, 19 Oct 2017 12:51:08 -0700 Subject: [PATCH] [WIP] select-box-kit refactoring --- .eslintrc | 1 + .../admin/components/list-setting.js.es6 | 2 - .../admin/templates/badges-show.hbs | 7 +- .../components/admin-user-field-item.hbs | 2 +- .../templates/components/embeddable-host.hbs | 2 +- .../admin/templates/customize-themes-show.hbs | 10 +- .../admin/templates/groups-bulk.hbs | 2 +- .../templates/logs/staff-action-logs.hbs | 2 +- .../modal/admin-color-scheme-select-base.hbs | 1 - .../javascripts/admin/templates/reports.hbs | 4 +- .../admin/templates/user-badges.hbs | 2 +- .../admin/templates/user-index.hbs | 3 +- .../admin/templates/web-hooks-show.hbs | 2 - app/assets/javascripts/application.js | 1 + .../components/combo-box.js.es6 | 146 ------ .../categories-admin-dropdown.js.es6 | 49 -- .../components/category-chooser.js.es6 | 88 ---- .../category-notifications-button.js.es6 | 28 - .../components/category-select-box.js.es6 | 162 ------ .../category-select-box-row.js.es6 | 13 - .../components/dropdown-select-box.js.es6 | 33 -- .../dropdown-header.js.es6 | 7 - .../future-date-input-selector.js.es6 | 207 -------- .../components/future-date-input.js.es6 | 2 +- .../group-notifications-button.js.es6 | 2 +- .../components/notifications-button.js.es6 | 68 --- .../components/pinned-options.js.es6 | 73 --- .../discourse/components/select-box.js.es6 | 485 ------------------ .../select-box/select-box-collection.js.es6 | 9 - .../select-box/select-box-filter.js.es6 | 5 - .../select-box/select-box-header.js.es6 | 24 - .../select-box/select-box-row.js.es6 | 47 -- .../tag-notifications-button.js.es6 | 24 - .../topic-footer-mobile-dropdown.js.es6 | 78 --- .../topic-notifications-button.js.es6 | 9 - .../topic-notifications-options.js.es6 | 52 -- .../discourse/lib/safari-hacks.js.es6 | 2 +- .../templates/components/badge-title.hbs | 2 +- .../dropdown-select-box/dropdown-header.hbs | 12 - .../components/edit-category-general.hbs | 4 +- .../components/edit-category-settings.hbs | 10 +- .../components/edit-topic-timer-form.hbs | 2 +- .../components/future-date-input.hbs | 3 - .../templates/components/queued-post.hbs | 2 +- .../templates/components/select-box.hbs | 55 -- .../select-box/select-box-collection.hbs | 28 - .../select-box/select-box-header.hbs | 9 - .../components/select-box/select-box-row.hbs | 1 - .../discourse/templates/composer.hbs | 2 +- .../discourse/templates/full-page-search.hbs | 2 +- .../templates/modal/bulk-change-category.hbs | 2 +- .../discourse/templates/modal/split-topic.hbs | 2 +- .../templates/preferences/card-badge.hbs | 2 +- .../templates/preferences/emails.hbs | 4 +- .../templates/preferences/interface.hbs | 4 +- .../javascripts/discourse/templates/topic.hbs | 2 +- .../categories-admin-dropdown.js.es6 | 50 ++ .../components/category-chooser.js.es6 | 131 +++++ .../category-notifications-button.js.es6 | 17 + ...ategory-notifications-button-header.js.es6 | 13 + .../components/combo-box.js.es6 | 21 + .../combo-box/combo-box-header.js.es6 | 39 ++ .../components/dropdown-select-box.js.es6 | 24 + .../dropdown-select-box-header.js.es6 | 6 + .../dropdown-select-box-row.js.es6 | 9 + .../future-date-input-selector.js.es6 | 118 +++++ .../future-date-input-selector-header.js.es6 | 14 + .../future-date-input-selector-row.js.es6 | 14 + .../future-date-input-selector/mixin.js.es6 | 101 ++++ .../components/multi-combo-box.js.es6 | 99 ++++ .../multi-combo-box-header.js.es6 | 40 ++ .../components/notifications-button.js.es6 | 40 ++ .../notifications-button-header.js.es6 | 24 + .../notifications-button-row.js.es6 | 37 ++ .../components/pinned-button.js.es6 | 9 +- .../components/pinned-options.js.es6 | 64 +++ .../pinned-options-header.js.es6 | 30 ++ .../components/select-box-kit.js.es6 | 440 ++++++++++++++++ .../select-box-kit-collection.js.es6 | 5 + .../select-box-kit-create-row.js.es6 | 10 + .../select-box-kit-filter.js.es6 | 6 + .../select-box-kit-header.js.es6 | 28 + .../select-box-kit-none-row.js.es6 | 10 + .../select-box-kit/select-box-kit-row.js.es6 | 59 +++ .../tag-notifications-button.js.es6 | 15 + .../tag-notifications-button-header.js.es6 | 13 + .../topic-footer-mobile-dropdown.js.es6 | 75 +++ .../topic-notifications-button.js.es6 | 6 + .../topic-notifications-options.js.es6 | 40 ++ .../select-box-kit/mixins/dom-helpers.js.es6 | 53 ++ .../select-box-kit/mixins/keyboard.js.es6 | 196 +++++++ .../select-box-kit/mixins/utils.js.es6 | 9 + .../components/combo-box/combo-box-header.hbs | 15 + .../dropdown-select-box-header.hbs | 17 + .../dropdown-select-box-row.hbs | 15 + .../future-date-input-selector-header.hbs | 23 + .../future-date-input-selector-row.hbs | 13 + .../multi-combo-box-header.hbs | 30 ++ .../templates/components/pinned-button.hbs | 0 .../templates/components/select-box-kit.hbs | 65 +++ .../select-box-kit-collection.hbs | 49 ++ .../select-box-kit/select-box-kit-filter.hbs} | 5 +- .../select-box-kit/select-box-kit-header.hbs | 7 + .../select-box-kit/select-box-kit-row.hbs | 9 + .../components/topic-notifications-button.hbs | 0 app/assets/javascripts/wizard-application.js | 1 + .../templates/components/invite-list.hbs | 2 +- .../components/wizard-field-dropdown.hbs | 1 - app/assets/stylesheets/common.scss | 1 + .../stylesheets/common/admin/admin_base.scss | 10 +- .../stylesheets/common/base/_topic-list.scss | 2 +- .../stylesheets/common/base/combobox.scss | 88 ---- .../base/edit-topic-status-update-modal.scss | 4 + app/assets/stylesheets/common/base/modal.scss | 14 +- .../components/categories-admin-dropdown.scss | 6 - .../components/category-select-box.scss | 41 -- .../components/dropdown-select-box.scss | 103 ---- .../future-date-input-selector.scss | 9 - .../components/notifications-button.scss | 12 - .../categories-admin-dropdown.scss | 12 + .../select-box-kit/category-chooser.scss | 46 ++ .../common/select-box-kit/combo-box.scss | 85 +++ .../select-box-kit/dropdown-select-box.scss | 153 ++++++ .../future-date-input-selector.scss | 22 + .../common/select-box-kit/multi-combobox.scss | 131 +++++ .../select-box-kit/notifications-button.scss | 17 + .../pinned-button.scss | 16 +- .../select-box-kit.scss} | 170 +++--- .../topic-notifications-button.scss | 12 +- app/assets/stylesheets/desktop/compose.scss | 6 +- app/assets/stylesheets/desktop/modal.scss | 6 +- app/assets/stylesheets/desktop/topic.scss | 2 +- app/assets/stylesheets/mobile/compose.scss | 2 +- app/assets/stylesheets/mobile/topic-list.scss | 6 +- app/assets/stylesheets/mobile/topic.scss | 2 +- app/assets/stylesheets/wizard.scss | 9 +- config/locales/client.en.yml | 2 +- plugins/discourse-narrative-bot/public/public | 1 + .../acceptance/admin-suspend-user-test.js.es6 | 6 +- ...st.js.es6 => category-chooser-test.js.es6} | 9 +- .../acceptance/category-edit-test.js.es6 | 4 +- .../acceptance/category-hashtag-test.js.es6 | 2 +- .../acceptance/queued-posts-test.js.es6 | 4 +- .../acceptance/search-full-test.js.es6 | 22 +- .../javascripts/acceptance/search-test.js.es6 | 48 +- .../topic-notifications-button-test.js.es6 | 11 +- test/javascripts/acceptance/topic-test.js.es6 | 6 +- .../categories-admin-dropdown-test.js.es6 | 19 + .../components/category-chooser-test.js.es6 | 139 +++++ .../components/combo-box-test.js.es6 | 153 +++++- .../dropdown-select-box-test.js.es6 | 23 - .../components/multi-combo-box-test.js.es6 | 17 + .../components/pinned-button-test.js.es6 | 4 +- .../components/select-box-test.js.es6 | 189 +++---- .../topic-footer-mobile-dropdown-test.js.es6 | 28 + .../topic-notifications-button-test.js.es6 | 4 +- test/javascripts/helpers/select-box-helper.js | 69 ++- 157 files changed, 3262 insertions(+), 2404 deletions(-) delete mode 100644 app/assets/javascripts/discourse-common/components/combo-box.js.es6 delete mode 100644 app/assets/javascripts/discourse/components/categories-admin-dropdown.js.es6 delete mode 100644 app/assets/javascripts/discourse/components/category-chooser.js.es6 delete mode 100644 app/assets/javascripts/discourse/components/category-notifications-button.js.es6 delete mode 100644 app/assets/javascripts/discourse/components/category-select-box.js.es6 delete mode 100644 app/assets/javascripts/discourse/components/category-select-box/category-select-box-row.js.es6 delete mode 100644 app/assets/javascripts/discourse/components/dropdown-select-box.js.es6 delete mode 100644 app/assets/javascripts/discourse/components/dropdown-select-box/dropdown-header.js.es6 delete mode 100644 app/assets/javascripts/discourse/components/future-date-input-selector.js.es6 delete mode 100644 app/assets/javascripts/discourse/components/notifications-button.js.es6 delete mode 100644 app/assets/javascripts/discourse/components/pinned-options.js.es6 delete mode 100644 app/assets/javascripts/discourse/components/select-box.js.es6 delete mode 100644 app/assets/javascripts/discourse/components/select-box/select-box-collection.js.es6 delete mode 100644 app/assets/javascripts/discourse/components/select-box/select-box-filter.js.es6 delete mode 100644 app/assets/javascripts/discourse/components/select-box/select-box-header.js.es6 delete mode 100644 app/assets/javascripts/discourse/components/select-box/select-box-row.js.es6 delete mode 100644 app/assets/javascripts/discourse/components/tag-notifications-button.js.es6 delete mode 100644 app/assets/javascripts/discourse/components/topic-footer-mobile-dropdown.js.es6 delete mode 100644 app/assets/javascripts/discourse/components/topic-notifications-button.js.es6 delete mode 100644 app/assets/javascripts/discourse/components/topic-notifications-options.js.es6 delete mode 100644 app/assets/javascripts/discourse/templates/components/dropdown-select-box/dropdown-header.hbs delete mode 100644 app/assets/javascripts/discourse/templates/components/select-box.hbs delete mode 100644 app/assets/javascripts/discourse/templates/components/select-box/select-box-collection.hbs delete mode 100644 app/assets/javascripts/discourse/templates/components/select-box/select-box-header.hbs delete mode 100644 app/assets/javascripts/discourse/templates/components/select-box/select-box-row.hbs create mode 100644 app/assets/javascripts/select-box-kit/components/categories-admin-dropdown.js.es6 create mode 100644 app/assets/javascripts/select-box-kit/components/category-chooser.js.es6 create mode 100644 app/assets/javascripts/select-box-kit/components/category-notifications-button.js.es6 create mode 100644 app/assets/javascripts/select-box-kit/components/category-notifications-button/category-notifications-button-header.js.es6 create mode 100644 app/assets/javascripts/select-box-kit/components/combo-box.js.es6 create mode 100644 app/assets/javascripts/select-box-kit/components/combo-box/combo-box-header.js.es6 create mode 100644 app/assets/javascripts/select-box-kit/components/dropdown-select-box.js.es6 create mode 100644 app/assets/javascripts/select-box-kit/components/dropdown-select-box/dropdown-select-box-header.js.es6 create mode 100644 app/assets/javascripts/select-box-kit/components/dropdown-select-box/dropdown-select-box-row.js.es6 create mode 100644 app/assets/javascripts/select-box-kit/components/future-date-input-selector.js.es6 create mode 100644 app/assets/javascripts/select-box-kit/components/future-date-input-selector/future-date-input-selector-header.js.es6 create mode 100644 app/assets/javascripts/select-box-kit/components/future-date-input-selector/future-date-input-selector-row.js.es6 create mode 100644 app/assets/javascripts/select-box-kit/components/future-date-input-selector/mixin.js.es6 create mode 100644 app/assets/javascripts/select-box-kit/components/multi-combo-box.js.es6 create mode 100644 app/assets/javascripts/select-box-kit/components/multi-combo-box/multi-combo-box-header.js.es6 create mode 100644 app/assets/javascripts/select-box-kit/components/notifications-button.js.es6 create mode 100644 app/assets/javascripts/select-box-kit/components/notifications-button/notifications-button-header.js.es6 create mode 100644 app/assets/javascripts/select-box-kit/components/notifications-button/notifications-button-row.js.es6 rename app/assets/javascripts/{discourse => select-box-kit}/components/pinned-button.js.es6 (75%) create mode 100644 app/assets/javascripts/select-box-kit/components/pinned-options.js.es6 create mode 100644 app/assets/javascripts/select-box-kit/components/pinned-options/pinned-options-header.js.es6 create mode 100644 app/assets/javascripts/select-box-kit/components/select-box-kit.js.es6 create mode 100644 app/assets/javascripts/select-box-kit/components/select-box-kit/select-box-kit-collection.js.es6 create mode 100644 app/assets/javascripts/select-box-kit/components/select-box-kit/select-box-kit-create-row.js.es6 create mode 100644 app/assets/javascripts/select-box-kit/components/select-box-kit/select-box-kit-filter.js.es6 create mode 100644 app/assets/javascripts/select-box-kit/components/select-box-kit/select-box-kit-header.js.es6 create mode 100644 app/assets/javascripts/select-box-kit/components/select-box-kit/select-box-kit-none-row.js.es6 create mode 100644 app/assets/javascripts/select-box-kit/components/select-box-kit/select-box-kit-row.js.es6 create mode 100644 app/assets/javascripts/select-box-kit/components/tag-notifications-button.js.es6 create mode 100644 app/assets/javascripts/select-box-kit/components/tag-notifications-button/tag-notifications-button-header.js.es6 create mode 100644 app/assets/javascripts/select-box-kit/components/topic-footer-mobile-dropdown.js.es6 create mode 100644 app/assets/javascripts/select-box-kit/components/topic-notifications-button.js.es6 create mode 100644 app/assets/javascripts/select-box-kit/components/topic-notifications-options.js.es6 create mode 100644 app/assets/javascripts/select-box-kit/mixins/dom-helpers.js.es6 create mode 100644 app/assets/javascripts/select-box-kit/mixins/keyboard.js.es6 create mode 100644 app/assets/javascripts/select-box-kit/mixins/utils.js.es6 create mode 100644 app/assets/javascripts/select-box-kit/templates/components/combo-box/combo-box-header.hbs create mode 100644 app/assets/javascripts/select-box-kit/templates/components/dropdown-select-box/dropdown-select-box-header.hbs create mode 100644 app/assets/javascripts/select-box-kit/templates/components/dropdown-select-box/dropdown-select-box-row.hbs create mode 100644 app/assets/javascripts/select-box-kit/templates/components/future-date-input-selector/future-date-input-selector-header.hbs create mode 100644 app/assets/javascripts/select-box-kit/templates/components/future-date-input-selector/future-date-input-selector-row.hbs create mode 100644 app/assets/javascripts/select-box-kit/templates/components/multi-combo-box/multi-combo-box-header.hbs rename app/assets/javascripts/{discourse => select-box-kit}/templates/components/pinned-button.hbs (100%) create mode 100644 app/assets/javascripts/select-box-kit/templates/components/select-box-kit.hbs create mode 100644 app/assets/javascripts/select-box-kit/templates/components/select-box-kit/select-box-kit-collection.hbs rename app/assets/javascripts/{discourse/templates/components/select-box/select-box-filter.hbs => select-box-kit/templates/components/select-box-kit/select-box-kit-filter.hbs} (71%) create mode 100644 app/assets/javascripts/select-box-kit/templates/components/select-box-kit/select-box-kit-header.hbs create mode 100644 app/assets/javascripts/select-box-kit/templates/components/select-box-kit/select-box-kit-row.hbs rename app/assets/javascripts/{discourse => select-box-kit}/templates/components/topic-notifications-button.hbs (100%) delete mode 100644 app/assets/stylesheets/common/base/combobox.scss delete mode 100644 app/assets/stylesheets/common/components/categories-admin-dropdown.scss delete mode 100644 app/assets/stylesheets/common/components/category-select-box.scss delete mode 100644 app/assets/stylesheets/common/components/dropdown-select-box.scss delete mode 100644 app/assets/stylesheets/common/components/future-date-input-selector.scss delete mode 100644 app/assets/stylesheets/common/components/notifications-button.scss create mode 100644 app/assets/stylesheets/common/select-box-kit/categories-admin-dropdown.scss create mode 100644 app/assets/stylesheets/common/select-box-kit/category-chooser.scss create mode 100644 app/assets/stylesheets/common/select-box-kit/combo-box.scss create mode 100644 app/assets/stylesheets/common/select-box-kit/dropdown-select-box.scss create mode 100644 app/assets/stylesheets/common/select-box-kit/future-date-input-selector.scss create mode 100644 app/assets/stylesheets/common/select-box-kit/multi-combobox.scss create mode 100644 app/assets/stylesheets/common/select-box-kit/notifications-button.scss rename app/assets/stylesheets/common/{components => select-box-kit}/pinned-button.scss (56%) rename app/assets/stylesheets/common/{components/select-box.scss => select-box-kit/select-box-kit.scss} (62%) rename app/assets/stylesheets/common/{components => select-box-kit}/topic-notifications-button.scss (58%) create mode 120000 plugins/discourse-narrative-bot/public/public rename test/javascripts/acceptance/{category-select-box-test.js.es6 => category-chooser-test.js.es6} (60%) create mode 100644 test/javascripts/components/categories-admin-dropdown-test.js.es6 create mode 100644 test/javascripts/components/category-chooser-test.js.es6 delete mode 100644 test/javascripts/components/dropdown-select-box-test.js.es6 create mode 100644 test/javascripts/components/multi-combo-box-test.js.es6 create mode 100644 test/javascripts/components/topic-footer-mobile-dropdown-test.js.es6 diff --git a/.eslintrc b/.eslintrc index 19d38e35c77..71e21b4381a 100644 --- a/.eslintrc +++ b/.eslintrc @@ -46,6 +46,7 @@ "expandSelectBox":true, "collapseSelectBox":true, "selectBoxSelectRow":true, + "selectBoxSelectNoneRow":true, "selectBoxFillInFilter":true, "asyncTestDiscourse":true, "fixture":true, diff --git a/app/assets/javascripts/admin/components/list-setting.js.es6 b/app/assets/javascripts/admin/components/list-setting.js.es6 index da6c5173d60..9a1d865133d 100644 --- a/app/assets/javascripts/admin/components/list-setting.js.es6 +++ b/app/assets/javascripts/admin/components/list-setting.js.es6 @@ -50,5 +50,3 @@ export default Ember.Component.extend({ }); } }); - - diff --git a/app/assets/javascripts/admin/templates/badges-show.hbs b/app/assets/javascripts/admin/templates/badges-show.hbs index e40e6bfec08..c9fe0496c1a 100644 --- a/app/assets/javascripts/admin/templates/badges-show.hbs +++ b/app/assets/javascripts/admin/templates/badges-show.hbs @@ -26,9 +26,7 @@ {{combo-box name="badge_type_id" value=buffered.badge_type_id content=badgeTypes - optionValuePath="content.id" - optionLabelPath="content.name" - disabled=readOnly}} + isDisabled=readOnly}}
@@ -36,8 +34,7 @@ {{combo-box name="badge_grouping_id" value=buffered.badge_grouping_id content=badgeGroupings - optionValuePath="content.id" - optionLabelPath="content.displayName"}} + nameProperty="name"}}  
diff --git a/app/assets/javascripts/admin/templates/components/admin-user-field-item.hbs b/app/assets/javascripts/admin/templates/components/admin-user-field-item.hbs index c5620d84edf..419ef0b69cf 100644 --- a/app/assets/javascripts/admin/templates/components/admin-user-field-item.hbs +++ b/app/assets/javascripts/admin/templates/components/admin-user-field-item.hbs @@ -1,6 +1,6 @@ {{#if editing}} {{#admin-form-row label="admin.user_fields.type"}} - {{combo-box content=fieldTypes valueAttribute="id" value=buffered.field_type}} + {{combo-box content=fieldTypes value=buffered.field_type}} {{/admin-form-row}} {{#admin-form-row label="admin.user_fields.name"}} diff --git a/app/assets/javascripts/admin/templates/components/embeddable-host.hbs b/app/assets/javascripts/admin/templates/components/embeddable-host.hbs index 88317ecd187..e21685831b5 100644 --- a/app/assets/javascripts/admin/templates/components/embeddable-host.hbs +++ b/app/assets/javascripts/admin/templates/components/embeddable-host.hbs @@ -9,7 +9,7 @@ {{input value=buffered.path_whitelist placeholder="/blog/.*" enter="save" class="path-whitelist"}} - {{category-select-box value=categoryId class="small"}} + {{category-chooser value=categoryId class="small"}} {{d-button icon="check" action="save" class="btn-primary" disabled=cantSave}} diff --git a/app/assets/javascripts/admin/templates/customize-themes-show.hbs b/app/assets/javascripts/admin/templates/customize-themes-show.hbs index 6b02429d77d..6f8ac614aaf 100644 --- a/app/assets/javascripts/admin/templates/customize-themes-show.hbs +++ b/app/assets/javascripts/admin/templates/customize-themes-show.hbs @@ -36,8 +36,7 @@

{{i18n "admin.customize.theme.color_scheme"}}

{{i18n "admin.customize.theme.color_scheme_select"}}

-

{{select-box content=colorSchemes - textKey="name" +

{{combo-box content=colorSchemes filterable=true value=colorSchemeId icon="paint-brush"}} @@ -123,11 +122,8 @@ {{/unless}} {{#if selectableChildThemes}} -

{{combo-box content=selectableChildThemes - nameProperty="name" - value=selectedChildThemeId - valueAttribute="id"}} - +

+ {{combo-box content=selectableChildThemes value=selectedChildThemeId}} {{#d-button action="addChildTheme" icon="plus"}}{{i18n "admin.customize.theme.add"}}{{/d-button}}

{{/if}} diff --git a/app/assets/javascripts/admin/templates/groups-bulk.hbs b/app/assets/javascripts/admin/templates/groups-bulk.hbs index baf3a63cda0..337ab37cb3e 100644 --- a/app/assets/javascripts/admin/templates/groups-bulk.hbs +++ b/app/assets/javascripts/admin/templates/groups-bulk.hbs @@ -6,7 +6,7 @@
- {{combo-box content=groups valueAttribute="id" value=groupId none="admin.groups.bulk_select"}} + {{combo-box filterable=true content=groups value=groupId none="admin.groups.bulk_select"}}
diff --git a/app/assets/javascripts/admin/templates/logs/staff-action-logs.hbs b/app/assets/javascripts/admin/templates/logs/staff-action-logs.hbs index 50f02f9f5b1..c44edc1a3e2 100644 --- a/app/assets/javascripts/admin/templates/logs/staff-action-logs.hbs +++ b/app/assets/javascripts/admin/templates/logs/staff-action-logs.hbs @@ -30,7 +30,7 @@ {{/if}}
{{else}} - {{i18n "admin.logs.staff_actions.filter"}} {{combo-box content=userHistoryActions nameProperty="name" value=filterActionId none="admin.logs.staff_actions.all"}} + {{i18n "admin.logs.staff_actions.filter"}} {{combo-box content=userHistoryActions value=filterActionId none="admin.logs.staff_actions.all"}} {{/if}}
diff --git a/app/assets/javascripts/admin/templates/modal/admin-color-scheme-select-base.hbs b/app/assets/javascripts/admin/templates/modal/admin-color-scheme-select-base.hbs index d58a63c1342..13169426341 100644 --- a/app/assets/javascripts/admin/templates/modal/admin-color-scheme-select-base.hbs +++ b/app/assets/javascripts/admin/templates/modal/admin-color-scheme-select-base.hbs @@ -2,7 +2,6 @@ {{#d-modal-body title="admin.customize.colors.select_base.title"}} {{i18n "admin.customize.colors.select_base.description"}} {{combo-box content=model - nameProperty="name" value=selectedBaseThemeId valueAttribute="base_scheme_id"}} {{/d-modal-body}} diff --git a/app/assets/javascripts/admin/templates/reports.hbs b/app/assets/javascripts/admin/templates/reports.hbs index 57acba8f502..3927d1e384f 100644 --- a/app/assets/javascripts/admin/templates/reports.hbs +++ b/app/assets/javascripts/admin/templates/reports.hbs @@ -4,10 +4,10 @@ {{i18n 'admin.dashboard.reports.start_date'}} {{date-picker-past value=startDate defaultDate=startDate}} {{i18n 'admin.dashboard.reports.end_date'}} {{date-picker-past value=endDate defaultDate=endDate}} {{#if showCategoryOptions}} - {{combo-box valueAttribute="value" content=categoryOptions value=categoryId}} + {{combo-box filterable=true valueAttribute="value" content=categoryOptions value=categoryId}} {{/if}} {{#if showGroupOptions}} - {{combo-box valueAttribute="value" content=groupOptions value=groupId}} + {{combo-box filterable=true valueAttribute="value" content=groupOptions value=groupId}} {{/if}} {{d-button action="refreshReport" class="btn-primary" label="admin.dashboard.reports.refresh_report" icon="refresh"}} {{d-button action="exportCsv" label="admin.export_csv.button_text" icon="download"}} diff --git a/app/assets/javascripts/admin/templates/user-badges.hbs b/app/assets/javascripts/admin/templates/user-badges.hbs index 9977aca39d2..1f6bae617c9 100644 --- a/app/assets/javascripts/admin/templates/user-badges.hbs +++ b/app/assets/javascripts/admin/templates/user-badges.hbs @@ -16,7 +16,7 @@
- {{combo-box valueAttribute="id" value=selectedBadgeId content=grantableBadges nameProperty="name"}} + {{combo-box filterable=true value=selectedBadgeId content=grantableBadges}}