Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-21 17:00:29 +01:00
COMPATIBILITY: Update composer integration to prevent exceptions
Dieser Commit ist enthalten in:
Ursprung
d4d27c0bf3
Commit
c1db1442b7
5 geänderte Dateien mit 52 neuen und 40 gelöschten Zeilen
|
@ -2,8 +2,8 @@ import {
|
|||
default as computed,
|
||||
observes,
|
||||
} from "discourse-common/utils/decorators";
|
||||
import EmberObject from "@ember/object";
|
||||
import Component from "@ember/component";
|
||||
import EmberObject, { action } from "@ember/object";
|
||||
|
||||
export default Component.extend({
|
||||
showPreview: false,
|
||||
|
@ -34,15 +34,23 @@ export default Component.extend({
|
|||
: "wizard_composer.show_preview";
|
||||
},
|
||||
|
||||
actions: {
|
||||
togglePreview() {
|
||||
this.toggleProperty("showPreview");
|
||||
},
|
||||
@action
|
||||
importQuote() {},
|
||||
|
||||
groupsMentioned() {},
|
||||
afterRefresh() {},
|
||||
cannotSeeMention() {},
|
||||
importQuote() {},
|
||||
showUploadSelector() {},
|
||||
@action
|
||||
groupsMentioned() {},
|
||||
|
||||
@action
|
||||
afterRefresh() {},
|
||||
|
||||
@action
|
||||
cannotSeeMention() {},
|
||||
|
||||
@action
|
||||
showUploadSelector() {},
|
||||
|
||||
@action
|
||||
togglePreview() {
|
||||
this.toggleProperty("showPreview");
|
||||
},
|
||||
});
|
||||
|
|
|
@ -1,21 +1,21 @@
|
|||
{{d-editor
|
||||
tabindex=field.tabindex
|
||||
value=composer.reply
|
||||
placeholderOverride=replyPlaceholder
|
||||
previewUpdated=(action "previewUpdated")
|
||||
markdownOptions=markdownOptions
|
||||
extraButtons=(action "extraButtons")
|
||||
importQuote=(action "importQuote")
|
||||
showUploadModal=(action "showUploadModal")
|
||||
togglePreview=(action "togglePreview")
|
||||
validation=validation
|
||||
loading=composer.loading
|
||||
showLink=showLink
|
||||
wizardComposer=true
|
||||
fieldId=field.id
|
||||
disabled=disableTextarea
|
||||
outletArgs=(hash composer=composer editorType="composer")
|
||||
}}
|
||||
<DEditor
|
||||
@tabindex={{field.tabindex}}
|
||||
@value={{composer.reply}}
|
||||
@placeholderOverride={{replyPlaceholder}}
|
||||
@previewUpdated={{this.previewUpdated}}
|
||||
@markdownOptions={{markdownOptions}}
|
||||
@extraButtons={{this.extraButtons}}
|
||||
@importQuote={{this.importQuote}}
|
||||
@showUploadModal={{this.showUploadModal}}
|
||||
@togglePreview={{this.togglePreview}}
|
||||
@validation={{validation}}
|
||||
@loading={{composer.loading}}
|
||||
@showLink={{showLink}}
|
||||
@wizardComposer={{true}}
|
||||
@fieldId={{field.id}}
|
||||
@disabled={{disableTextarea}}
|
||||
@outletArgs={{hash composer=composer editorType="composer"}}
|
||||
/>
|
||||
|
||||
<input
|
||||
type="file"
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
{{custom-wizard-composer-editor
|
||||
field=field
|
||||
composer=composer
|
||||
wizard=wizard
|
||||
fieldClass=fieldClass
|
||||
groupsMentioned=(action "groupsMentioned")
|
||||
cannotSeeMention=(action "cannotSeeMention")
|
||||
importQuote=(action "importQuote")
|
||||
togglePreview=(action "togglePreview")
|
||||
afterRefresh=(action "afterRefresh")
|
||||
}}
|
||||
<CustomWizardComposerEditor
|
||||
@field={{field}}
|
||||
@composer={{composer}}
|
||||
@wizard={{wizard}}
|
||||
@fieldClass={{fieldClass}}
|
||||
@groupsMentioned={{this.groupsMentioned}}
|
||||
@cannotSeeMention={{this.cannotSeeMention}}
|
||||
@importQuote={{this.importQuote}}
|
||||
@togglePreview={{this.togglePreview}}
|
||||
@afterRefresh={{this.afterRefresh}}
|
||||
/>
|
||||
|
||||
<div class="bottom-bar">
|
||||
<button
|
||||
|
|
|
@ -103,6 +103,10 @@ body.custom-wizard {
|
|||
.btn.italic {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.toolbar-popup-menu-options {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.d-editor-spacer {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
# name: discourse-custom-wizard
|
||||
# about: Forms for Discourse. Better onboarding, structured posting, data enrichment, automated actions and much more.
|
||||
# version: 2.8.5
|
||||
# version: 2.8.6
|
||||
# authors: Angus McLeod, Faizaan Gagan, Robert Barrow, Keegan George, Kaitlin Maddever, Juan Marcos Gutierrez Ramos
|
||||
# url: https://github.com/paviliondev/discourse-custom-wizard
|
||||
# contact_emails: development@pavilion.tech
|
||||
|
|
Laden …
In neuem Issue referenzieren