tidying js & scss
This commit is contained in:
parent
ecd4d83e3f
commit
f609a2f836
3 changed files with 137 additions and 171 deletions
assets/js
|
@ -12,50 +12,14 @@ export const BsCollapse = {
|
|||
}
|
||||
});
|
||||
|
||||
// this.el.addEventListener("show.bs.collapse", (event) => {
|
||||
// this.pushEvent("collapse-show", { target_id: event.target.id });
|
||||
// });
|
||||
|
||||
// when showing completes, send event to liveview
|
||||
this.el.addEventListener("shown.bs.collapse", (event) => {
|
||||
this.pushEvent("collapse-shown", { target_id: event.target.id });
|
||||
});
|
||||
|
||||
// this.el.addEventListener("hide.bs.collapse", (event) => {
|
||||
// this.pushEvent("collapse-hide", { target_id: event.target.id });
|
||||
// });
|
||||
|
||||
// when hiding completes, send event to liveview
|
||||
this.el.addEventListener("hidden.bs.collapse", (event) => {
|
||||
this.pushEvent("collapse-hidden", { target_id: event.target.id });
|
||||
});
|
||||
},
|
||||
};
|
||||
|
||||
// export const BsModal = {
|
||||
// mounted() {
|
||||
// // when the liveview mounts, create the BS modal
|
||||
// const modal = new Modal(this.el);
|
||||
// // and trigger BS modal to show
|
||||
// modal.show();
|
||||
|
||||
// // when the BS modal hides, send 'close' to the liveview
|
||||
// this.el.addEventListener("hidden.bs.modal", (event) => {
|
||||
// this.pushEventTo(`#${this.el.getAttribute("id")}`, "close", {});
|
||||
// modal.dispose();
|
||||
// });
|
||||
|
||||
// // liveview can send this event to tell BS modal to close
|
||||
// // ex.: on successful form save, instead of immediate redirect
|
||||
// // this event hides the BS modal, which triggers the above,
|
||||
// // which sends 'close' to liveview and disposes the BS modal
|
||||
// this.handleEvent("modal-please-hide", (payload) => {
|
||||
// modal.hide();
|
||||
// });
|
||||
// },
|
||||
|
||||
// destroyed() {
|
||||
// // when the liveview is destroyed,
|
||||
// // modal-backdrop must be forcibly removed
|
||||
// const backdrop = document.querySelector(".modal-backdrop");
|
||||
// if (backdrop) backdrop.parentElement.removeChild(backdrop);
|
||||
// },
|
||||
// };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue