A platform for community discussion. Free, open, simple.
DEV: remove trivial `{{action}}` usages (#24278)
Godfrey Chan82506096b79a
diff --git a/app/assets/javascripts/admin/addon/components/admin-penalty-post-action.hbs b/app/assets/javascripts/admin/addon/components/admin-penalty-post-action.hbsindex 70e8a9229b8..4c7832d73f0 100644--- a/app/assets/javascripts/admin/addon/components/admin-penalty-post-action.hbs+++ b/app/assets/javascripts/admin/addon/components/admin-penalty-post-action.hbs@@ -7,7 +7,7 @@<ComboBox@value={{this.postAction}}@content={{this.penaltyActions}}- @onChange={{action "penaltyChanged"}}+ @onChange={{this.penaltyChanged}}/></div>diff --git a/app/assets/javascripts/admin/addon/components/admin-report.hbs b/app/assets/javascripts/admin/addon/components/admin-report.hbsindex 7c0171dc81c..65aea850595 100644--- a/app/assets/javascripts/admin/addon/components/admin-report.hbs+++ b/app/assets/javascripts/admin/addon/components/admin-report.hbs@@ -182,7 +182,7 @@<DateTimeInputRange@from={{this.startDate}}@to={{this.endDate}}- @onChange={{action "onChangeDateRange"}}+ @onChange={{this.onChangeDateRange}}@showFromTime={{false}}@showToTime={{false}}/>@@ -205,7 +205,7 @@(concat "report-filters/" filter.type)model=this.modelfilter=filter- applyFilter=(action "applyFilter")+ applyFilter=this.applyFilter}}</div></div>diff --git a/app/assets/javascripts/admin/addon/components/admin-watched-word.hbs b/app/assets/javascripts/admin/addon/components/admin-watched-word.hbsindex 4c009a1fad2..4323174a114 100644--- a/app/assets/javascripts/admin/addon/components/admin-watched-word.hbs+++ b/app/assets/javascripts/admin/addon/components/admin-watched-word.hbs@@ -1,6 +1,6 @@<spanrole="button"- onclick={{action "deleteWord"}}+ onclick={{this.deleteWord}}class="delete-word-record">{{d-icon "times"}}</span>{{this.word.word}}diff --git a/app/assets/javascripts/admin/addon/components/emoji-value-list.hbs b/app/assets/javascripts/admin/addon/components/emoji-value-list.hbsindex e3baec1187b..56c883807fc 100644--- a/app/assets/javascripts/admin/addon/components/emoji-value-list.hbs+++ b/app/assets/javascripts/admin/addon/components/emoji-value-list.hbs@@ -54,8 +54,8 @@<EmojiPicker@isActive={{this.emojiPickerIsActive}}@isEditorFocused={{this.isEditorFocused}}- @emojiSelected={{action "emojiSelected"}}- @onEmojiPickerClose={{action "closeEmojiPicker"}}+ @emojiSelected={{this.emojiSelected}}+ @onEmojiPickerClose={{this.closeEmojiPicker}}/><SettingValidationMessage @message={{this.validationMessage}} />\ No newline at end of filediff --git a/app/assets/javascripts/admin/addon/components/report-filters/bool.hbs b/app/assets/javascripts/admin/addon/components/report-filters/bool.hbsindex 8b253f9cc29..fc23b6333ae 100644--- a/app/assets/javascripts/admin/addon/components/report-filters/bool.hbs+++ b/app/assets/javascripts/admin/addon/components/report-filters/bool.hbs@@ -1,5 +1,5 @@<Input@type="checkbox"@checked={{this.checked}}- {{on "click" (action "onChange")}}+ {{on "click" this.onChange}}/>\ No newline at end of filediff --git a/app/assets/javascripts/admin/addon/components/report-filters/category.hbs b/app/assets/javascripts/admin/addon/components/report-filters/category.hbsindex c76e0d10201..68fae14fc11 100644--- a/app/assets/javascripts/admin/addon/components/report-filters/category.hbs+++ b/app/assets/javascripts/admin/addon/components/report-filters/category.hbs@@ -1,5 +1,5 @@<SearchAdvancedCategoryChooser@value={{this.category}}- @onChange={{action "onChange"}}+ @onChange={{this.onChange}}@options={{hash filterable=true}}/>\ No newline at end of filediff --git a/app/assets/javascripts/admin/addon/components/secret-value-list.hbs b/app/assets/javascripts/admin/addon/components/secret-value-list.hbsindex a96f12bcb98..cd0891b2a66 100644--- a/app/assets/javascripts/admin/addon/components/secret-value-list.hbs+++ b/app/assets/javascripts/admin/addon/components/secret-value-list.hbs@@ -10,13 +10,13 @@<Input@value={{value.key}}class="value-input"- {{on "focusout" (fn (action "changeKey") index)}}+ {{on "focusout" (fn this.changeKey index)}}/><Input@value={{value.secret}}class="value-input"@type={{if this.isSecret "password" "text"}}- {{on "focusout" (fn (action "changeSecret") index)}}+ {{on "focusout" (fn this.changeSecret index)}}/></div>{{/each}}diff --git a/app/assets/javascripts/admin/addon/components/site-settings/category-list.hbs b/app/assets/javascripts/admin/addon/components/site-settings/category-list.hbsindex 5d0a7a88e4a..473a7549897 100644--- a/app/assets/javascripts/admin/addon/components/site-settings/category-list.hbs+++ b/app/assets/javascripts/admin/addon/components/site-settings/category-list.hbs@@ -1,6 +1,6 @@<CategorySelector@categories={{this.selectedCategories}}- @onChange={{action "onChangeSelectedCategories"}}+ @onChange={{this.onChangeSelectedCategories}}/><div class="desc">{{html-safe this.setting.description}}</div>diff --git a/app/assets/javascripts/admin/addon/components/site-settings/color.hbs b/app/assets/javascripts/admin/addon/components/site-settings/color.hbsindex 24e49c2e370..2eba1ac01bc 100644--- a/app/assets/javascripts/admin/addon/components/site-settings/color.hbs+++ b/app/assets/javascripts/admin/addon/components/site-settings/color.hbs@@ -3,7 +3,7 @@@valid={{this.valid}}@onlyHex={{false}}@styleSelection={{false}}- @onChangeColor={{action "onChangeColor"}}+ @onChangeColor={{this.onChangeColor}}/><SettingValidationMessage @message={{this.validationMessage}} /><div class="desc">{{html-safe this.setting.description}}</div>\ No newline at end of filediff --git a/app/assets/javascripts/admin/addon/components/site-settings/compact-list.hbs b/app/assets/javascripts/admin/addon/components/site-settings/compact-list.hbsindex 396c1eeea72..97717cabbf4 100644--- a/app/assets/javascripts/admin/addon/components/site-settings/compact-list.hbs+++ b/app/assets/javascripts/admin/addon/components/site-settings/compact-list.hbs@@ -2,8 +2,8 @@@value={{this.settingValue}}@settingName={{this.setting.setting}}@choices={{this.settingChoices}}- @onChange={{action "onChangeListSetting"}}- @onChangeChoices={{action "onChangeChoices"}}+ @onChange={{this.onChangeListSetting}}+ @onChangeChoices={{this.onChangeChoices}}@options={{hash allowAny=this.allowAny}}/>diff --git a/app/assets/javascripts/admin/addon/components/site-settings/group-list.hbs b/app/assets/javascripts/admin/addon/components/site-settings/group-list.hbsindex 5644b109c01..e58a8bcd535 100644--- a/app/assets/javascripts/admin/addon/components/site-settings/group-list.hbs+++ b/app/assets/javascripts/admin/addon/components/site-settings/group-list.hbs@@ -4,7 +4,7 @@@settingName="name"@nameProperty={{this.nameProperty}}@valueProperty={{this.valueProperty}}- @onChange={{action "onChangeGroupListSetting"}}+ @onChange={{this.onChangeGroupListSetting}}/><SettingValidationMessage @message={{this.validationMessage}} /><div class="desc">{{html-safe this.setting.description}}</div>\ No newline at end of filediff --git a/app/assets/javascripts/admin/addon/components/site-settings/host-list.hbs b/app/assets/javascripts/admin/addon/components/site-settings/host-list.hbsindex bc6ea4a1929..a301ec6c5dd 100644--- a/app/assets/javascripts/admin/addon/components/site-settings/host-list.hbs+++ b/app/assets/javascripts/admin/addon/components/site-settings/host-list.hbs@@ -2,7 +2,7 @@@value={{this.settingValue}}@settingName={{this.setting.setting}}@choices={{this.settingValue}}- @onChange={{action "onChange"}}+ @onChange={{this.onChange}}@options={{hash allowAny=this.allowAny}}/>diff --git a/app/assets/javascripts/admin/addon/components/site-settings/named-list.hbs b/app/assets/javascripts/admin/addon/components/site-settings/named-list.hbsindex 9f3c78fd287..178627c93bc 100644--- a/app/assets/javascripts/admin/addon/components/site-settings/named-list.hbs+++ b/app/assets/javascripts/admin/addon/components/site-settings/named-list.hbs@@ -4,7 +4,7 @@@choices={{this.settingChoices}}@nameProperty="name"@valueProperty="value"- @onChange={{action "onChangeListSetting"}}+ @onChange={{this.onChangeListSetting}}@options={{hash allowAny=this.allowAny}}/>diff --git a/app/assets/javascripts/admin/addon/components/site-settings/simple-list.hbs b/app/assets/javascripts/admin/addon/components/site-settings/simple-list.hbsindex b2253fc3507..c53c129a9ac 100644--- a/app/assets/javascripts/admin/addon/components/site-settings/simple-list.hbs+++ b/app/assets/javascripts/admin/addon/components/site-settings/simple-list.hbs@@ -1,7 +1,7 @@<SimpleList@values={{this.value}}@inputDelimiter={{this.inputDelimiter}}- @onChange={{action "onChange"}}+ @onChange={{this.onChange}}@choices={{this.setting.choices}}@allowAny={{this.setting.allow_any}}/>diff --git a/app/assets/javascripts/admin/addon/components/site-settings/tag-group-list.hbs b/app/assets/javascripts/admin/addon/components/site-settings/tag-group-list.hbsindex 475a9fcf365..a2b4c3efcd1 100644--- a/app/assets/javascripts/admin/addon/components/site-settings/tag-group-list.hbs+++ b/app/assets/javascripts/admin/addon/components/site-settings/tag-group-list.hbs@@ -1,6 +1,6 @@<TagGroupChooser@tagGroups={{this.selectedTagGroups}}- @onChange={{action "onTagGroupChange"}}+ @onChange={{this.onTagGroupChange}}@options={{hash filterPlaceholder="category.required_tag_group.placeholder"}}/><div class="desc">{{html-safe this.setting.description}}</div>diff --git a/app/assets/javascripts/admin/addon/components/site-settings/tag-list.hbs b/app/assets/javascripts/admin/addon/components/site-settings/tag-list.hbsindex 911a6b09f85..34a9b362c17 100644--- a/app/assets/javascripts/admin/addon/components/site-settings/tag-list.hbs+++ b/app/assets/javascripts/admin/addon/components/site-settings/tag-list.hbs@@ -1,6 +1,6 @@<TagChooser@tags={{this.selectedTags}}- @onChange={{action "changeSelectedTags"}}+ @onChange={{this.changeSelectedTags}}@everyTag={{true}}@unlimitedTagCount={{true}}@options={{hash allowAny=false}}diff --git a/app/assets/javascripts/admin/addon/components/value-list.hbs b/app/assets/javascripts/admin/addon/components/value-list.hbsindex ebca3e2bdd5..8141649028e 100644--- a/app/assets/javascripts/admin/addon/components/value-list.hbs+++ b/app/assets/javascripts/admin/addon/components/value-list.hbs@@ -12,7 +12,7 @@title={{value}}@value={{value}}class="value-input"- {{on "focusout" (fn (action "changeValue") index)}}+ {{on "focusout" (fn this.changeValue index)}}/>{{#if this.showUpDownButtons}}@@ -37,6 +37,6 @@@nameProperty={{null}}@value={{this.newValue}}@content={{this.filteredChoices}}- @onChange={{action "selectChoice"}}+ @onChange={{this.selectChoice}}@options={{hash allowAny=true none=this.noneKey}}/>\ No newline at end of filediff --git a/app/assets/javascripts/admin/addon/components/watched-word-form.hbs b/app/assets/javascripts/admin/addon/components/watched-word-form.hbsindex ab3df1c8809..69ba35fb35a 100644--- a/app/assets/javascripts/admin/addon/components/watched-word-form.hbs+++ b/app/assets/javascripts/admin/addon/components/watched-word-form.hbs@@ -38,7 +38,7 @@@id="watched-tag"@class="watched-word-input-field"@tags={{this.selectedTags}}- @onChange={{action "changeSelectedTags"}}+ @onChange={{this.changeSelectedTags}}@everyTag={{true}}@options={{hash allowAny=true disabled=this.formSubmitted}}/>diff --git a/app/assets/javascripts/discourse/app/components/composer-messages.hbs b/app/assets/javascripts/discourse/app/components/composer-messages.hbsindex 202cbfc62e7..8a3b2880e79 100644--- a/app/assets/javascripts/discourse/app/components/composer-messages.hbs+++ b/app/assets/javascripts/discourse/app/components/composer-messages.hbs@@ -1,9 +1,9 @@{{#each this.messages as |message|}}<ComposerMessage@message={{message}}- @closeMessage={{action "closeMessage"}}+ @closeMessage={{this.closeMessage}}@shareModal={{fn (mut this.showShareModal) true}}- @switchPM={{action "switchPM"}}+ @switchPM={{this.switchPM}}/>{{#if this.showShareModal}}<Modal::ShareTopicdiff --git a/app/assets/javascripts/discourse/app/components/sidebar/section.hbs b/app/assets/javascripts/discourse/app/components/sidebar/section.hbsindex af578be224f..220a990f6b2 100644--- a/app/assets/javascripts/discourse/app/components/sidebar/section.hbs+++ b/app/assets/javascripts/discourse/app/components/sidebar/section.hbs@@ -55,7 +55,7 @@placementStrategy="absolute"}}@content={{@headerActions}}- @onChange={{action "handleMultipleHeaderActions"}}+ @onChange={{this.handleMultipleHeaderActions}}@class="sidebar-section-header-dropdown"/>{{/if}}diff --git a/app/assets/javascripts/discourse/app/components/user-status-picker.hbs b/app/assets/javascripts/discourse/app/components/user-status-picker.hbsindex 9c8a5ecc264..1cbea2c9cfe 100644--- a/app/assets/javascripts/discourse/app/components/user-status-picker.hbs+++ b/app/assets/javascripts/discourse/app/components/user-status-picker.hbs@@ -6,7 +6,7 @@<buttontype="button"class="btn-emoji btn-flat"- onclick={{action "toggleEmojiPicker"}}+ onclick={{this.toggleEmojiPicker}}{{on "focus" this.focus}}{{on "blur" this.blur}}>@@ -29,7 +29,7 @@</div><EmojiPicker@isActive={{this.emojiPickerIsActive}}- @emojiSelected={{action "emojiSelected"}}- @onEmojiPickerClose={{action "onEmojiPickerOutsideClick"}}+ @emojiSelected={{this.emojiSelected}}+ @onEmojiPickerClose={{this.onEmojiPickerOutsideClick}}@placement="bottom"/>\ No newline at end of file