Skip to content

Commit 6d5e7e9

Browse files
committed
Address deprecations
1 parent 520dbc6 commit 6d5e7e9

File tree

186 files changed

+682
-679
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

186 files changed

+682
-679
lines changed

assets/javascripts/discourse/templates/components/custom-field-input.hbs renamed to assets/javascripts/discourse/components/custom-field-input.hbs

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
{{#if showInputs}}
1+
{{#if this.showInputs}}
22
<td>
33
{{wizard-subscription-selector
4-
value=field.klass
4+
value=this.field.klass
55
feature="custom_field"
66
attribute="klass"
7-
onChange=(action (mut field.klass))
7+
onChange=(action (mut this.field.klass))
88
options=(hash none="admin.wizard.custom_field.klass.select")
99
}}
1010
</td>
1111
<td>
1212
{{wizard-subscription-selector
13-
value=field.type
13+
value=this.field.type
1414
feature="custom_field"
1515
attribute="type"
16-
onChange=(action (mut field.type))
16+
onChange=(action (mut this.field.type))
1717
options=(hash none="admin.wizard.custom_field.type.select")
1818
}}
1919
</td>
@@ -25,48 +25,48 @@
2525
</td>
2626
<td class="multi-select">
2727
{{multi-select
28-
value=field.serializers
29-
content=serializerContent
30-
onChange=(action (mut field.serializers))
28+
value=this.field.serializers
29+
content=this.serializerContent
30+
onChange=(action (mut this.field.serializers))
3131
options=(hash none="admin.wizard.custom_field.serializers.select")
3232
}}
3333
</td>
3434
<td class="actions">
35-
{{#if loading}}
35+
{{#if this.loading}}
3636
{{loading-spinner size="small"}}
3737
{{else}}
38-
{{#if saveIcon}}
39-
{{d-icon saveIcon}}
38+
{{#if this.saveIcon}}
39+
{{d-icon this.saveIcon}}
4040
{{/if}}
4141
{{/if}}
4242
{{d-button
4343
action=(action "destroy")
4444
icon="trash-alt"
4545
class="destroy"
46-
disabled=destroyDisabled
46+
disabled=this.destroyDisabled
4747
}}
4848
{{d-button
4949
icon="save"
5050
action=(action "save")
51-
disabled=saveDisabled
51+
disabled=this.saveDisabled
5252
class="save"
5353
}}
54-
{{d-button action=(action "close") icon="times" disabled=closeDisabled}}
54+
{{d-button action=(action "close") icon="times" disabled=this.closeDisabled}}
5555
</td>
5656
{{else}}
57-
<td><label>{{field.klass}}</label></td>
58-
<td><label>{{field.type}}</label></td>
59-
<td class="input"><label>{{field.name}}</label></td>
57+
<td><label>{{this.field.klass}}</label></td>
58+
<td><label>{{this.field.type}}</label></td>
59+
<td class="input"><label>{{this.field.name}}</label></td>
6060
<td class="multi-select">
61-
{{#if isExternal}}
61+
{{#if this.isExternal}}
6262
&mdash;
6363
{{else}}
64-
{{#each field.serializers as |serializer|}}
64+
{{#each this.field.serializers as |serializer|}}
6565
<label>{{serializer}}</label>
6666
{{/each}}
6767
{{/if}}
6868
</td>
69-
{{#if isExternal}}
69+
{{#if this.isExternal}}
7070
<td class="external">
7171
<label title={{i18n "admin.wizard.custom_field.external.title"}}>
7272
{{i18n "admin.wizard.custom_field.external.label"}}
Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
<div class={{this.fieldClass}}>
22
<DEditor
3-
@tabindex={{field.tabindex}}
4-
@value={{composer.reply}}
5-
@placeholderOverride={{replyPlaceholder}}
3+
@tabindex={{this.field.tabindex}}
4+
@value={{this.composer.reply}}
5+
@placeholderOverride={{this.replyPlaceholder}}
66
@previewUpdated={{this.previewUpdated}}
7-
@markdownOptions={{markdownOptions}}
7+
@markdownOptions={{this.markdownOptions}}
88
@extraButtons={{this.extraButtons}}
99
@importQuote={{this.importQuote}}
1010
@showUploadModal={{this.showUploadModal}}
1111
@togglePreview={{this.togglePreview}}
12-
@validation={{validation}}
13-
@loading={{composer.loading}}
14-
@showLink={{showLink}}
12+
@validation={{this.validation}}
13+
@loading={{this.composer.loading}}
14+
@showLink={{this.showLink}}
1515
@wizardComposer={{true}}
16-
@fieldId={{field.id}}
17-
@disabled={{disableTextarea}}
18-
@outletArgs={{hash composer=composer editorType="composer"}}
16+
@fieldId={{this.field.id}}
17+
@disabled={{this.disableTextarea}}
18+
@outletArgs={{hash composer=this.composer editorType="composer"}}
1919
/>
2020

2121
<input
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{{#unless this.timeFirst}}
2+
{{custom-wizard-date-input
3+
date=this.date
4+
relativeDate=this.relativeDate
5+
onChange=(action "onChangeDate")
6+
tabindex=this.dateTabindex
7+
}}
8+
{{/unless}}
9+
10+
{{#if this.showTime}}
11+
{{custom-wizard-time-input
12+
date=this.date
13+
relativeDate=this.relativeDate
14+
onChange=(action "onChangeTime")
15+
tabindex=this.timeTabindex
16+
}}
17+
{{/if}}
18+
19+
{{#if this.timeFirst}}
20+
{{custom-wizard-date-input
21+
date=this.date
22+
relativeDate=this.relativeDate
23+
onChange=(action "onChangeDate")
24+
tabindex=this.dateTabindex
25+
}}
26+
{{/if}}
27+
28+
{{#if this.clearable}}
29+
{{d-button class="clear-date-time" icon="times" action=(action "onClear")}}
30+
{{/if}}

assets/javascripts/discourse/templates/components/custom-wizard-editor.hbs renamed to assets/javascripts/discourse/components/custom-wizard-editor.hbs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
<div class="d-editor-overlay hidden"></div>
22

33
<div class="d-editor-container">
4-
{{#if showPreview}}
5-
<div class="d-editor-preview-wrapper {{if forcePreview 'force-preview'}}">
4+
{{#if this.showPreview}}
5+
<div class="d-editor-preview-wrapper {{if this.forcePreview 'force-preview'}}">
66
<div class="d-editor-preview">
7-
{{html-safe preview}}
7+
{{html-safe this.preview}}
88
</div>
99
</div>
1010
{{else}}
1111
<div class="d-editor-textarea-wrapper">
1212
<div class="d-editor-button-bar">
13-
{{#each toolbar.groups as |group|}}
13+
{{#each this.toolbar.groups as |group|}}
1414
{{#each group.buttons as |b|}}
1515
{{#if b.popupMenu}}
1616
{{toolbar-popup-menu-options
17-
onPopupMenuAction=onPopupMenuAction
17+
onPopupMenuAction=this.onPopupMenuAction
1818
onExpand=(action b.action b)
1919
class=b.className
20-
content=popupMenuOptions
20+
content=this.popupMenuOptions
2121
options=(hash popupTitle=b.title icon=b.icon)
2222
}}
2323
{{else}}
@@ -42,7 +42,7 @@
4242
{{/each}}
4343
</div>
4444

45-
{{conditional-loading-spinner condition=loading}}
45+
{{conditional-loading-spinner condition=this.loading}}
4646
<Textarea
4747
tabindex={{this.tabindex}}
4848
@value={{this.value}}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{{custom-wizard-category-selector
2+
categories=this.categories
3+
class=this.fieldClass
4+
whitelist=this.field.content
5+
onChange=(action (mut this.categories))
6+
tabindex=this.field.tabindex
7+
options=(hash maximum=this.field.limit)
8+
}}

0 commit comments

Comments
 (0)