From 1b3dd5a6bac140d91b7b34736b20c836ce550b41 Mon Sep 17 00:00:00 2001 From: Angus McLeod Date: Wed, 5 Feb 2020 17:58:35 +1100 Subject: [PATCH] Revert use of options && other combo-box cleanups --- .../discourse/templates/admin-wizard.hbs | 4 +-- .../discourse/templates/admin-wizards-api.hbs | 16 +++------ .../components/wizard-custom-action.hbs | 36 +++++-------------- .../components/wizard-custom-field.hbs | 12 ++----- .../components/wizard-composer-editor.js.es6 | 9 ----- .../components/wizard-field-composer.js.es6 | 6 +--- .../components/wizard-composer-editor.hbs | 3 -- .../components/wizard-field-composer.hbs | 3 -- 8 files changed, 18 insertions(+), 71 deletions(-) diff --git a/assets/javascripts/discourse/templates/admin-wizard.hbs b/assets/javascripts/discourse/templates/admin-wizard.hbs index 768e2c58..2d1f2d0d 100644 --- a/assets/javascripts/discourse/templates/admin-wizard.hbs +++ b/assets/javascripts/discourse/templates/admin-wizard.hbs @@ -111,9 +111,7 @@ content=model.themes valueProperty='id' value=model.theme_id - options=(hash - none='admin.wizard.no_theme' - )}} + none='admin.wizard.no_theme'}} diff --git a/assets/javascripts/discourse/templates/admin-wizards-api.hbs b/assets/javascripts/discourse/templates/admin-wizards-api.hbs index cf4ddf9c..06980f42 100644 --- a/assets/javascripts/discourse/templates/admin-wizards-api.hbs +++ b/assets/javascripts/discourse/templates/admin-wizards-api.hbs @@ -92,9 +92,7 @@ {{combo-box value=api.authType content=authorizationTypes - options=(hash - none='admin.wizard.api.auth.type_none' - )}} + none='admin.wizard.api.auth.type_none'}} @@ -248,21 +246,15 @@ {{combo-box content=endpointMethods value=endpoint.method - options=(hash - none="admin.wizard.api.endpoint.method" - )}} + none="admin.wizard.api.endpoint.method"}} {{combo-box content=contentTypes value=endpoint.content_type - options=(hash - none="admin.wizard.api.endpoint.content_type" - )}} + none="admin.wizard.api.endpoint.content_type"}} {{multi-select content=successCodes values=endpoint.success_codes - options=(hash - none="admin.wizard.api.endpoint.success_codes" - )}} + none="admin.wizard.api.endpoint.success_codes"}} diff --git a/assets/javascripts/discourse/templates/components/wizard-custom-action.hbs b/assets/javascripts/discourse/templates/components/wizard-custom-action.hbs index 4cffbb01..1350eee5 100644 --- a/assets/javascripts/discourse/templates/components/wizard-custom-action.hbs +++ b/assets/javascripts/discourse/templates/components/wizard-custom-action.hbs @@ -15,9 +15,7 @@ {{combo-box value=action.type content=types - options=(hash - none="admin.wizard.field.type" - )}} + none="admin.wizard.field.type"}} @@ -32,9 +30,7 @@ content=availableFields nameProperty="label" isDisabled=action.custom_title_enabled - options=(hash - none='admin.wizard.select_field' - )}} + none='admin.wizard.select_field'}}
{{input type='checkbox' checked=action.custom_title_enabled}} {{i18n 'admin.wizard.action.custom_title'}} @@ -55,9 +51,7 @@ content=availableFields nameProperty='label' isDisabled=action.post_builder - options=(hash - none='admin.wizard.select_field' - )}} + none='admin.wizard.select_field'}}
{{input type='checkbox' checked=action.post_builder}} {{i18n 'admin.wizard.action.post_builder.checkbox'}} @@ -105,9 +99,7 @@ value=action.category_id content=categoryFields nameProperty="label" - options=(hash - none='admin.wizard.select_field' - )}} + none='admin.wizard.select_field'}} {{/if}}
@@ -142,9 +134,7 @@ value=action.custom_tag_field content=tagFields nameProperty="label" - options=(hash - none='admin.wizard.select_field' - )}} + none='admin.wizard.select_field'}}
{{/if}}
@@ -185,9 +175,7 @@ value=action.required content=availableFields nameProperty='label' - options=(hash - none='admin.wizard.select_field' - )}} + none='admin.wizard.select_field'}}
@@ -232,9 +220,7 @@ value=action.api content=availableApis isDisabled=action.custom_title_enabled - options=(hash - none='admin.wizard.action.send_to_api.select_an_api' - )}} + none='admin.wizard.action.send_to_api.select_an_api'}}
@@ -247,9 +233,7 @@ value=action.api_endpoint content=availableEndpoints isDisabled=apiEmpty - options=(hash - none='admin.wizard.action.send_to_api.select_an_endpoint' - )}} + none='admin.wizard.action.send_to_api.select_an_endpoint'}} @@ -277,9 +261,7 @@ content=availableFields isDisabled=action.custom_group_enabled nameProperty="label" - options=(hash - none='admin.wizard.select_field' - )}} + none='admin.wizard.select_field'}}
{{input type='checkbox' checked=action.custom_group_enabled}} {{i18n 'admin.wizard.action.add_to_group.custom_group'}} diff --git a/assets/javascripts/discourse/templates/components/wizard-custom-field.hbs b/assets/javascripts/discourse/templates/components/wizard-custom-field.hbs index bc073b26..aa91b615 100644 --- a/assets/javascripts/discourse/templates/components/wizard-custom-field.hbs +++ b/assets/javascripts/discourse/templates/components/wizard-custom-field.hbs @@ -51,9 +51,7 @@ {{combo-box value=field.type content=types - options=(hash - none="admin.wizard.field.type" - )}} + none="admin.wizard.field.type"}}
@@ -87,9 +85,7 @@ {{combo-box value=field.choices_type content=choicesTypes - options=(hash - none="admin.wizard.field.choices_type" - )}} + none="admin.wizard.field.choices_type"}} {{#if choicesTranslation}}
@@ -105,9 +101,7 @@ {{combo-box value=field.choices_preset content=presetChoices - options=(hash - none='admin.wizard.none' - )}} + none='admin.wizard.none'}}
{{i18n 'admin.wizard.field.choices_preset.filter'}}
diff --git a/assets/javascripts/wizard/components/wizard-composer-editor.js.es6 b/assets/javascripts/wizard/components/wizard-composer-editor.js.es6 index 4ec87cb3..8be6ebb7 100644 --- a/assets/javascripts/wizard/components/wizard-composer-editor.js.es6 +++ b/assets/javascripts/wizard/components/wizard-composer-editor.js.es6 @@ -64,15 +64,6 @@ export default ComposerEditor.extend({ sendAction: this.showUploadModal }); } - - toolbar.addButton({ - id: "options", - group: "extras", - icon: "cog", - title: "composer.options", - sendAction: this.onExpandPopupMenuOptions.bind(this), - popupMenu: true - }); } } }) \ No newline at end of file diff --git a/assets/javascripts/wizard/components/wizard-field-composer.js.es6 b/assets/javascripts/wizard/components/wizard-field-composer.js.es6 index 50e09301..9227faef 100644 --- a/assets/javascripts/wizard/components/wizard-field-composer.js.es6 +++ b/assets/javascripts/wizard/components/wizard-field-composer.js.es6 @@ -30,15 +30,11 @@ export default Ember.Component.extend({ groupsMentioned() { }, afterRefresh() { - }, - storeToolbarState() { - }, + }, cannotSeeMention() { }, importQuote() { }, - onPopupMenuAction() { - }, showUploadSelector() { } } diff --git a/assets/javascripts/wizard/templates/components/wizard-composer-editor.hbs b/assets/javascripts/wizard/templates/components/wizard-composer-editor.hbs index 64504e8d..87af2ccb 100644 --- a/assets/javascripts/wizard/templates/components/wizard-composer-editor.hbs +++ b/assets/javascripts/wizard/templates/components/wizard-composer-editor.hbs @@ -12,8 +12,5 @@ loading=composer.loading showLink=showLink composerEvents=true - onExpandPopupMenuOptions=(action "onExpandPopupMenuOptions") - onPopupMenuAction=onPopupMenuAction - popupMenuOptions=popupMenuOptions disabled=disableTextarea outletArgs=(hash composer=composer editorType="composer")}} \ No newline at end of file diff --git a/assets/javascripts/wizard/templates/components/wizard-field-composer.hbs b/assets/javascripts/wizard/templates/components/wizard-field-composer.hbs index 0f89e972..fdbbde84 100644 --- a/assets/javascripts/wizard/templates/components/wizard-field-composer.hbs +++ b/assets/javascripts/wizard/templates/components/wizard-field-composer.hbs @@ -1,8 +1,5 @@ {{wizard-composer-editor replyPlaceholder=field.placeholder composer=composer - storeToolbarState=(action "storeToolbarState") - onPopupMenuAction=(action "onPopupMenuAction") - showUploadModal=(action "showUploadSelector") groupsMentioned=(action "groupsMentioned") cannotSeeMention=(action "cannotSeeMention") importQuote=(action "importQuote")