diff --git a/js/ct-events.js b/js/ct-events.js index 9820ead..ba2ea55 100644 --- a/js/ct-events.js +++ b/js/ct-events.js @@ -196,6 +196,9 @@ var AppointmentDescription = { return m(".cte-description", [ m("h1", item.base.caption), m("h2", note_parts.join(" | ")), + format_information(item), + m(AppointmentLocation,{item, settings}), + m(AppointmentLink, {item, settings}), ]); } } @@ -322,51 +325,6 @@ var AppointmentLink = { } } -function AppointmentDetails() { - let collapsed = true; - - function toggle() { - collapsed = !collapsed; - } - - return { - view: function(vnode) { - const {item, settings} = vnode.attrs; - - const show_details = item.base.information /* || item.base.address?.meetingAt || item.base.address?.street */ || item.base.link; - - if (!show_details) { - return m("["); - } - return m( - ".cte-details-collapser", - { - class: collapsed ? "collapsed" : "", - }, - [ - m(".cte-details", [ - m(".cte-information-group", [ - m("h3.cte-information-label", "Beschreibung"), - m(".cte-information", [ - format_information(item), - m(AppointmentLocation,{item, settings}), - m(AppointmentLink, {item, settings}), - ]), - ]), - ]), - m( - "button.toggle-collapse", - {onclick: toggle}, - collapsed ? "Details anzeigen" : "Details verbergen", - " ", - fa_solid_icon(settings, collapsed ? "chevron-down" : "chevron-up"), - ), - ], - ); - } - } -}; - var Appointment = { view: function(vnode) { const {item, settings} = vnode.attrs; @@ -379,7 +337,6 @@ var Appointment = { m(AppointmentDescription, {item, settings}), ]), ]), - m(AppointmentDetails, {item, settings}), ]) }, };