button that opens wiki page about adding AE Calendar to Google Agenda

removed unused import

Revert "new promo 24 logo"

This reverts commit 7aeb28926dd27c0dfb5b2db97babd373381ccb48.

button that opens wiki page about adding AE Calendar to Google Agenda
This commit is contained in:
Kenneth SOARES 2025-04-16 09:46:26 +02:00
parent 4fa83d0667
commit 620749dfc8
4 changed files with 45 additions and 2 deletions

View File

@ -48,11 +48,11 @@ export class IcsCalendar extends inheritHtmlElement("div") {
if (this.isMobile()) { if (this.isMobile()) {
return { return {
start: "", start: "",
center: "getCalendarLink", center: "getCalendarLink helpButton",
end: "", end: "",
}; };
} }
return { start: "getCalendarLink", center: "", end: "" }; return { start: "getCalendarLink helpButton", center: "", end: "" };
} }
currentHeaderToolbar() { currentHeaderToolbar() {
@ -341,6 +341,16 @@ export class IcsCalendar extends inheritHtmlElement("div") {
}, 1500); }, 1500);
}, },
}, },
helpButton: {
text: "?",
click: () => {
const helpUrl = this.getAttribute("data-help-url");
if (helpUrl) {
window.open(helpUrl, "_blank");
}
},
},
}, },
height: "auto", height: "auto",
locale: this.locale, locale: this.locale,
@ -352,6 +362,13 @@ export class IcsCalendar extends inheritHtmlElement("div") {
this.calendar.changeView(this.currentView()); this.calendar.changeView(this.currentView());
this.calendar.setOption("headerToolbar", this.currentHeaderToolbar()); this.calendar.setOption("headerToolbar", this.currentHeaderToolbar());
this.calendar.setOption("footerToolbar", this.currentFooterToolbar()); this.calendar.setOption("footerToolbar", this.currentFooterToolbar());
setTimeout(() => {
const button = this.node.querySelector(".fc-helpButton-button");
if (button) {
button.classList.add("help-button");
}
}, 10);
}, },
eventClick: (event) => { eventClick: (event) => {
// Avoid our popup to be deleted because we clicked outside of it // Avoid our popup to be deleted because we clicked outside of it
@ -363,6 +380,13 @@ export class IcsCalendar extends inheritHtmlElement("div") {
}); });
this.calendar.render(); this.calendar.render();
setTimeout(() => {
const button = this.node.querySelector(".fc-helpButton-button");
if (button) {
button.classList.add("help-button");
}
}, 0);
window.addEventListener("click", (event: MouseEvent) => { window.addEventListener("click", (event: MouseEvent) => {
// Auto close popups when clicking outside of it // Auto close popups when clicking outside of it
const popup = document.getElementById("event-details"); const popup = document.getElementById("event-details");

View File

@ -114,10 +114,28 @@ ics-calendar {
button.text-copied:focus, button.text-copied:focus,
button.text-copied:hover { button.text-copied:hover {
transition: 500ms ease-out; transition: 500ms ease-out;
margin-right: 0.5rem;
} }
button.text-copied[tooltip]::before { button.text-copied[tooltip]::before {
opacity: 0; opacity: 0;
transition: opacity 500ms ease-out; transition: opacity 500ms ease-out;
} }
.fc .help-button {
border-radius: 70%;
padding-left: 0.5rem;
padding-right: 0.5rem;
background-color: rgba(0, 0, 0, 0.8);
transition: 100ms ease-out;
width: 30px;
height: 30px;
font-size: 11px;
}
.fc .help-button:hover,
.fc help-button:focus {
background-color: rgba(20, 20, 20, 0.6);
}
} }

View File

@ -192,6 +192,7 @@
@calendar-delete="$dispatch('news-moderated', {newsId: $event.detail.id, state: AlertState.DELETED})" @calendar-delete="$dispatch('news-moderated', {newsId: $event.detail.id, state: AlertState.DELETED})"
@calendar-unpublish="$dispatch('news-moderated', {newsId: $event.detail.id, state: AlertState.PENDING})" @calendar-unpublish="$dispatch('news-moderated', {newsId: $event.detail.id, state: AlertState.PENDING})"
@calendar-publish="$dispatch('news-moderated', {newsId: $event.detail.id, state: AlertState.PUBLISHED})" @calendar-publish="$dispatch('news-moderated', {newsId: $event.detail.id, state: AlertState.PUBLISHED})"
data-help-url="{{ url('core:page', page_name='Index/calendrier')}}"
locale="{{ get_language() }}" locale="{{ get_language() }}"
can_moderate="{{ user.has_perm("com.moderate_news") }}" can_moderate="{{ user.has_perm("com.moderate_news") }}"
can_delete="{{ user.has_perm("com.delete_news") }}" can_delete="{{ user.has_perm("com.delete_news") }}"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB