DEV: Replace `HideModalTrigger` with JS logic (#21746)
No need to set up a whole component here - we can just call the necessary JS directly from the `closeModal` function. (extracted from https://github.com/discourse/discourse/pull/21304)
This commit is contained in:
parent
f0dfe56870
commit
db54b80275
|
@ -1,7 +0,0 @@
|
||||||
import Component from "@ember/component";
|
|
||||||
export default Component.extend({
|
|
||||||
didInsertElement() {
|
|
||||||
this._super(...arguments);
|
|
||||||
$(".d-modal.fixed-modal").modal("hide");
|
|
||||||
},
|
|
||||||
});
|
|
|
@ -168,6 +168,7 @@ const ApplicationRoute = DiscourseRoute.extend(OpenComposer, {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.render("hide-modal", { into: "modal", outlet: "modalBody" });
|
this.render("hide-modal", { into: "modal", outlet: "modalBody" });
|
||||||
|
$(".d-modal.fixed-modal").modal("hide");
|
||||||
|
|
||||||
if (controllerName) {
|
if (controllerName) {
|
||||||
const controller = getOwner(this).lookup(
|
const controller = getOwner(this).lookup(
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
<HideModalTrigger />
|
|
Loading…
Reference in New Issue