From f9648de8972dea4661e75b3f25bfeb1535e9c6c4 Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Thu, 10 Jan 2019 11:06:01 +0100 Subject: [PATCH] DEV: upgrades from Ember 2.13 to Ember 3.5.1 (#6808) Co-Authored-By: Bianca Nenciu Co-Authored-By: David Taylor --- Gemfile | 4 +- Gemfile.lock | 13 +- .../components/admin-user-field-item.js.es6 | 14 +- .../components/admin-watched-word.js.es6 | 2 +- .../admin/components/embeddable-host.js.es6 | 4 +- .../components/inline-edit-checkbox.js.es6 | 12 +- .../admin/components/permalink-form.js.es6 | 2 +- .../admin/components/resumable-upload.js.es6 | 8 +- .../admin/components/save-controls.js.es6 | 6 - .../screened-ip-address-form.js.es6 | 7 +- .../admin/components/site-text-summary.js.es6 | 6 - .../admin/components/tags-uploader.js.es6 | 4 +- .../admin/components/watched-word-form.js.es6 | 2 +- .../components/watched-word-uploader.js.es6 | 2 +- .../admin-customize-themes-show.js.es6 | 2 +- .../controllers/admin-web-hooks-show.js.es6 | 18 +- .../javascripts/admin/models/theme.js.es6 | 6 +- .../admin/models/watched-word.js.es6 | 2 +- .../javascripts/admin/templates/api-keys.hbs | 4 +- .../admin/templates/backups-index.hbs | 18 +- .../javascripts/admin/templates/backups.hbs | 6 +- .../components/admin-report-table.hbs | 2 +- .../templates/components/admin-report.hbs | 6 +- .../components/admin-user-field-item.hbs | 13 +- .../components/admin-web-hook-event.hbs | 8 +- .../templates/components/embeddable-host.hbs | 16 +- .../templates/components/flagged-post.hbs | 6 +- .../components/inline-edit-checkbox.hbs | 4 +- .../templates/components/permalink-form.hbs | 2 +- .../templates/components/save-controls.hbs | 2 +- .../components/screened-ip-address-form.hbs | 2 +- .../components/secret-value-list.hbs | 4 +- .../templates/components/site-setting.hbs | 8 +- .../site-settings/uploaded-image-list.hbs | 2 +- .../components/site-text-summary.hbs | 2 +- .../templates/components/tags-uploader.hbs | 12 +- .../admin/templates/components/value-list.hbs | 2 +- .../components/watched-word-form.hbs | 2 +- .../customize-email-templates-edit.hbs | 4 +- .../admin/templates/customize-themes-edit.hbs | 2 +- .../admin/templates/customize-themes-show.hbs | 30 +- .../admin/templates/customize-themes.hbs | 4 +- .../admin/templates/dashboard-problems.hbs | 2 +- .../templates/dashboard_next_general.hbs | 2 +- .../templates/dashboard_next_moderation.hbs | 2 +- .../admin/templates/email-bounced.hbs | 2 +- .../admin/templates/email-received.hbs | 2 +- .../admin/templates/email-rejected.hbs | 2 +- .../admin/templates/email-sent.hbs | 2 +- .../admin/templates/email-skipped.hbs | 2 +- .../javascripts/admin/templates/embedding.hbs | 6 +- .../javascripts/admin/templates/emojis.hbs | 2 +- .../admin/templates/logs/screened-emails.hbs | 2 +- .../templates/logs/screened-ip-addresses.hbs | 16 +- .../templates/logs/staff-action-logs.hbs | 2 +- .../templates/modal/admin-add-upload.hbs | 4 +- .../templates/modal/admin-create-theme.hbs | 4 +- .../modal/admin-edit-badge-groupings.hbs | 2 +- .../templates/modal/admin-import-theme.hbs | 4 +- .../modal/admin-moderation-history.hbs | 2 +- .../templates/modal/admin-silence-user.hbs | 4 +- .../modal/admin-staff-action-log-details.hbs | 2 +- .../templates/modal/admin-suspend-user.hbs | 4 +- .../templates/modal/admin-theme-change.hbs | 2 +- .../modal/admin-uploaded-image-list.hbs | 2 +- .../admin/templates/permalinks.hbs | 4 +- .../admin/templates/plugins-index.hbs | 2 +- .../javascripts/admin/templates/plugins.hbs | 6 +- .../admin/templates/site-settings.hbs | 4 +- .../admin/templates/site-text-edit.hbs | 4 +- .../admin/templates/site-text-index.hbs | 6 +- .../admin/templates/user-fields.hbs | 8 +- .../admin/templates/user-index.hbs | 64 +-- .../admin/templates/users-list.hbs | 4 +- .../admin/templates/watched-words-action.hbs | 6 +- .../admin/templates/watched-words.hbs | 4 +- .../admin/templates/web-hooks-show-events.hbs | 4 +- .../admin/templates/web-hooks-show.hbs | 5 +- .../javascripts/admin/templates/web-hooks.hbs | 4 +- .../lib/raw-handlebars.js.es6 | 4 - .../components/auth-token-dropdown.es6 | 4 +- .../components/avatar-uploader.js.es6 | 2 +- .../components/backup-uploader.js.es6 | 2 +- .../components/basic-topic-list.js.es6 | 6 - .../components/bulk-select-button.js.es6 | 6 +- .../components/color-picker-choice.js.es6 | 2 +- .../discourse/components/composer-body.js.es6 | 4 +- .../components/composer-editor.js.es6 | 36 +- .../components/composer-message.js.es6 | 2 +- .../components/composer-messages.js.es6 | 7 +- .../components/create-account.js.es6 | 2 +- .../discourse/components/d-button.js.es6 | 7 +- .../discourse/components/d-checkbox.js.es6 | 2 +- .../components/d-editor-modal.js.es6 | 2 +- .../discourse/components/d-editor.js.es6 | 70 +-- .../desktop-notification-config.js.es6 | 6 +- .../components/discourse-linked-text.js.es6 | 2 +- .../components/edit-category-images.js.es6 | 47 +- .../components/edit-topic-timer-form.js.es6 | 4 +- .../discourse/components/emoji-picker.js.es6 | 2 +- .../components/emoji-uploader.js.es6 | 2 +- .../components/flag-action-type.js.es6 | 2 +- .../components/group-card-contents.js.es6 | 15 +- .../group-manage-logs-filter.js.es6 | 2 +- .../components/group-member-dropdown.js.es6 | 6 +- .../discourse/components/group-member.js.es6 | 2 +- .../components/group-membership-button.js.es6 | 2 +- .../components/image-uploader.js.es6 | 14 +- .../components/images-uploader.js.es6 | 2 +- .../discourse/components/load-more.js.es6 | 5 +- .../discourse/components/login-buttons.js.es6 | 6 +- .../components/preference-checkbox.js.es6 | 2 +- .../discourse/components/queued-post.js.es6 | 2 +- .../components/scrolling-post-stream.js.es6 | 8 +- .../discourse/components/share-popup.js.es6 | 2 +- .../discourse/components/share-source.js.es6 | 2 +- .../discourse/components/signup-cta.js.es6 | 3 - .../components/tags-admin-dropdown.js.es6 | 24 +- .../components/top-period-buttons.js.es6 | 2 +- .../components/topic-list-item.js.es6 | 3 +- .../discourse/components/topic-list.js.es6 | 4 +- .../components/user-card-contents.js.es6 | 11 +- .../discourse/components/user-selector.js.es6 | 2 +- .../discourse/controllers/composer.js.es6 | 38 +- .../controllers/create-account.js.es6 | 9 +- .../controllers/discovery/topics.js.es6 | 2 +- .../controllers/edit-topic-timer.js.es6 | 2 +- .../discourse/controllers/group.js.es6 | 3 +- .../discourse/controllers/login.js.es6 | 26 +- .../controllers/preferences/account.js.es6 | 4 + .../controllers/preferences/email.js.es6 | 31 +- .../preferences/second-factor-backup.js.es6 | 6 +- .../preferences/second-factor.js.es6 | 11 +- .../controllers/preferences/username.js.es6 | 4 +- .../controllers/reorder-categories.js.es6 | 2 +- .../discourse/controllers/tags-index.js.es6 | 9 + .../discourse/controllers/topic.js.es6 | 54 +- .../initializers/enable-emoji.js.es6 | 2 +- .../discourse/initializers/message-bus.js.es6 | 2 +- .../register-service-worker.js.es6 | 3 +- .../discourse/lib/ajax-error.js.es6 | 9 +- .../discourse/lib/keyboard-shortcuts.js.es6 | 7 +- .../lib/posts-with-placeholders.js.es6 | 6 +- .../discourse/lib/push-notifications.js.es6 | 15 +- .../javascripts/discourse/lib/text.js.es6 | 7 +- .../mixins/grant-badge-controller.js.es6 | 4 +- .../discourse/mixins/key-enter-escape.js.es6 | 4 +- .../mixins/password-validation.js.es6 | 2 +- .../discourse/mixins/url-refresh.js.es6 | 10 +- .../discourse/models/post-stream.js.es6 | 4 +- .../javascripts/discourse/models/post.js.es6 | 17 +- .../discourse/models/user-stream.js.es6 | 2 +- .../javascripts/discourse/models/user.js.es6 | 5 +- .../inject-discourse-objects.js.es6 | 6 +- .../pre-initializers/map-routes.js.es6 | 1 + .../register-dom-templates.js.es6 | 1 - .../sniff-capabilities.js.es6 | 10 +- .../discourse/routes/discourse.js.es6 | 4 +- .../discourse/routes/discovery.js.es6 | 3 +- .../javascripts/discourse/routes/topic.js.es6 | 16 +- .../discourse/routes/user-summary.js.es6 | 2 +- .../templates/account-created/edit-email.hbs | 2 +- .../discourse/templates/badges/show.hbs | 10 +- .../templates/components/backup-codes.hbs | 2 +- .../templates/components/basic-topic-list.hbs | 4 +- .../components/bulk-select-button.hbs | 2 +- .../templates/components/color-picker.hbs | 2 +- .../components/composer-action-title.hbs | 2 + .../templates/components/composer-editor.hbs | 12 +- .../components/composer-messages.hbs | 2 +- .../components/composer-user-selector.hbs | 2 +- .../templates/components/d-editor-modal.hbs | 4 +- .../templates/components/d-editor.hbs | 2 +- .../templates/components/d-modal.hbs | 4 +- .../desktop-notification-config.hbs | 6 +- .../components/edit-category-general.hbs | 2 +- .../components/edit-category-images.hbs | 16 +- .../components/group-card-contents.hbs | 10 +- .../components/group-manage-logs-filter.hbs | 2 +- .../components/group-manage-logs-row.hbs | 8 +- .../components/group-manage-save-button.hbs | 2 +- .../components/group-members-input.hbs | 4 +- .../components/group-membership-button.hbs | 6 +- .../templates/components/login-buttons.hbs | 4 +- .../components/modal-footer-close.hbs | 2 +- .../templates/components/queued-post.hbs | 12 +- .../components/second-factor-form.hbs | 2 +- .../templates/components/share-popup.hbs | 2 +- .../templates/components/signup-cta.hbs | 4 +- .../components/top-period-buttons.hbs | 2 +- .../templates/components/topic-entrance.hbs | 4 +- .../templates/components/topic-progress.hbs | 2 +- .../components/user-card-contents.hbs | 9 +- .../discourse/templates/composer.hbs | 29 +- .../templates/discovery/categories.hbs | 2 +- .../discourse/templates/discovery/topics.hbs | 12 +- .../discourse/templates/full-page-search.hbs | 16 +- .../templates/group-activity-posts.hbs | 2 +- .../templates/group-activity-topics.hbs | 2 +- .../discourse/templates/group-index.hbs | 12 +- .../javascripts/discourse/templates/group.hbs | 6 +- .../discourse/templates/group/manage/logs.hbs | 10 +- .../discourse/templates/groups/index.hbs | 6 +- .../discourse/templates/groups/new.hbs | 2 +- .../discourse/templates/login-preferences.hbs | 4 +- .../mobile/components/basic-topic-list.hbs | 2 +- .../templates/mobile/discovery/categories.hbs | 4 +- .../templates/mobile/discovery/topics.hbs | 6 +- .../templates/mobile/group-index.hbs | 14 +- .../templates/mobile/modal/login.hbs | 24 +- .../discourse/templates/mobile/users.hbs | 2 +- .../templates/modal/activation-edit.hbs | 4 +- .../templates/modal/activation-resent.hbs | 2 +- .../discourse/templates/modal/auth-token.hbs | 4 +- .../templates/modal/avatar-selector.hbs | 8 +- .../templates/modal/bulk-change-category.hbs | 2 +- .../templates/modal/create-account.hbs | 19 +- .../modal/delete-topic-disallowed.hbs | 2 +- .../templates/modal/edit-category.hbs | 6 +- .../templates/modal/edit-topic-timer.hbs | 13 +- .../templates/modal/feature-topic.hbs | 12 +- .../discourse/templates/modal/flag.hbs | 4 +- .../templates/modal/forgot-password.hbs | 6 +- .../templates/modal/group-add-members.hbs | 2 +- .../templates/modal/group-bulk-add.hbs | 2 +- .../discourse/templates/modal/history.hbs | 24 +- .../discourse/templates/modal/invite.hbs | 8 +- .../templates/modal/jump-to-post.hbs | 6 +- .../discourse/templates/modal/login.hbs | 8 +- .../discourse/templates/modal/merge-topic.hbs | 0 .../templates/modal/post-enqueued.hbs | 2 +- .../discourse/templates/modal/raw-email.hbs | 6 +- .../discourse/templates/modal/rename-tag.hbs | 2 +- .../templates/modal/reorder-categories.hbs | 10 +- .../modal/request-group-membership-form.hbs | 4 +- .../discourse/templates/modal/split-topic.hbs | 0 .../discourse/templates/modal/tag-upload.hbs | 2 +- .../templates/modal/upload-selector.hbs | 4 +- .../discourse/templates/password-reset.hbs | 4 +- .../discourse/templates/preferences-about.hbs | 2 +- .../discourse/templates/preferences-email.hbs | 4 +- .../preferences-second-factor-backup.hbs | 4 +- .../templates/preferences-second-factor.hbs | 8 +- .../templates/preferences/account.hbs | 12 +- .../discourse/templates/preferences/apps.hbs | 6 +- .../discourse/templates/queued-posts.hbs | 2 +- .../discourse/templates/selected-posts.hbs | 6 +- .../discourse/templates/static.hbs | 6 +- .../discourse/templates/tag-groups-show.hbs | 6 +- .../discourse/templates/tags/index.hbs | 2 +- .../discourse/templates/tags/show.hbs | 14 +- .../javascripts/discourse/templates/topic.hbs | 50 +- .../discourse/templates/user-card.hbs | 15 +- .../discourse/templates/user-invited-show.hbs | 12 +- .../discourse/templates/user-topics-list.hbs | 4 +- .../javascripts/discourse/templates/user.hbs | 10 +- .../discourse/templates/user/activity.hbs | 2 +- .../discourse/templates/user/messages.hbs | 4 +- .../templates/user/notifications.hbs | 2 +- .../user/preferences/_save-button.hbs | 2 +- .../javascripts/discourse/templates/users.hbs | 2 +- .../widgets/component-connector.js.es6 | 6 + .../javascripts/discourse/widgets/glue.js.es6 | 10 + .../discourse/widgets/widget.js.es6 | 4 +- .../javascripts/ember-addons/fmt.js.es6 | 9 +- app/assets/javascripts/ember_jquery.js | 1 + app/assets/javascripts/env.js | 3 +- app/assets/javascripts/polyfills.js | 1 - .../components/composer-actions.js.es6 | 36 +- .../multi-select/selected-name.js.es6 | 2 +- .../components/notifications-button.js.es6 | 18 +- .../components/period-chooser.js.es6 | 4 +- .../select-kit/components/select-kit.js.es6 | 6 +- .../select-kit/select-kit-header.js.es6 | 2 +- .../select-kit/select-kit-row.js.es6 | 4 +- .../tag-notifications-button.js.es6 | 2 +- .../topic-footer-mobile-dropdown.js.es6 | 78 +-- .../javascripts/set-prototype-polyfill.js | 8 + app/assets/javascripts/vendor.js | 1 - .../wizard/components/invite-list-user.js.es6 | 6 - .../wizard/components/radio-button.js.es6 | 2 +- .../wizard/components/theme-preview.js.es6 | 2 +- .../wizard/components/wizard-step.js.es6 | 5 +- .../templates/components/invite-list-user.hbs | 2 +- .../templates/components/invite-list.hbs | 2 +- .../templates/components/theme-previews.hbs | 4 +- .../components/wizard-field-radio.hbs | 2 +- .../javascripts/wizard/templates/step.hbs | 2 +- app/models/theme_field.rb | 7 + ...3317_force_theme_compilation_for_ember3.rb | 6 + lib/backup_restore/restorer.rb | 5 +- package.json | 2 +- .../discourse-local-dates-create-form.hbs | 2 +- .../composer-presence-display.js.es6 | 2 - .../templates/modal/poll-ui-builder.hbs | 2 +- .../initializers/add-poll-ui-builder.js.es6 | 2 +- .../create-account-user-fields-test.js.es6 | 16 +- .../acceptance/jump-to-test.js.es6 | 3 +- .../acceptance/preferences-test.js.es6 | 9 +- .../acceptance/sign-in-test.js.es6 | 6 +- .../acceptance/topic-edit-timer-test.js.es6 | 7 + test/javascripts/acceptance/topic-test.js.es6 | 7 + test/javascripts/acceptance/user-test.js.es6 | 1 + .../components/d-editor-test.js.es6 | 2 +- .../components/keyboard-shortcuts-test.js.es6 | 14 +- .../topic-notifications-options-test.js.es6 | 3 +- .../controllers/create-account-test.js.es6 | 40 +- test/javascripts/fixtures/topic.js.es6 | 2 +- .../helpers/create-pretender.js.es6 | 4 + .../widgets/actions-summary-test.js.es6 | 2 +- test/javascripts/widgets/header-test.js.es6 | 6 +- test/javascripts/widgets/post-test.js.es6 | 71 ++- .../javascripts/widgets/user-menu-test.js.es6 | 6 +- vendor/assets/javascripts/buffered-proxy.js | 7 +- vendor/assets/javascripts/handlebars.js | 518 +++++++++++++----- vendor/assets/javascripts/i18n-patches.js | 2 +- .../javascripts/modernizr.custom.00874.js | 4 - yarn.lock | 362 ++++-------- 318 files changed, 1684 insertions(+), 1462 deletions(-) create mode 100644 app/assets/javascripts/discourse/templates/modal/merge-topic.hbs create mode 100644 app/assets/javascripts/discourse/templates/modal/split-topic.hbs create mode 100644 app/assets/javascripts/set-prototype-polyfill.js create mode 100644 db/migrate/20181218143317_force_theme_compilation_for_ember3.rb delete mode 100644 vendor/assets/javascripts/modernizr.custom.00874.js diff --git a/Gemfile b/Gemfile index d715161cce1..345d8e7d82b 100644 --- a/Gemfile +++ b/Gemfile @@ -41,8 +41,8 @@ gem 'onebox', '1.8.76' gem 'http_accept_language', '~>2.0.5', require: false gem 'ember-rails', '0.18.5' -gem 'ember-source', '2.13.3' -gem 'ember-handlebars-template', '0.7.5' +gem 'discourse-ember-source', '~> 3.5.1' +gem 'ember-handlebars-template', '0.8.0' gem 'barber' # message bus 2.2.0 should be very stable diff --git a/Gemfile.lock b/Gemfile.lock index f51e6459e7c..26d066bc471 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -83,7 +83,7 @@ GEM open4 (~> 1.3) coderay (1.1.2) colored2 (3.1.2) - concurrent-ruby (1.1.3) + concurrent-ruby (1.1.4) connection_pool (2.2.2) cork (0.3.0) colored2 (~> 3.1) @@ -105,6 +105,7 @@ GEM terminal-table (~> 1) debug_inspector (0.0.3) diff-lcs (1.3) + discourse-ember-source (3.5.1.3) discourse_image_optim (0.26.2) exifr (~> 1.2, >= 1.2.2) fspath (~> 3.0) @@ -114,9 +115,9 @@ GEM email_reply_trimmer (0.1.12) ember-data-source (3.0.2) ember-source (>= 2, < 3.0) - ember-handlebars-template (0.7.5) + ember-handlebars-template (0.8.0) barber (>= 0.11.0) - sprockets (>= 3.3, < 4) + sprockets (>= 3.3, < 4.1) ember-rails (0.18.5) active_model_serializers ember-data-source (>= 1.0.0.beta.5) @@ -124,7 +125,7 @@ GEM ember-source (>= 1.1.0) jquery-rails (>= 1.0.17) railties (>= 3.1) - ember-source (2.13.3) + ember-source (2.18.2) erubi (1.7.1) excon (0.62.0) execjs (2.7.0) @@ -462,11 +463,11 @@ DEPENDENCIES colored2 cppjieba_rb danger + discourse-ember-source (~> 3.5.1) discourse_image_optim email_reply_trimmer (~> 0.1) - ember-handlebars-template (= 0.7.5) + ember-handlebars-template (= 0.8.0) ember-rails (= 0.18.5) - ember-source (= 2.13.3) excon execjs fabrication diff --git a/app/assets/javascripts/admin/components/admin-user-field-item.js.es6 b/app/assets/javascripts/admin/components/admin-user-field-item.js.es6 index 64e95cecf98..bdb22e258cc 100644 --- a/app/assets/javascripts/admin/components/admin-user-field-item.js.es6 +++ b/app/assets/javascripts/admin/components/admin-user-field-item.js.es6 @@ -83,26 +83,14 @@ export default Ember.Component.extend(bufferedProperty("userField"), { .catch(popupAjaxError); }, - moveUp() { - this.sendAction("moveUpAction", this.get("userField")); - }, - - moveDown() { - this.sendAction("moveDownAction", this.get("userField")); - }, - edit() { this.set("editing", true); }, - destroy() { - this.sendAction("destroyAction", this.get("userField")); - }, - cancel() { const id = this.get("userField.id"); if (Ember.isEmpty(id)) { - this.sendAction("destroyAction", this.get("userField")); + this.destroyAction(this.get("userField")); } else { this.rollbackBuffer(); this.set("editing", false); diff --git a/app/assets/javascripts/admin/components/admin-watched-word.js.es6 b/app/assets/javascripts/admin/components/admin-watched-word.js.es6 index d1283e8b3ab..53f7a8a056b 100644 --- a/app/assets/javascripts/admin/components/admin-watched-word.js.es6 +++ b/app/assets/javascripts/admin/components/admin-watched-word.js.es6 @@ -14,7 +14,7 @@ export default Ember.Component.extend( this.get("word") .destroy() .then(() => { - this.sendAction("action", this.get("word")); + this.action(this.get("word")); }) .catch(e => { bootbox.alert( diff --git a/app/assets/javascripts/admin/components/embeddable-host.js.es6 b/app/assets/javascripts/admin/components/embeddable-host.js.es6 index 7264d42c1c3..8dda74d2211 100644 --- a/app/assets/javascripts/admin/components/embeddable-host.js.es6 +++ b/app/assets/javascripts/admin/components/embeddable-host.js.es6 @@ -61,7 +61,7 @@ export default Ember.Component.extend(bufferedProperty("host"), { this.get("host") .destroyRecord() .then(() => { - this.sendAction("deleteHost", this.get("host")); + this.deleteHost(this.get("host")); }); } }); @@ -70,7 +70,7 @@ export default Ember.Component.extend(bufferedProperty("host"), { cancel() { const host = this.get("host"); if (host.get("isNew")) { - this.sendAction("deleteHost", host); + this.deleteHost(host); } else { this.rollbackBuffer(); this.set("editToggled", false); diff --git a/app/assets/javascripts/admin/components/inline-edit-checkbox.js.es6 b/app/assets/javascripts/admin/components/inline-edit-checkbox.js.es6 index f14ba622018..fb93625716f 100644 --- a/app/assets/javascripts/admin/components/inline-edit-checkbox.js.es6 +++ b/app/assets/javascripts/admin/components/inline-edit-checkbox.js.es6 @@ -4,13 +4,17 @@ import { } from "ember-addons/ember-computed-decorators"; export default Ember.Component.extend({ + classNames: ["inline-edit"], + + checked: null, + checkedInternal: null, + init() { - this._super(); + this._super(...arguments); + this.set("checkedInternal", this.get("checked")); }, - classNames: ["inline-edit"], - @observes("checked") checkedChanged() { this.set("checkedInternal", this.get("checked")); @@ -33,7 +37,7 @@ export default Ember.Component.extend({ finished() { this.set("checked", this.get("checkedInternal")); - this.sendAction(); + this.action(); } } }); diff --git a/app/assets/javascripts/admin/components/permalink-form.js.es6 b/app/assets/javascripts/admin/components/permalink-form.js.es6 index 969840a308f..0bd547cf257 100644 --- a/app/assets/javascripts/admin/components/permalink-form.js.es6 +++ b/app/assets/javascripts/admin/components/permalink-form.js.es6 @@ -33,7 +33,7 @@ export default Ember.Component.extend({ self.set("url", ""); self.set("permalink_type_value", ""); self.set("formSubmitted", false); - self.sendAction("action", Permalink.create(result.permalink)); + self.action(Permalink.create(result.permalink)); Em.run.schedule("afterRender", function() { self.$(".permalink-url").focus(); }); diff --git a/app/assets/javascripts/admin/components/resumable-upload.js.es6 b/app/assets/javascripts/admin/components/resumable-upload.js.es6 index 4a8545b3ab6..00730478c35 100644 --- a/app/assets/javascripts/admin/components/resumable-upload.js.es6 +++ b/app/assets/javascripts/admin/components/resumable-upload.js.es6 @@ -8,8 +8,8 @@ import { bufferedRender } from "discourse-common/lib/buffered-render"; {{resumable-upload target="/admin/backups/upload" - success="successAction" - error="errorAction" + success=(action "successAction") + error=(action "errorAction") uploadText="UPLOAD" }} **/ @@ -100,7 +100,7 @@ export default Ember.Component.extend( // mark as not uploading anymore self._reset(); // fire an event to allow the parent route to reload its model - self.sendAction("success", file.fileName); + self.success(file.fileName); }); }); @@ -109,7 +109,7 @@ export default Ember.Component.extend( // mark as not uploading anymore self._reset(); // fire an event to allow the parent route to display the error message - self.sendAction("error", file.fileName, message); + self.error(file.fileName, message); }); }); }.on("init"), diff --git a/app/assets/javascripts/admin/components/save-controls.js.es6 b/app/assets/javascripts/admin/components/save-controls.js.es6 index 51adbaf3c5f..cade010e5b7 100644 --- a/app/assets/javascripts/admin/components/save-controls.js.es6 +++ b/app/assets/javascripts/admin/components/save-controls.js.es6 @@ -8,11 +8,5 @@ export default Ember.Component.extend({ @computed("model.isSaving") savingText(saving) { return saving ? "saving" : "save"; - }, - - actions: { - saveChanges() { - this.sendAction(); - } } }); diff --git a/app/assets/javascripts/admin/components/screened-ip-address-form.js.es6 b/app/assets/javascripts/admin/components/screened-ip-address-form.js.es6 index 6197bfc3202..64fd7eeb382 100644 --- a/app/assets/javascripts/admin/components/screened-ip-address-form.js.es6 +++ b/app/assets/javascripts/admin/components/screened-ip-address-form.js.es6 @@ -2,7 +2,7 @@ A form to create an IP address that will be blocked or whitelisted. Example usage: - {{screened-ip-address-form action="recordAdded"}} + {{screened-ip-address-form action=(action "recordAdded")}} where action is a callback on the controller or route that will get called after the new record is successfully saved. It is called with the new ScreenedIpAddress record @@ -60,10 +60,7 @@ export default Ember.Component.extend({ .save() .then(result => { this.setProperties({ ip_address: "", formSubmitted: false }); - this.sendAction( - "action", - ScreenedIpAddress.create(result.screened_ip_address) - ); + this.action(ScreenedIpAddress.create(result.screened_ip_address)); Ember.run.schedule("afterRender", () => this.$(".ip-address-input").focus() ); diff --git a/app/assets/javascripts/admin/components/site-text-summary.js.es6 b/app/assets/javascripts/admin/components/site-text-summary.js.es6 index 48ceb2fefd5..177448b1029 100644 --- a/app/assets/javascripts/admin/components/site-text-summary.js.es6 +++ b/app/assets/javascripts/admin/components/site-text-summary.js.es6 @@ -30,11 +30,5 @@ export default Ember.Component.extend({ } return this.get("term"); - }, - - actions: { - edit() { - this.sendAction("editAction", this.get("siteText")); - } } }); diff --git a/app/assets/javascripts/admin/components/tags-uploader.js.es6 b/app/assets/javascripts/admin/components/tags-uploader.js.es6 index 621045b7316..60b4297a481 100644 --- a/app/assets/javascripts/admin/components/tags-uploader.js.es6 +++ b/app/assets/javascripts/admin/components/tags-uploader.js.es6 @@ -12,8 +12,8 @@ export default Em.Component.extend(UploadMixin, { uploadDone() { bootbox.alert(I18n.t("tagging.upload_successful"), () => { - this.sendAction("refresh"); - this.sendAction("closeModal"); + this.refresh(); + this.closeModal(); }); } }); diff --git a/app/assets/javascripts/admin/components/watched-word-form.js.es6 b/app/assets/javascripts/admin/components/watched-word-form.js.es6 index c9a61965e83..bdfafc12afb 100644 --- a/app/assets/javascripts/admin/components/watched-word-form.js.es6 +++ b/app/assets/javascripts/admin/components/watched-word-form.js.es6 @@ -64,7 +64,7 @@ export default Ember.Component.extend({ showMessage: true, message: I18n.t("admin.watched_words.form.success") }); - this.sendAction("action", WatchedWord.create(result)); + this.action(WatchedWord.create(result)); Ember.run.schedule("afterRender", () => this.$(".watched-word-input").focus() ); diff --git a/app/assets/javascripts/admin/components/watched-word-uploader.js.es6 b/app/assets/javascripts/admin/components/watched-word-uploader.js.es6 index e5ff9a1fd77..6b35fd465ef 100644 --- a/app/assets/javascripts/admin/components/watched-word-uploader.js.es6 +++ b/app/assets/javascripts/admin/components/watched-word-uploader.js.es6 @@ -19,7 +19,7 @@ export default Em.Component.extend(UploadMixin, { uploadDone() { if (this) { bootbox.alert(I18n.t("admin.watched_words.form.upload_successful")); - this.sendAction("done"); + this.done(); } } }); diff --git a/app/assets/javascripts/admin/controllers/admin-customize-themes-show.js.es6 b/app/assets/javascripts/admin/controllers/admin-customize-themes-show.js.es6 index 78a98c55601..45f1b3359d0 100644 --- a/app/assets/javascripts/admin/controllers/admin-customize-themes-show.js.es6 +++ b/app/assets/javascripts/admin/controllers/admin-customize-themes-show.js.es6 @@ -48,7 +48,7 @@ export default Ember.Controller.extend({ return colorSchemeId !== existingId; }, - @computed("availableChildThemes", "model.childThemes.@each", "model") + @computed("availableChildThemes", "model.childThemes.[]", "model") selectableChildThemes(available, childThemes) { if (available) { const themes = !childThemes diff --git a/app/assets/javascripts/admin/controllers/admin-web-hooks-show.js.es6 b/app/assets/javascripts/admin/controllers/admin-web-hooks-show.js.es6 index 55e6b007fda..1f28c967236 100644 --- a/app/assets/javascripts/admin/controllers/admin-web-hooks-show.js.es6 +++ b/app/assets/javascripts/admin/controllers/admin-web-hooks-show.js.es6 @@ -62,9 +62,21 @@ export default Ember.Controller.extend({ } }, - @computed("model.isSaving", "secretValidation", "eventTypeValidation") - saveButtonDisabled(isSaving, secretValidation, eventTypeValidation) { - return isSaving ? false : secretValidation || eventTypeValidation; + @computed( + "model.isSaving", + "secretValidation", + "eventTypeValidation", + "model.payload_url" + ) + saveButtonDisabled( + isSaving, + secretValidation, + eventTypeValidation, + payloadUrl + ) { + return isSaving + ? false + : secretValidation || eventTypeValidation || Ember.isEmpty(payloadUrl); }, actions: { diff --git a/app/assets/javascripts/admin/models/theme.js.es6 b/app/assets/javascripts/admin/models/theme.js.es6 index da881abf9bc..e81fc7e1474 100644 --- a/app/assets/javascripts/admin/models/theme.js.es6 +++ b/app/assets/javascripts/admin/models/theme.js.es6 @@ -30,7 +30,7 @@ const Theme = RestModel.extend({ return hash; }, - @computed("theme_fields", "theme_fields.@each") + @computed("theme_fields", "theme_fields.[]") uploads(fields) { if (!fields) { return []; @@ -47,7 +47,7 @@ const Theme = RestModel.extend({ ); }, - @computed("theme_fields.@each") + @computed("theme_fields.[]") editedFields(fields) { return fields.filter( field => !Em.isBlank(field.value) && field.type_id !== SETTINGS_TYPE_ID @@ -130,7 +130,7 @@ const Theme = RestModel.extend({ } }, - @computed("childThemes.@each") + @computed("childThemes.[]") child_theme_ids(childThemes) { if (childThemes) { return childThemes.map(theme => Ember.get(theme, "id")); diff --git a/app/assets/javascripts/admin/models/watched-word.js.es6 b/app/assets/javascripts/admin/models/watched-word.js.es6 index cdf5e29e8a0..d7d781227dd 100644 --- a/app/assets/javascripts/admin/models/watched-word.js.es6 +++ b/app/assets/javascripts/admin/models/watched-word.js.es6 @@ -21,7 +21,7 @@ const WatchedWord = Discourse.Model.extend({ WatchedWord.reopenClass({ findAll() { - return ajax("/admin/logs/watched_words").then(list => { + return ajax("/admin/logs/watched_words.json").then(list => { const actions = {}; list.words.forEach(s => { if (!actions[s.action]) { diff --git a/app/assets/javascripts/admin/templates/api-keys.hbs b/app/assets/javascripts/admin/templates/api-keys.hbs index e256e127cf9..1b85311b6e1 100644 --- a/app/assets/javascripts/admin/templates/api-keys.hbs +++ b/app/assets/javascripts/admin/templates/api-keys.hbs @@ -19,8 +19,8 @@ {{/if}} - {{d-button class="btn-default" action="regenerateKey" actionParam=k icon="undo" label='admin.api.regenerate'}} - {{d-button class="btn-default" action="revokeKey" actionParam=k icon="times" label='admin.api.revoke'}} + {{d-button class="btn-default" action=(action "regenerateKey") actionParam=k icon="undo" label='admin.api.regenerate'}} + {{d-button class="btn-default" action=(action "revokeKey") actionParam=k icon="times" label='admin.api.revoke'}} {{/each}} diff --git a/app/assets/javascripts/admin/templates/backups-index.hbs b/app/assets/javascripts/admin/templates/backups-index.hbs index 3e69cbff2ca..46a0dafaf22 100644 --- a/app/assets/javascripts/admin/templates/backups-index.hbs +++ b/app/assets/javascripts/admin/templates/backups-index.hbs @@ -1,14 +1,14 @@
{{#if localBackupStorage}} - {{resumable-upload target="/admin/backups/upload" success="uploadSuccess" error="uploadError" uploadText=uploadLabel title="admin.backups.upload.title" class="btn-default"}} + {{resumable-upload target="/admin/backups/upload" success=(route-action "uploadSuccess") error=(route-action "uploadError") uploadText=uploadLabel title="admin.backups.upload.title" class="btn-default"}} {{else}} - {{backup-uploader done="remoteUploadSuccess"}} + {{backup-uploader done=(route-action "remoteUploadSuccess")}} {{/if}} {{#if site.isReadOnly}} - {{d-button class="btn-default" icon="far-eye" action="toggleReadOnlyMode" disabled=status.isOperationRunning title="admin.backups.read_only.disable.title" label="admin.backups.read_only.disable.label"}} + {{d-button class="btn-default" icon="far-eye" action=(action "toggleReadOnlyMode") disabled=status.isOperationRunning title="admin.backups.read_only.disable.title" label="admin.backups.read_only.disable.label"}} {{else}} - {{d-button class="btn-default" icon="far-eye" action="toggleReadOnlyMode" disabled=status.isOperationRunning title="admin.backups.read_only.enable.title" label="admin.backups.read_only.enable.label"}} + {{d-button class="btn-default" icon="far-eye" action=(action "toggleReadOnlyMode") disabled=status.isOperationRunning title="admin.backups.read_only.enable.title" label="admin.backups.read_only.enable.label"}} {{/if}}
@@ -25,17 +25,17 @@ diff --git a/app/assets/javascripts/admin/templates/backups.hbs b/app/assets/javascripts/admin/templates/backups.hbs index 21b104a9b24..38810c41ec0 100644 --- a/app/assets/javascripts/admin/templates/backups.hbs +++ b/app/assets/javascripts/admin/templates/backups.hbs @@ -7,7 +7,7 @@ {{plugin-outlet name="downloader" tagName=""}}
{{#if model.canRollback}} - {{d-button action="rollback" + {{d-button action=(route-action "rollback") class="btn-default btn-rollback" label="admin.backups.operations.rollback.label" title="admin.backups.operations.rollback.title" @@ -15,13 +15,13 @@ disabled=rollbackDisabled}} {{/if}} {{#if model.isOperationRunning}} - {{d-button action="cancelOperation" + {{d-button action=(route-action "cancelOperation") class="btn-danger" title="admin.backups.operations.cancel.title" label="admin.backups.operations.cancel.label" icon="times"}} {{else}} - {{d-button action="showStartBackupModal" + {{d-button action=(route-action "showStartBackupModal") class="btn-primary" title="admin.backups.operations.backup.title" label="admin.backups.operations.backup.label" diff --git a/app/assets/javascripts/admin/templates/components/admin-report-table.hbs b/app/assets/javascripts/admin/templates/components/admin-report-table.hbs index 2e6c528accb..6011407673c 100644 --- a/app/assets/javascripts/admin/templates/components/admin-report-table.hbs +++ b/app/assets/javascripts/admin/templates/components/admin-report-table.hbs @@ -55,7 +55,7 @@ {{#each pages as |pageState|}} {{d-button translatedLabel=pageState.page - action="changePage" + action=(action "changePage") actionParam=pageState.index class=pageState.class}} {{/each}} diff --git a/app/assets/javascripts/admin/templates/components/admin-report.hbs b/app/assets/javascripts/admin/templates/components/admin-report.hbs index 69ec7a3fd89..1c82ee5a20f 100644 --- a/app/assets/javascripts/admin/templates/components/admin-report.hbs +++ b/app/assets/javascripts/admin/templates/components/admin-report.hbs @@ -115,7 +115,7 @@
{{#each displayedModes as |displayedMode|}} {{d-button - action="changeMode" + action=(action "changeMode") actionParam=displayedMode.mode class=displayedMode.cssClass icon=displayedMode.icon}} @@ -178,7 +178,7 @@
{{d-button class="btn-default export-csv-btn" - action="exportCsv" + action=(action "exportCsv") label="admin.export_csv.button_text" icon="download"}}
@@ -190,7 +190,7 @@
{{d-button class="refresh-report-btn btn-primary" - action="refreshReport" + action=(action "refreshReport") label="admin.dashboard.reports.refresh_report" icon="refresh"}}
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 0074c99f1a3..46c6ac46ae6 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 @@ -34,8 +34,8 @@ {{/admin-form-row}} {{#admin-form-row}} - {{d-button action="save" class="btn-primary" icon="check" label="admin.user_fields.save"}} - {{d-button action="cancel" class="btn-danger" icon="times" label="admin.user_fields.cancel"}} + {{d-button action=(action "save") class="btn-primary" icon="check" label="admin.user_fields.save"}} + {{d-button action=(action "cancel") class="btn-danger" icon="times" label="admin.user_fields.cancel"}} {{/admin-form-row}} {{else}}
@@ -46,10 +46,11 @@
{{fieldName}}
- {{d-button action="edit" class="btn-default" icon="pencil" label="admin.user_fields.edit"}} - {{d-button action="destroy" class="btn-danger" icon="trash-o" label="admin.user_fields.delete"}} - {{d-button action="moveUp" class="btn-default" icon="arrow-up" disabled=cantMoveUp}} - {{d-button action="moveDown" class="btn-default" icon="arrow-down" disabled=cantMoveDown}} + {{d-button action=(action "edit") class="btn-default" icon="pencil" label="admin.user_fields.edit"}} + + {{d-button action=destroyAction actionParam=userField class="btn-danger" icon="trash-o" label="admin.user_fields.delete"}} + {{d-button action=moveUpAction actionParam=userField class="btn-default" icon="arrow-up" disabled=cantMoveUp}} + {{d-button action=moveDownAction actionParam=userField class="btn-default" icon="arrow-down" disabled=cantMoveDown}}
{{flags}}
diff --git a/app/assets/javascripts/admin/templates/components/admin-web-hook-event.hbs b/app/assets/javascripts/admin/templates/components/admin-web-hook-event.hbs index 026b6daae27..a98f8684f03 100644 --- a/app/assets/javascripts/admin/templates/components/admin-web-hook-event.hbs +++ b/app/assets/javascripts/admin/templates/components/admin-web-hook-event.hbs @@ -5,13 +5,13 @@
{{createdAt}}
{{completion}}
- {{d-button icon='ellipsis-v' action='toggleRequest' label='admin.web_hooks.events.request'}} - {{d-button icon='ellipsis-v' action='toggleResponse' label='admin.web_hooks.events.response'}} - {{d-button icon='refresh' action='redeliver' label='admin.web_hooks.events.redeliver'}} + {{d-button icon="ellipsis-v" action=(action "toggleRequest") label="admin.web_hooks.events.request"}} + {{d-button icon="ellipsis-v" action=(action "toggleResponse") label="admin.web_hooks.events.response"}} + {{d-button icon="refresh" action=(action "redeliver") label="admin.web_hooks.events.redeliver"}}
{{#if expandDetails}}
-

{{i18n 'admin.web_hooks.events.headers'}}

+

{{i18n "admin.web_hooks.events.headers"}}

{{headers}}

{{bodyLabel}}

{{body}}
diff --git a/app/assets/javascripts/admin/templates/components/embeddable-host.hbs b/app/assets/javascripts/admin/templates/components/embeddable-host.hbs index 07f635bcf68..0c5acf83225 100644 --- a/app/assets/javascripts/admin/templates/components/embeddable-host.hbs +++ b/app/assets/javascripts/admin/templates/components/embeddable-host.hbs @@ -1,23 +1,23 @@ {{#if editing}}
{{else}} @@ -25,7 +25,7 @@ -{{/if}} \ No newline at end of file +{{/if}} diff --git a/app/assets/javascripts/admin/templates/components/flagged-post.hbs b/app/assets/javascripts/admin/templates/components/flagged-post.hbs index 0ef0f3d8a4e..98d0120bd6e 100644 --- a/app/assets/javascripts/admin/templates/components/flagged-post.hbs +++ b/app/assets/javascripts/admin/templates/components/flagged-post.hbs @@ -78,14 +78,14 @@ {{d-button title="admin.flags.disagree_flag_unhide_post_title" class="btn-default disagree-flag" - action="disagree" + action=(action "disagree") icon="thumbs-o-down" label="admin.flags.disagree_flag_unhide_post"}} {{else}} {{d-button title="admin.flags.disagree_flag_title" class="btn-default disagree-flag" - action="disagree" + action=(action "disagree") icon="thumbs-o-down" label="admin.flags.disagree_flag"}} {{/if}} @@ -93,7 +93,7 @@ {{d-button class="btn-default defer-flag" title="admin.flags.ignore_flag_title" - action="defer" + action=(action "defer") icon="external-link" label="admin.flags.ignore_flag"}} diff --git a/app/assets/javascripts/admin/templates/components/inline-edit-checkbox.hbs b/app/assets/javascripts/admin/templates/components/inline-edit-checkbox.hbs index 3a651ad0dfe..7c8e0f280ef 100644 --- a/app/assets/javascripts/admin/templates/components/inline-edit-checkbox.hbs +++ b/app/assets/javascripts/admin/templates/components/inline-edit-checkbox.hbs @@ -3,6 +3,6 @@ {{label}} {{#if changed}} - {{d-button action="finished" class="btn-primary btn-small submit-edit" icon="check"}} - {{d-button action="cancelled" class="btn-small cancel-edit" icon="times"}} + {{d-button action=(action "finished") class="btn-primary btn-small submit-edit" icon="check"}} + {{d-button action=(action "cancelled") class="btn-small cancel-edit" icon="times"}} {{/if}} diff --git a/app/assets/javascripts/admin/templates/components/permalink-form.hbs b/app/assets/javascripts/admin/templates/components/permalink-form.hbs index dc37c009915..7357ede5267 100644 --- a/app/assets/javascripts/admin/templates/components/permalink-form.hbs +++ b/app/assets/javascripts/admin/templates/components/permalink-form.hbs @@ -2,4 +2,4 @@ {{text-field value=url disabled=formSubmitted class="permalink-url" placeholderKey="admin.permalink.url" autocorrect="off" autocapitalize="off"}} {{combo-box content=permalinkTypes value=permalinkType}} {{text-field value=permalink_type_value disabled=formSubmitted class="external-url" placeholderKey=permalinkTypePlaceholder autocorrect="off" autocapitalize="off"}} -{{d-button class="btn-default" action="submit" disabled=formSubmitted label="admin.permalink.form.add"}} +{{d-button class="btn-default" action=(action "submit") disabled=formSubmitted label="admin.permalink.form.add"}} diff --git a/app/assets/javascripts/admin/templates/components/save-controls.hbs b/app/assets/javascripts/admin/templates/components/save-controls.hbs index 00ac91331fa..d6974ea1085 100644 --- a/app/assets/javascripts/admin/templates/components/save-controls.hbs +++ b/app/assets/javascripts/admin/templates/components/save-controls.hbs @@ -1,4 +1,4 @@ -{{d-button action="saveChanges" disabled=buttonDisabled label=savingText class="btn-primary save-changes"}} +{{d-button action=action disabled=buttonDisabled label=savingText class="btn-primary save-changes"}} {{yield}}
{{#if saved}} diff --git a/app/assets/javascripts/admin/templates/components/screened-ip-address-form.hbs b/app/assets/javascripts/admin/templates/components/screened-ip-address-form.hbs index 82fb3162e2d..6bc99fdbd11 100644 --- a/app/assets/javascripts/admin/templates/components/screened-ip-address-form.hbs +++ b/app/assets/javascripts/admin/templates/components/screened-ip-address-form.hbs @@ -1,4 +1,4 @@ {{i18n 'admin.logs.screened_ips.form.label'}} {{text-field value=ip_address disabled=formSubmitted class="ip-address-input" placeholderKey="admin.logs.screened_ips.form.ip_address" autocorrect="off" autocapitalize="off"}} {{combo-box content=actionNames value=actionName}} -{{d-button class="btn-default" action="submit" disabled=formSubmitted label="admin.logs.screened_ips.form.add"}} +{{d-button class="btn-default" action=(action "submit") disabled=formSubmitted label="admin.logs.screened_ips.form.add"}} diff --git a/app/assets/javascripts/admin/templates/components/secret-value-list.hbs b/app/assets/javascripts/admin/templates/components/secret-value-list.hbs index a2f44f15530..5674d6d7d7d 100644 --- a/app/assets/javascripts/admin/templates/components/secret-value-list.hbs +++ b/app/assets/javascripts/admin/templates/components/secret-value-list.hbs @@ -2,7 +2,7 @@
{{#each collection as |value index|}}
- {{d-button action="removeValue" + {{d-button action=(action "removeValue") actionParam=value icon="times" class="remove-value-btn btn-small"}} @@ -16,7 +16,7 @@
{{text-field value=newKey class="new-value-input key" placeholder=setting.placeholder.key}} {{input type="password" value=newSecret class="new-value-input secret" placeholder=setting.placeholder.value}} - {{d-button action="addValue" + {{d-button action=(action "addValue") icon="plus" class="add-value-btn btn-small"}}
diff --git a/app/assets/javascripts/admin/templates/components/site-setting.hbs b/app/assets/javascripts/admin/templates/components/site-setting.hbs index a832080ea77..03f6342cdab 100644 --- a/app/assets/javascripts/admin/templates/components/site-setting.hbs +++ b/app/assets/javascripts/admin/templates/components/site-setting.hbs @@ -6,12 +6,12 @@
{{#if dirty}}
- {{d-button class="ok" action="save" icon="check"}} - {{d-button class="cancel" action="cancel" icon="times"}} + {{d-button class="ok" action=(action "save") icon="check"}} + {{d-button class="cancel" action=(action "cancel") icon="times"}}
{{else if setting.overridden}} {{#if setting.secret}} - {{d-button action="toggleSecret" icon="eye-slash"}} + {{d-button action=(action "toggleSecret") icon="eye-slash"}} {{/if}} - {{d-button class="btn-default undo" action="resetDefault" icon="undo" label="admin.settings.reset"}} + {{d-button class="btn-default undo" action=(action "resetDefault") icon="undo" label="admin.settings.reset"}} {{/if}} diff --git a/app/assets/javascripts/admin/templates/components/site-settings/uploaded-image-list.hbs b/app/assets/javascripts/admin/templates/components/site-settings/uploaded-image-list.hbs index 3de2abc489a..86750e634d9 100644 --- a/app/assets/javascripts/admin/templates/components/site-settings/uploaded-image-list.hbs +++ b/app/assets/javascripts/admin/templates/components/site-settings/uploaded-image-list.hbs @@ -1,2 +1,2 @@ -{{d-button label="admin.site_settings.uploaded_image_list.label" action="showUploadModal" actionParam=(hash value=value setting=setting)}} +{{d-button label="admin.site_settings.uploaded_image_list.label" action=(action "showUploadModal") actionParam=(hash value=value setting=setting)}}
{{{unbound setting.description}}}
diff --git a/app/assets/javascripts/admin/templates/components/site-text-summary.hbs b/app/assets/javascripts/admin/templates/components/site-text-summary.hbs index 60cfc9843dd..c0c7063309b 100644 --- a/app/assets/javascripts/admin/templates/components/site-text-summary.hbs +++ b/app/assets/javascripts/admin/templates/components/site-text-summary.hbs @@ -1,4 +1,4 @@ -{{d-button label="admin.site_text.edit" class='btn-default edit' action="edit"}} +{{d-button label="admin.site_text.edit" class='btn-default edit' action=editAction actionParam=siteText}}

{{siteText.id}}

{{siteText.value}}
diff --git a/app/assets/javascripts/admin/templates/components/tags-uploader.hbs b/app/assets/javascripts/admin/templates/components/tags-uploader.hbs index dab22c2ed78..db3c9aa301d 100644 --- a/app/assets/javascripts/admin/templates/components/tags-uploader.hbs +++ b/app/assets/javascripts/admin/templates/components/tags-uploader.hbs @@ -1,6 +1,6 @@ - - {{i18n 'tagging.upload_instructions'}} + +{{i18n 'tagging.upload_instructions'}} diff --git a/app/assets/javascripts/admin/templates/components/value-list.hbs b/app/assets/javascripts/admin/templates/components/value-list.hbs index d74b600ca4c..372de2ac1d1 100644 --- a/app/assets/javascripts/admin/templates/components/value-list.hbs +++ b/app/assets/javascripts/admin/templates/components/value-list.hbs @@ -2,7 +2,7 @@
{{#each collection as |value index|}}
- {{d-button action="removeValue" + {{d-button action=(action "removeValue") actionParam=value icon="times" class="btn-default remove-value-btn btn-small"}} diff --git a/app/assets/javascripts/admin/templates/components/watched-word-form.hbs b/app/assets/javascripts/admin/templates/components/watched-word-form.hbs index 2b109e73857..13454f21a55 100644 --- a/app/assets/javascripts/admin/templates/components/watched-word-form.hbs +++ b/app/assets/javascripts/admin/templates/components/watched-word-form.hbs @@ -1,6 +1,6 @@ {{i18n 'admin.watched_words.form.label'}} {{text-field value=word disabled=formSubmitted class="watched-word-input" autocorrect="off" autocapitalize="off" placeholderKey=placeholderKey}} -{{d-button class="btn-default" action="submit" disabled=formSubmitted label="admin.watched_words.form.add"}} +{{d-button class="btn-default" action=(action "submit") disabled=formSubmitted label="admin.watched_words.form.add"}} {{#if showMessage}} {{message}} diff --git a/app/assets/javascripts/admin/templates/customize-email-templates-edit.hbs b/app/assets/javascripts/admin/templates/customize-email-templates-edit.hbs index c23e3caef09..a1e3910e11b 100644 --- a/app/assets/javascripts/admin/templates/customize-email-templates-edit.hbs +++ b/app/assets/javascripts/admin/templates/customize-email-templates-edit.hbs @@ -10,9 +10,9 @@ {{d-editor value=buffered.body}} - {{#save-controls model=emailTemplate action="saveChanges" saved=saved}} + {{#save-controls model=emailTemplate action=(action "saveChanges") saved=saved}} {{#if emailTemplate.can_revert}} - {{d-button action="revertChanges" label="admin.customize.email_templates.revert"}} + {{d-button action=(action "revertChanges") label="admin.customize.email_templates.revert"}} {{/if}} {{/save-controls}}
diff --git a/app/assets/javascripts/admin/templates/customize-themes-edit.hbs b/app/assets/javascripts/admin/templates/customize-themes-edit.hbs index 0ec171dfa8f..4807209639d 100644 --- a/app/assets/javascripts/admin/templates/customize-themes-edit.hbs +++ b/app/assets/javascripts/admin/templates/customize-themes-edit.hbs @@ -69,7 +69,7 @@
- {{#d-button action="save" disabled=saveDisabled class='btn-primary'}} + {{#d-button action=(action "save") disabled=saveDisabled class='btn-primary'}} {{saveButtonText}} {{/d-button}}
diff --git a/app/assets/javascripts/admin/templates/customize-themes-show.hbs b/app/assets/javascripts/admin/templates/customize-themes-show.hbs index fd540a694e1..60615f6e14e 100644 --- a/app/assets/javascripts/admin/templates/customize-themes-show.hbs +++ b/app/assets/javascripts/admin/templates/customize-themes-show.hbs @@ -2,8 +2,8 @@
{{#if editingName}} {{text-field value=model.name autofocus="true"}} - {{d-button action="finishedEditingName" class="btn-primary btn-small submit-edit" icon="check"}} - {{d-button action="cancelEditingName" class="btn-small cancel-edit" icon="times"}} + {{d-button action=(action "finishedEditingName") class="btn-primary btn-small submit-edit" icon="check"}} + {{d-button action=(action "cancelEditingName") class="btn-small cancel-edit" icon="times"}} {{else}} {{model.name}} {{d-icon "pencil"}} {{/if}} @@ -36,8 +36,8 @@ {{#unless model.component}}
- {{inline-edit-checkbox action="applyDefault" labelKey="admin.customize.theme.is_default" checked=model.default}} - {{inline-edit-checkbox action="applyUserSelectable" labelKey="admin.customize.theme.user_selectable" checked=model.user_selectable}} + {{inline-edit-checkbox action=(action "applyDefault") labelKey="admin.customize.theme.is_default" checked=model.default}} + {{inline-edit-checkbox action=(action "applyUserSelectable") labelKey="admin.customize.theme.user_selectable" checked=model.user_selectable}}
@@ -49,8 +49,8 @@ value=colorSchemeId icon="paint-brush"}} {{#if colorSchemeChanged}} - {{d-button action="changeScheme" class="btn-primary btn-small submit-edit" icon="check"}} - {{d-button action="cancelChangeScheme" class="btn-default btn-small cancel-edit" icon="times"}} + {{d-button action=(action "changeScheme") class="btn-primary btn-small submit-edit" icon="check"}} + {{d-button action=(action "cancelChangeScheme") class="btn-default btn-small cancel-edit" icon="times"}} {{/if}}
{{#link-to 'adminCustomize.colors' class="btn btn-default edit"}}{{i18n 'admin.customize.colors.edit'}}{{/link-to}} @@ -74,13 +74,13 @@ {{#if model.remote_theme}} {{#if model.remote_theme.commits_behind}} - {{#d-button action="updateToLatest" icon="download" class='btn-primary'}}{{i18n "admin.customize.theme.update_to_latest"}}{{/d-button}} + {{#d-button action=(action "updateToLatest") icon="download" class='btn-primary'}}{{i18n "admin.customize.theme.update_to_latest"}}{{/d-button}} {{else}} - {{#d-button action="checkForThemeUpdates" icon="refresh" class="btn-default"}}{{i18n "admin.customize.theme.check_for_updates"}}{{/d-button}} + {{#d-button action=(action "checkForThemeUpdates") icon="refresh" class="btn-default"}}{{i18n "admin.customize.theme.check_for_updates"}}{{/d-button}} {{/if}} {{/if}} - {{#d-button action="editTheme" class="btn btn-default edit"}}{{i18n 'admin.customize.theme.edit_css_html'}}{{/d-button}} + {{#d-button action=(action "editTheme") class="btn btn-default edit"}}{{i18n 'admin.customize.theme.edit_css_html'}}{{/d-button}} {{#if model.remote_theme}} {{#if updatingRemote}} @@ -119,7 +119,7 @@
  • ${{upload.name}}: {{upload.filename}} - {{d-button action="removeUpload" actionParam=upload class="second btn-default btn-small cancel-edit" icon="times"}} + {{d-button action=(action "removeUpload") actionParam=upload class="second btn-default btn-small cancel-edit" icon="times"}}
  • {{/each}} @@ -127,7 +127,7 @@ {{else}}
    {{i18n "admin.customize.theme.no_uploads"}}
    {{/if}} - {{#d-button action="addUploadModal" class="btn-default" icon="plus"}}{{i18n "admin.customize.theme.add"}}{{/d-button}} + {{#d-button action=(action "addUploadModal") class="btn-default" icon="plus"}}{{i18n "admin.customize.theme.add"}}{{/d-button}}
    {{#if hasSettings}} @@ -147,14 +147,14 @@ {{#if model.childThemes.length}}
      {{#each model.childThemes as |child|}} -
    • {{#link-to 'adminCustomizeThemes.show' child replace=true class='col'}}{{child.name}}{{/link-to}} {{d-button action="removeChildTheme" actionParam=child class="btn-default btn-small cancel-edit col" icon="times"}}
    • +
    • {{#link-to 'adminCustomizeThemes.show' child replace=true class='col'}}{{child.name}}{{/link-to}} {{d-button action=(action "removeChildTheme") actionParam=child class="btn-default btn-small cancel-edit col" icon="times"}}
    • {{/each}}
    {{/if}} {{#if selectableChildThemes}}
    {{combo-box forceEscape=true filterable=true content=selectableChildThemes value=selectedChildThemeId none="admin.customize.theme.select_component"}} - {{#d-button action="addChildTheme" icon="plus" disabled=addButtonDisabled class="btn-default add-component-button"}}{{i18n "admin.customize.theme.add"}}{{/d-button}} + {{#d-button action=(action "addChildTheme") icon="plus" disabled=addButtonDisabled class="btn-default add-component-button"}}{{i18n "admin.customize.theme.add"}}{{/d-button}}
    {{/if}}
    @@ -163,6 +163,6 @@ {{d-icon 'desktop'}}{{i18n 'admin.customize.theme.preview'}} {{d-icon "download"}} {{i18n 'admin.export_json.button_text'}} - {{d-button action="switchType" label="admin.customize.theme.convert" icon=convertIcon class="btn-default btn-normal" title=convertTooltip}} - {{d-button action="destroy" label="admin.customize.delete" icon="trash" class="btn-danger"}} + {{d-button action=(action "switchType") label="admin.customize.theme.convert" icon=convertIcon class="btn-default btn-normal" title=convertTooltip}} + {{d-button action=(action "destroy") label="admin.customize.delete" icon="trash" class="btn-danger"}}
    diff --git a/app/assets/javascripts/admin/templates/customize-themes.hbs b/app/assets/javascripts/admin/templates/customize-themes.hbs index 82985568c2f..268febd4352 100644 --- a/app/assets/javascripts/admin/templates/customize-themes.hbs +++ b/app/assets/javascripts/admin/templates/customize-themes.hbs @@ -3,8 +3,8 @@
    - {{d-button label="admin.customize.new" icon="plus" action="showCreateModal" class="btn-primary"}} - {{d-button action="importModal" icon="upload" label="admin.customize.import" class="btn-default"}} + {{d-button label="admin.customize.new" icon="plus" action=(route-action "showCreateModal") class="btn-primary"}} + {{d-button action=(route-action "importModal") icon="upload" label="admin.customize.import" class="btn-default"}}
    {{themes-list themes=fullThemes components=childThemes currentTab=currentTab}} diff --git a/app/assets/javascripts/admin/templates/dashboard-problems.hbs b/app/assets/javascripts/admin/templates/dashboard-problems.hbs index c0c6b9ca0b6..a945b8d5360 100644 --- a/app/assets/javascripts/admin/templates/dashboard-problems.hbs +++ b/app/assets/javascripts/admin/templates/dashboard-problems.hbs @@ -19,7 +19,7 @@

    {{i18n 'admin.dashboard.last_checked'}}: {{problemsTimestamp}} - {{d-button action="refreshProblems" class="btn-default btn-small" icon="refresh" label="admin.dashboard.refresh_problems"}} + {{d-button action=(action "refreshProblems") class="btn-default btn-small" icon="refresh" label="admin.dashboard.refresh_problems"}}

    {{/conditional-loading-section}} diff --git a/app/assets/javascripts/admin/templates/dashboard_next_general.hbs b/app/assets/javascripts/admin/templates/dashboard_next_general.hbs index a9bfd44c190..000fcf152c5 100644 --- a/app/assets/javascripts/admin/templates/dashboard_next_general.hbs +++ b/app/assets/javascripts/admin/templates/dashboard_next_general.hbs @@ -9,7 +9,7 @@ {{i18n "admin.dashboard.community_health"}} - {{period-chooser period=period action="changePeriod" content=availablePeriods fullDay=true}} + {{period-chooser period=period action=(action "changePeriod") content=availablePeriods fullDay=true}}
    diff --git a/app/assets/javascripts/admin/templates/dashboard_next_moderation.hbs b/app/assets/javascripts/admin/templates/dashboard_next_moderation.hbs index 8959bac0219..300b7c36e70 100644 --- a/app/assets/javascripts/admin/templates/dashboard_next_moderation.hbs +++ b/app/assets/javascripts/admin/templates/dashboard_next_moderation.hbs @@ -10,7 +10,7 @@ {{period-chooser period=period - action="changePeriod" + action=(action "changePeriod") content=availablePeriods fullDay=true}}
    diff --git a/app/assets/javascripts/admin/templates/email-bounced.hbs b/app/assets/javascripts/admin/templates/email-bounced.hbs index 9ebbb7d3166..dc9c2e2b7f6 100644 --- a/app/assets/javascripts/admin/templates/email-bounced.hbs +++ b/app/assets/javascripts/admin/templates/email-bounced.hbs @@ -1,4 +1,4 @@ -{{#load-more selector=".email-list tr" action="loadMore"}} +{{#load-more selector=".email-list tr" action=(action "loadMore")}}
    {{d-button class="btn-default download" - action="download" + action=(action "download") actionParam=backup icon="download" title="admin.backups.operations.download.title" label="admin.backups.operations.download.label"}} {{#if status.isOperationRunning}} - {{d-button icon="far-trash-alt" action="destroyBackup" actionParam=backup class="btn-danger" disabled="true" title="admin.backups.operations.is_running"}} - {{d-button icon="play" action="startRestore" actionParam=backup disabled=status.restoreDisabled class="btn-default" title=restoreTitle label="admin.backups.operations.restore.label"}} + {{d-button icon="far-trash-alt" action=(route-action "destroyBackup") actionParam=backup class="btn-danger" disabled="true" title="admin.backups.operations.is_running"}} + {{d-button icon="play" action=(route-action "startRestore") actionParam=backup disabled=status.restoreDisabled class="btn-default" title=restoreTitle label="admin.backups.operations.restore.label"}} {{else}} - {{d-button icon="far-trash-alt" action="destroyBackup" actionParam=backup class="btn-danger" title="admin.backups.operations.destroy.title"}} - {{d-button icon="play" action="startRestore" actionParam=backup disabled=status.restoreDisabled class="btn-default" title=restoreTitle label="admin.backups.operations.restore.label"}} + {{d-button icon="far-trash-alt" action=(route-action "destroyBackup") actionParam=backup class="btn-danger" title="admin.backups.operations.destroy.title"}} + {{d-button icon="play" action=(route-action "startRestore") actionParam=backup disabled=status.restoreDisabled class="btn-default" title=restoreTitle label="admin.backups.operations.restore.label"}} {{/if}}
    {{i18n "admin.embedding.host"}}
    - {{input value=buffered.host placeholder="example.com" enter="save" class="host-name"}} + {{input value=buffered.host placeholder="example.com" enter=(action "save") class="host-name"}}
    {{i18n "admin.embedding.class_name"}}
    - {{input value=buffered.class_name placeholder="class" enter="save" class="class-name"}} + {{input value=buffered.class_name placeholder="class" enter=(action "save") class="class-name"}}
    {{i18n "admin.embedding.path_whitelist"}}
    - {{input value=buffered.path_whitelist placeholder="/blog/.*" enter="save" class="path-whitelist"}} + {{input value=buffered.path_whitelist placeholder="/blog/.*" enter=(action "save") class="path-whitelist"}}
    {{i18n "admin.embedding.category"}}
    {{category-chooser value=categoryId class="small"}}
    - {{d-button icon="check" action="save" class="btn-primary" disabled=cantSave}} - {{d-button icon="times" action="cancel" class="btn-danger" disabled=host.isSaving}} + {{d-button icon="check" action=(action "save") class="btn-primary" disabled=cantSave}} + {{d-button icon="times" action=(action "cancel") class="btn-danger" disabled=host.isSaving}}
    {{i18n "admin.embedding.host"}}
    {{host.host}}
    {{i18n "admin.embedding.path_whitelist"}}
    {{host.path_whitelist}}
    {{i18n "admin.embedding.category"}}
    {{category-badge host.category}}
    - {{d-button icon="pencil" action="edit"}} - {{d-button icon="trash-o" action="delete" class='btn-danger'}} + {{d-button icon="pencil" action=(action "edit")}} + {{d-button icon="trash-o" action=(action "delete") class='btn-danger'}}
    diff --git a/app/assets/javascripts/admin/templates/email-received.hbs b/app/assets/javascripts/admin/templates/email-received.hbs index c1e679b1793..8a164e3ff8e 100644 --- a/app/assets/javascripts/admin/templates/email-received.hbs +++ b/app/assets/javascripts/admin/templates/email-received.hbs @@ -1,4 +1,4 @@ -{{#load-more selector=".email-list tr" action="loadMore"}} +{{#load-more selector=".email-list tr" action=(action "loadMore")}} diff --git a/app/assets/javascripts/admin/templates/email-rejected.hbs b/app/assets/javascripts/admin/templates/email-rejected.hbs index 310a5bba16a..43744a919b4 100644 --- a/app/assets/javascripts/admin/templates/email-rejected.hbs +++ b/app/assets/javascripts/admin/templates/email-rejected.hbs @@ -1,4 +1,4 @@ -{{#load-more selector=".email-list tr" action="loadMore"}} +{{#load-more selector=".email-list tr" action=(action "loadMore")}} diff --git a/app/assets/javascripts/admin/templates/email-sent.hbs b/app/assets/javascripts/admin/templates/email-sent.hbs index a8b2d57fae4..83bb5b56d8a 100644 --- a/app/assets/javascripts/admin/templates/email-sent.hbs +++ b/app/assets/javascripts/admin/templates/email-sent.hbs @@ -1,4 +1,4 @@ -{{#load-more selector=".email-list tr" action="loadMore"}} +{{#load-more selector=".email-list tr" action=(action "loadMore")}} diff --git a/app/assets/javascripts/admin/templates/email-skipped.hbs b/app/assets/javascripts/admin/templates/email-skipped.hbs index ce5bbaf8742..0ca7fed0a74 100644 --- a/app/assets/javascripts/admin/templates/email-skipped.hbs +++ b/app/assets/javascripts/admin/templates/email-skipped.hbs @@ -1,4 +1,4 @@ -{{#load-more selector=".email-list tr" action="loadMore"}} +{{#load-more selector=".email-list tr" action=(action "loadMore")}} diff --git a/app/assets/javascripts/admin/templates/embedding.hbs b/app/assets/javascripts/admin/templates/embedding.hbs index d9e97c1c5a1..45f86da9f78 100644 --- a/app/assets/javascripts/admin/templates/embedding.hbs +++ b/app/assets/javascripts/admin/templates/embedding.hbs @@ -10,7 +10,7 @@ {{#each embedding.embeddable_hosts as |host|}} - {{embeddable-host host=host deleteHost="deleteHost"}} + {{embeddable-host host=host deleteHost=(action "deleteHost")}} {{/each}} @@ -18,7 +18,7 @@

    {{i18n "admin.embedding.get_started"}}

    {{/if}} - {{d-button label="admin.embedding.add_host" action="addHost" icon="plus" class="btn-primary add-host"}} + {{d-button label="admin.embedding.add_host" action=(action "addHost") icon="plus" class="btn-primary add-host"}} {{#if showSecondary}} @@ -69,7 +69,7 @@
    {{d-button label="admin.embedding.save" - action="saveChanges" + action=(action "saveChanges") class="btn-primary embed-save" disabled=embedding.isSaving}} diff --git a/app/assets/javascripts/admin/templates/emojis.hbs b/app/assets/javascripts/admin/templates/emojis.hbs index 4cf568fd450..479b7421d67 100644 --- a/app/assets/javascripts/admin/templates/emojis.hbs +++ b/app/assets/javascripts/admin/templates/emojis.hbs @@ -3,7 +3,7 @@

    {{i18n 'admin.emoji.help'}}

    -

    {{emoji-uploader done="emojiUploaded"}}

    +

    {{emoji-uploader done=(action "emojiUploaded")}}

    {{#if sortedEmojis}}
    diff --git a/app/assets/javascripts/admin/templates/logs/screened-emails.hbs b/app/assets/javascripts/admin/templates/logs/screened-emails.hbs index 2d96b2a38e1..532e68c29cd 100644 --- a/app/assets/javascripts/admin/templates/logs/screened-emails.hbs +++ b/app/assets/javascripts/admin/templates/logs/screened-emails.hbs @@ -30,7 +30,7 @@
    {{i18n 'admin.logs.created_at'}}
    {{age-with-tooltip item.created_at}} {{item.ip_address}} - {{d-button action="clearBlock" actionParam=item icon="check" label="admin.logs.screened_emails.actions.allow"}} + {{d-button action=(action "clearBlock") actionParam=item icon="check" label="admin.logs.screened_emails.actions.allow"}} {{/each}} diff --git a/app/assets/javascripts/admin/templates/logs/screened-ip-addresses.hbs b/app/assets/javascripts/admin/templates/logs/screened-ip-addresses.hbs index ea7bc1da7d6..68a7bbc5687 100644 --- a/app/assets/javascripts/admin/templates/logs/screened-ip-addresses.hbs +++ b/app/assets/javascripts/admin/templates/logs/screened-ip-addresses.hbs @@ -3,10 +3,10 @@
    {{text-field value=filter class="ip-address-input" placeholderKey="admin.logs.screened_ips.form.filter" autocorrect="off" autocapitalize="off"}} - {{d-button class="btn-default" action="rollUp" title="admin.logs.screened_ips.roll_up.title" label="admin.logs.screened_ips.roll_up.text"}} - {{d-button class="btn-default" action="exportScreenedIpList" icon="download" title="admin.export_csv.button_title.screened_ip" label="admin.export_csv.button_text"}} + {{d-button class="btn-default" action=(action "rollUp") title="admin.logs.screened_ips.roll_up.title" label="admin.logs.screened_ips.roll_up.text"}} + {{d-button class="btn-default" action=(action "exportScreenedIpList") icon="download" title="admin.export_csv.button_title.screened_ip" label="admin.export_csv.button_text"}}
    - {{screened-ip-address-form action="recordAdded"}} + {{screened-ip-address-form action=(action "recordAdded")}}
    @@ -57,15 +57,15 @@ {{#unless item.editing}} - {{d-button class="btn-default" action="destroy" actionParam=item icon="trash-o" class="btn-danger"}} - {{d-button class="btn-default"action="edit" actionParam=item icon="pencil"}} + {{d-button class="btn-default" action=(action "destroy") actionParam=item icon="trash-o" class="btn-danger"}} + {{d-button class="btn-default"action=(action "edit") actionParam=item icon="pencil"}} {{#if item.isBlocked}} - {{d-button class="btn-default" action="allow" actionParam=item icon="check" label="admin.logs.screened_ips.actions.do_nothing"}} + {{d-button class="btn-default" action=(action "allow") actionParam=item icon="check" label="admin.logs.screened_ips.actions.do_nothing"}} {{else}} - {{d-button class="btn-default" action="block" actionParam=item icon="ban" label="admin.logs.screened_ips.actions.block"}} + {{d-button class="btn-default" action=(action "block") actionParam=item icon="ban" label="admin.logs.screened_ips.actions.block"}} {{/if}} {{else}} - {{d-button class="btn-default" action="save" actionParam=item label="admin.logs.save"}} + {{d-button class="btn-default" action=(action "save") actionParam=item label="admin.logs.save"}} {{i18n 'cancel'}} {{/unless}} 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 63ce3d41ab0..822dfce0a70 100644 --- a/app/assets/javascripts/admin/templates/logs/staff-action-logs.hbs +++ b/app/assets/javascripts/admin/templates/logs/staff-action-logs.hbs @@ -33,7 +33,7 @@ {{i18n "admin.logs.staff_actions.filter"}} {{combo-box content=userHistoryActions value=filterActionId none="admin.logs.staff_actions.all"}} {{/if}} - {{d-button class="btn-default" action="exportStaffActionLogs" label="admin.export_csv.button_text" icon="download"}} + {{d-button class="btn-default" action=(action "exportStaffActionLogs") label="admin.export_csv.button_text" icon="download"}}
    diff --git a/app/assets/javascripts/admin/templates/modal/admin-add-upload.hbs b/app/assets/javascripts/admin/templates/modal/admin-add-upload.hbs index decedce6113..f59c73b89e3 100644 --- a/app/assets/javascripts/admin/templates/modal/admin-add-upload.hbs +++ b/app/assets/javascripts/admin/templates/modal/admin-add-upload.hbs @@ -17,6 +17,6 @@ {{/d-modal-body}} diff --git a/app/assets/javascripts/admin/templates/modal/admin-create-theme.hbs b/app/assets/javascripts/admin/templates/modal/admin-create-theme.hbs index 2d5c8d69391..788aa03a8dd 100644 --- a/app/assets/javascripts/admin/templates/modal/admin-create-theme.hbs +++ b/app/assets/javascripts/admin/templates/modal/admin-create-theme.hbs @@ -25,6 +25,6 @@ {{/d-modal-body}} diff --git a/app/assets/javascripts/admin/templates/modal/admin-edit-badge-groupings.hbs b/app/assets/javascripts/admin/templates/modal/admin-edit-badge-groupings.hbs index 3776f949fbe..958467e6b73 100644 --- a/app/assets/javascripts/admin/templates/modal/admin-edit-badge-groupings.hbs +++ b/app/assets/javascripts/admin/templates/modal/admin-edit-badge-groupings.hbs @@ -26,5 +26,5 @@ diff --git a/app/assets/javascripts/admin/templates/modal/admin-import-theme.hbs b/app/assets/javascripts/admin/templates/modal/admin-import-theme.hbs index b5fbe4a0782..e2526385891 100644 --- a/app/assets/javascripts/admin/templates/modal/admin-import-theme.hbs +++ b/app/assets/javascripts/admin/templates/modal/admin-import-theme.hbs @@ -44,6 +44,6 @@ {{/d-modal-body}} diff --git a/app/assets/javascripts/admin/templates/modal/admin-moderation-history.hbs b/app/assets/javascripts/admin/templates/modal/admin-moderation-history.hbs index 4abc13e7f3c..b79f4bdf304 100644 --- a/app/assets/javascripts/admin/templates/modal/admin-moderation-history.hbs +++ b/app/assets/javascripts/admin/templates/modal/admin-moderation-history.hbs @@ -19,5 +19,5 @@ {{/conditional-loading-spinner}} {{/d-modal-body}} diff --git a/app/assets/javascripts/admin/templates/modal/admin-silence-user.hbs b/app/assets/javascripts/admin/templates/modal/admin-silence-user.hbs index 035c773897c..fc4d223ac75 100644 --- a/app/assets/javascripts/admin/templates/modal/admin-silence-user.hbs +++ b/app/assets/javascripts/admin/templates/modal/admin-silence-user.hbs @@ -27,10 +27,10 @@ diff --git a/app/assets/javascripts/admin/templates/modal/admin-staff-action-log-details.hbs b/app/assets/javascripts/admin/templates/modal/admin-staff-action-log-details.hbs index e8e8cd8d2e3..3039e95b132 100644 --- a/app/assets/javascripts/admin/templates/modal/admin-staff-action-log-details.hbs +++ b/app/assets/javascripts/admin/templates/modal/admin-staff-action-log-details.hbs @@ -2,5 +2,5 @@
    {{model.details}}
    {{/d-modal-body}} diff --git a/app/assets/javascripts/admin/templates/modal/admin-suspend-user.hbs b/app/assets/javascripts/admin/templates/modal/admin-suspend-user.hbs index cd7031bb8a6..6a1c9c28f46 100644 --- a/app/assets/javascripts/admin/templates/modal/admin-suspend-user.hbs +++ b/app/assets/javascripts/admin/templates/modal/admin-suspend-user.hbs @@ -34,10 +34,10 @@ diff --git a/app/assets/javascripts/admin/templates/modal/admin-theme-change.hbs b/app/assets/javascripts/admin/templates/modal/admin-theme-change.hbs index 3fbaf0ac865..1b6b06870ac 100644 --- a/app/assets/javascripts/admin/templates/modal/admin-theme-change.hbs +++ b/app/assets/javascripts/admin/templates/modal/admin-theme-change.hbs @@ -3,6 +3,6 @@ {{{diff}}} {{/d-modal-body}}
    diff --git a/app/assets/javascripts/admin/templates/modal/admin-uploaded-image-list.hbs b/app/assets/javascripts/admin/templates/modal/admin-uploaded-image-list.hbs index 72d0fe94b89..10af81306cb 100644 --- a/app/assets/javascripts/admin/templates/modal/admin-uploaded-image-list.hbs +++ b/app/assets/javascripts/admin/templates/modal/admin-uploaded-image-list.hbs @@ -11,5 +11,5 @@ {{/d-modal-body}} diff --git a/app/assets/javascripts/admin/templates/permalinks.hbs b/app/assets/javascripts/admin/templates/permalinks.hbs index 4dd43005997..75d3d6edced 100644 --- a/app/assets/javascripts/admin/templates/permalinks.hbs +++ b/app/assets/javascripts/admin/templates/permalinks.hbs @@ -4,7 +4,7 @@ -{{permalink-form action="recordAdded"}} +{{permalink-form action=(action "recordAdded")}}
    {{#conditional-loading-spinner condition=loading}} @@ -42,7 +42,7 @@ {{/if}} - {{d-button action="destroy" actionParam=pl icon="trash-o" class="btn-danger"}} + {{d-button action=(action "destroy") actionParam=pl icon="trash-o" class="btn-danger"}} {{/each}} diff --git a/app/assets/javascripts/admin/templates/plugins-index.hbs b/app/assets/javascripts/admin/templates/plugins-index.hbs index 5704ca76e86..873053a6e2a 100644 --- a/app/assets/javascripts/admin/templates/plugins-index.hbs +++ b/app/assets/javascripts/admin/templates/plugins-index.hbs @@ -49,7 +49,7 @@ {{#if currentUser.admin}} {{#if plugin.enabled_setting}} - {{d-button class="btn-default" action="showSettings" actionParam=plugin icon="gear" label="admin.plugins.change_settings_short"}} + {{d-button class="btn-default" action=(route-action "showSettings") actionParam=plugin icon="gear" label="admin.plugins.change_settings_short"}} {{/if}} {{/if}} diff --git a/app/assets/javascripts/admin/templates/plugins.hbs b/app/assets/javascripts/admin/templates/plugins.hbs index 12d9c8c8f64..b2e0d775480 100644 --- a/app/assets/javascripts/admin/templates/plugins.hbs +++ b/app/assets/javascripts/admin/templates/plugins.hbs @@ -1,16 +1,16 @@
    - {{d-button action="toggleMenu" class="menu-toggle" icon="bars"}} + {{d-button action=(action "toggleMenu") class="menu-toggle" icon="bars"}} {{#if currentUser.admin}} {{d-button label="admin.plugins.change_settings" icon="gear" class="btn-default settings-button" - action="showSettings"}} + action=(route-action "showSettings")}} {{/if}}
    - +
    diff --git a/app/assets/javascripts/admin/templates/site-settings.hbs b/app/assets/javascripts/admin/templates/site-settings.hbs index 4cdf577962a..56ddbcd5516 100644 --- a/app/assets/javascripts/admin/templates/site-settings.hbs +++ b/app/assets/javascripts/admin/templates/site-settings.hbs @@ -1,9 +1,9 @@
    - {{d-button action="toggleMenu" class="menu-toggle" icon="bars"}} + {{d-button action=(action "toggleMenu") class="menu-toggle" icon="bars"}} {{text-field id="setting-filter" value=filter placeholderKey="type_to_filter" class="no-blur"}} - {{d-button class="btn-default" id="clear-filter" action="clearFilter" label="admin.site_settings.clear_filter"}} + {{d-button class="btn-default" id="clear-filter" action=(action "clearFilter") label="admin.site_settings.clear_filter"}}
    @@ -18,6 +18,6 @@ {{/if}} {{#each siteTexts as |siteText|}} - {{site-text-summary siteText=siteText editAction="edit" term=q searchRegex=siteTexts.extras.regex}} + {{site-text-summary siteText=siteText editAction=(action "edit") term=q searchRegex=siteTexts.extras.regex}} {{/each}} {{/conditional-loading-spinner}} diff --git a/app/assets/javascripts/admin/templates/user-fields.hbs b/app/assets/javascripts/admin/templates/user-fields.hbs index 72e4933052c..a766d86269b 100644 --- a/app/assets/javascripts/admin/templates/user-fields.hbs +++ b/app/assets/javascripts/admin/templates/user-fields.hbs @@ -9,15 +9,15 @@ fieldTypes=fieldTypes firstField=sortedFields.firstObject lastField=sortedFields.lastObject - destroyAction="destroy" - moveUpAction="moveUp" - moveDownAction="moveDown"}} + destroyAction=(action "destroy") + moveUpAction=(action "moveUp") + moveDownAction=(action "moveDown")}} {{/each}} {{/if}} {{d-button disabled=createDisabled class="btn-primary" - action="createField" + action=(action "createField") label="admin.user_fields.create" icon="plus"}} diff --git a/app/assets/javascripts/admin/templates/user-index.hbs b/app/assets/javascripts/admin/templates/user-index.hbs index c5584645fe0..f736dd988d4 100644 --- a/app/assets/javascripts/admin/templates/user-index.hbs +++ b/app/assets/javascripts/admin/templates/user-index.hbs @@ -8,11 +8,11 @@ {{/if}} {{#if model.can_view_action_logs}} - {{d-button action="viewActionLogs" class="btn-default" actionParam=model.username icon="list-alt" label="admin.user.action_logs"}} + {{d-button action=(action "viewActionLogs") class="btn-default" actionParam=model.username icon="list-alt" label="admin.user.action_logs"}} {{/if}} {{#if model.active}} {{#if currentUser.admin}} - {{d-button class="btn-default" action="logOut" icon="power-off" label="admin.user.log_out"}} + {{d-button class="btn-default" action=(action "logOut") icon="power-off" label="admin.user.log_out"}} {{/if}} {{/if}} {{plugin-outlet name="admin-user-controls-after" args=(hash model=model) tagName="" connectorTagName=""}} @@ -44,7 +44,7 @@ {{#if model.email}} {{model.email}} {{else}} - {{d-button class="btn-default" action="checkEmail" actionParam=model icon="envelope-o" label="admin.users.check_email.text" title="admin.users.check_email.title"}} + {{d-button class="btn-default" action=(route-action "checkEmail") actionParam=model icon="envelope-o" label="admin.users.check_email.text" title="admin.users.check_email.title"}} {{/if}}
    @@ -64,7 +64,7 @@ {{i18n 'user.email.no_secondary'}} {{/if}} {{else}} - {{d-button action="checkEmail" + {{d-button action=(route-action "checkEmail") class="btn-default" actionParam=model icon="envelope-o" @@ -79,7 +79,7 @@
    {{model.bounceScore}}
    {{#if model.canResetBounceScore}} - {{d-button class="btn-default" action="resetBounceScore" label="admin.user.reset_bounce_score.label" title="admin.user.reset_bounce_score.title"}} + {{d-button class="btn-default" action=(action "resetBounceScore") label="admin.user.reset_bounce_score.label" title="admin.user.reset_bounce_score.title"}} {{/if}} {{model.bounceScoreExplanation}}
    @@ -91,7 +91,7 @@ {{#if associatedAccountsLoaded}} {{associatedAccounts}} {{else}} - {{d-button class="btn-default" action="checkEmail" actionParam=model icon="envelope-o" label="admin.users.check_email.text" title="admin.users.check_email.title"}} + {{d-button class="btn-default" action=(route-action "checkEmail") actionParam=model icon="envelope-o" label="admin.users.check_email.text" title="admin.users.check_email.title"}} {{/if}} @@ -117,7 +117,7 @@
    {{model.ip_address}}
    {{#if currentUser.staff}} - {{d-button class="btn-default" action="refreshBrowsers" label="admin.user.refresh_browsers"}} + {{d-button class="btn-default" action=(action "refreshBrowsers") label="admin.user.refresh_browsers"}} {{ip-lookup ip=model.ip_address userId=model.id}} {{/if}}
    @@ -156,7 +156,7 @@
    {{#if canDisableSecondFactor}} - {{d-button class="btn-default" action="disableSecondFactor" icon="unlock-alt" label="user.second_factor.disable"}} + {{d-button class="btn-default" action=(action "disableSecondFactor") icon="unlock-alt" label="user.second_factor.disable"}} {{/if}}
    @@ -201,7 +201,7 @@ {{i18n 'admin.user.approve_success'}} {{else}} {{#if model.can_approve}} - {{d-button class="btn-default" action="approve" icon="check" label="admin.user.approve"}} + {{d-button class="btn-default" action=(action "approve") icon="check" label="admin.user.approve"}} {{/if}} {{/if}} @@ -214,15 +214,15 @@
    {{#if model.active}} {{#if model.can_deactivate}} - {{d-button class="btn-default" action="deactivate" label="admin.user.deactivate_account"}} + {{d-button class="btn-default" action=(action "deactivate") label="admin.user.deactivate_account"}} {{i18n 'admin.user.deactivate_explanation'}} {{/if}} {{else}} {{#if model.can_send_activation_email}} - {{d-button class="btn-default" action="sendActivationEmail" icon="envelope" label="admin.user.send_activation_email"}} + {{d-button class="btn-default" action=(action "sendActivationEmail") icon="envelope" label="admin.user.send_activation_email"}} {{/if}} {{#if model.can_activate}} - {{d-button class="btn-default" action="activate" icon="check" label="admin.user.activate"}} + {{d-button class="btn-default" action=(action "activate") icon="check" label="admin.user.activate"}} {{/if}} {{/if}}
    @@ -240,15 +240,15 @@ {{#if model.api_key}}
    {{model.api_key.key}} - {{d-button class="btn-default" action="regenerateApiKey" icon="undo" label="admin.api.regenerate"}} - {{d-button class="btn-default" action="revokeApiKey" icon="times" label="admin.api.revoke"}} + {{d-button class="btn-default" action=(action "regenerateApiKey") icon="undo" label="admin.api.regenerate"}} + {{d-button class="btn-default" action=(action "revokeApiKey") icon="times" label="admin.api.revoke"}}
    {{else}}
    - {{d-button class="btn-default" action="generateApiKey" icon="key" label="admin.api.generate"}} + {{d-button class="btn-default" action=(action "generateApiKey") icon="key" label="admin.api.generate"}}
    {{/if}} @@ -259,10 +259,10 @@
    {{i18n-yes-no model.admin}}
    {{#if model.can_revoke_admin}} - {{d-button class="btn-default" action="revokeAdmin" icon="shield" label="admin.user.revoke_admin"}} + {{d-button class="btn-default" action=(action "revokeAdmin") icon="shield" label="admin.user.revoke_admin"}} {{/if}} {{#if model.can_grant_admin}} - {{d-button class="btn-default" action="grantAdmin" icon="shield" label="admin.user.grant_admin"}} + {{d-button class="btn-default" action=(action "grantAdmin") icon="shield" label="admin.user.grant_admin"}} {{/if}}
    @@ -272,10 +272,10 @@
    {{i18n-yes-no model.moderator}}
    {{#if model.can_revoke_moderation}} - {{d-button class="btn-default" action="revokeModeration" icon="shield" label="admin.user.revoke_moderation"}} + {{d-button class="btn-default" action=(action "revokeModeration") icon="shield" label="admin.user.revoke_moderation"}} {{/if}} {{#if model.can_grant_moderation}} - {{d-button class="btn-default" action="grantModeration" icon="shield" label="admin.user.grant_moderation"}} + {{d-button class="btn-default" action=(action "grantModeration") icon="shield" label="admin.user.grant_moderation"}} {{/if}}
    @@ -286,8 +286,8 @@ {{combo-box content=site.trustLevels value=model.trust_level nameProperty="detailedName"}} {{#if model.dirty}}
    - {{d-button class="ok no-text" action="saveTrustLevel" icon="check"}} - {{d-button class="cancel no-text" action="restoreTrustLevel" icon="times"}} + {{d-button class="ok no-text" action=(action "saveTrustLevel") icon="check"}} + {{d-button class="cancel no-text" action=(action "restoreTrustLevel") icon="times"}}
    {{/if}} @@ -295,10 +295,10 @@ {{#if model.canLockTrustLevel}} {{#if hasLockedTrustLevel}} {{d-icon "lock" title="admin.user.trust_level_locked_tip"}} - {{d-button class="btn-default" action="lockTrustLevel" actionParam=false label="admin.user.unlock_trust_level"}} + {{d-button class="btn-default" action=(action "lockTrustLevel") actionParam=false label="admin.user.unlock_trust_level"}} {{else}} {{d-icon "unlock" title="admin.user.trust_level_unlocked_tip"}} - {{d-button class="btn-default" action="lockTrustLevel" actionParam=true label="admin.user.lock_trust_level"}} + {{d-button class="btn-default" action=(action "lockTrustLevel") actionParam=true label="admin.user.lock_trust_level"}} {{/if}} {{/if}} {{#if model.tl3Requirements}} @@ -367,7 +367,7 @@ {{#if model.silenced}} {{d-button class="btn-danger unsilence-user" - action="unsilence" + action=(action "unsilence") icon="microphone-slash" label="admin.user.unsilence"}} {{i18n 'admin.user.silence_explanation'}} @@ -429,8 +429,8 @@ {{#if customGroupsDirty}}
    - {{d-button icon="check" class="ok" action="saveCustomGroups"}} - {{d-button icon="times" class="cancel" action="resetCustomGroups"}} + {{d-button icon="check" class="ok" action=(action "saveCustomGroups")}} + {{d-button icon="times" class="cancel" action=(action "resetCustomGroups")}}
    {{/if}} @@ -442,8 +442,8 @@ {{#if primaryGroupDirty}}
    - {{d-button icon="check" class="ok" action="savePrimaryGroup"}} - {{d-button icon="times" class="cancel" action="resetPrimaryGroup"}} + {{d-button icon="check" class="ok" action=(action "savePrimaryGroup")}} + {{d-button icon="times" class="cancel" action=(action "resetPrimaryGroup")}}
    {{/if}} @@ -480,7 +480,7 @@
    {{#if model.can_delete_all_posts}} {{#if model.post_count}} - {{d-button class="btn-danger" action="deleteAllPosts" icon="trash-o" label="admin.user.delete_all_posts"}} + {{d-button class="btn-danger" action=(action "deleteAllPosts") icon="trash-o" label="admin.user.delete_all_posts"}} {{/if}} {{else}} {{deleteAllPostsExplanation}} @@ -563,7 +563,7 @@
    {{#if model.active}} {{#if model.can_impersonate}} - {{d-button class="btn-danger" action="impersonate" icon="crosshairs" label="admin.impersonate.title" title="admin.impersonate.help"}} + {{d-button class="btn-danger" action=(action "impersonate") icon="crosshairs" label="admin.impersonate.title" title="admin.impersonate.help"}} {{/if}} {{/if}} @@ -571,14 +571,14 @@ {{d-button label="admin.user.anonymize" icon="exclamation-triangle" class="btn-danger" - action="anonymize"}} + action=(action "anonymize")}} {{/if}} {{#if model.canBeDeleted}} {{d-button label="admin.user.delete" icon="exclamation-triangle" class="btn-danger" - action="destroy"}} + action=(action "destroy")}} {{/if}}
    diff --git a/app/assets/javascripts/admin/templates/users-list.hbs b/app/assets/javascripts/admin/templates/users-list.hbs index 92c5c689ad8..d4d5be049f8 100644 --- a/app/assets/javascripts/admin/templates/users-list.hbs +++ b/app/assets/javascripts/admin/templates/users-list.hbs @@ -14,10 +14,10 @@ {{nav-item route='groups' label='groups.index.title'}}
    {{#unless siteSettings.enable_sso}} - {{d-button class="btn-default" action="sendInvites" title="admin.invite.button_title" icon="user-plus" label="admin.invite.button_text"}} + {{d-button class="btn-default" action=(route-action "sendInvites") title="admin.invite.button_title" icon="user-plus" label="admin.invite.button_text"}} {{/unless}} {{#if currentUser.admin}} - {{d-button class="btn-default" action="exportUsers" title="admin.export_csv.button_title.user" icon="download" label="admin.export_csv.button_text"}} + {{d-button class="btn-default" action=(route-action "exportUsers") title="admin.export_csv.button_title.user" icon="download" label="admin.export_csv.button_text"}} {{/if}}
    diff --git a/app/assets/javascripts/admin/templates/watched-words-action.hbs b/app/assets/javascripts/admin/templates/watched-words-action.hbs index a9481675c00..ad04b20c5b9 100644 --- a/app/assets/javascripts/admin/templates/watched-words-action.hbs +++ b/app/assets/javascripts/admin/templates/watched-words-action.hbs @@ -5,11 +5,11 @@
    {{watched-word-form actionKey=actionNameKey - action="recordAdded" + action=(action "recordAdded") filteredContent=filteredContent regularExpressions=adminWatchedWords.regularExpressions}} -{{watched-word-uploader uploading=uploading actionKey=actionNameKey done="uploadComplete"}} +{{watched-word-uploader uploading=uploading actionKey=actionNameKey done=(action "uploadComplete")}}