mirror of
https://github.com/ae-utbm/sith.git
synced 2025-05-04 16:44:07 +00:00
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:
parent
4fa83d0667
commit
620749dfc8
@ -48,11 +48,11 @@ export class IcsCalendar extends inheritHtmlElement("div") {
|
||||
if (this.isMobile()) {
|
||||
return {
|
||||
start: "",
|
||||
center: "getCalendarLink",
|
||||
center: "getCalendarLink helpButton",
|
||||
end: "",
|
||||
};
|
||||
}
|
||||
return { start: "getCalendarLink", center: "", end: "" };
|
||||
return { start: "getCalendarLink helpButton", center: "", end: "" };
|
||||
}
|
||||
|
||||
currentHeaderToolbar() {
|
||||
@ -341,6 +341,16 @@ export class IcsCalendar extends inheritHtmlElement("div") {
|
||||
}, 1500);
|
||||
},
|
||||
},
|
||||
helpButton: {
|
||||
text: "?",
|
||||
click: () => {
|
||||
const helpUrl = this.getAttribute("data-help-url");
|
||||
|
||||
if (helpUrl) {
|
||||
window.open(helpUrl, "_blank");
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
height: "auto",
|
||||
locale: this.locale,
|
||||
@ -352,6 +362,13 @@ export class IcsCalendar extends inheritHtmlElement("div") {
|
||||
this.calendar.changeView(this.currentView());
|
||||
this.calendar.setOption("headerToolbar", this.currentHeaderToolbar());
|
||||
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) => {
|
||||
// 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();
|
||||
|
||||
setTimeout(() => {
|
||||
const button = this.node.querySelector(".fc-helpButton-button");
|
||||
if (button) {
|
||||
button.classList.add("help-button");
|
||||
}
|
||||
}, 0);
|
||||
|
||||
window.addEventListener("click", (event: MouseEvent) => {
|
||||
// Auto close popups when clicking outside of it
|
||||
const popup = document.getElementById("event-details");
|
||||
|
@ -114,10 +114,28 @@ ics-calendar {
|
||||
button.text-copied:focus,
|
||||
button.text-copied:hover {
|
||||
transition: 500ms ease-out;
|
||||
margin-right: 0.5rem;
|
||||
}
|
||||
|
||||
button.text-copied[tooltip]::before {
|
||||
opacity: 0;
|
||||
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);
|
||||
}
|
||||
}
|
@ -192,6 +192,7 @@
|
||||
@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-publish="$dispatch('news-moderated', {newsId: $event.detail.id, state: AlertState.PUBLISHED})"
|
||||
data-help-url="{{ url('core:page', page_name='Index/calendrier')}}"
|
||||
locale="{{ get_language() }}"
|
||||
can_moderate="{{ user.has_perm("com.moderate_news") }}"
|
||||
can_delete="{{ user.has_perm("com.delete_news") }}"
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 27 KiB |
Loading…
x
Reference in New Issue
Block a user