[TikiWiki-commits] [Git][tikiwiki/tiki][master] [FIX] Calendars: Ensure that the page reloads correctly when an event is...
"luci \(@luciash\) via TikiWiki-cvs" <[email protected]>
| Newsgroups | gmane.comp.cms.tiki.cvs |
|---|---|
| Message-ID | <693028329405e_2a17c154711d@gitlab-sidekiq-low-urgency-cpu-bound-v2-76d8cdf8fc-srk8j.mail> |
luci pushed to branch master at Tiki Wiki CMS Groupware / Tiki
Commits:
09cea2b2 by Alvin Bauma at 2025-12-03T11:58:41+00:00
[FIX] Calendars: Ensure that the page reloads correctly when an event is deleted and the modal window is closed.
---
* [FIX] Calendar delete event : Ensure that the page reloads correctly when an event is deleted and the modal window is closed.
See merge request tikiwiki/tiki!9164
- - - - -
1 changed file:
- lib/jquery_tiki/tiki-calendar_edit_item.js
Changes:
=====================================
lib/jquery_tiki/tiki-calendar_edit_item.js
=====================================
@@ -247,7 +247,11 @@ function handleEditCalendarItem() {
setTimeout(function () {
// TODO better
$modal.find(".modal-header").find(".btn-close").trigger("click");
- calendar.refetchEvents();
+ if (typeof window.calendar !== 'undefined' && typeof window.calendar.refetchEvents === 'function') {
+ window.calendar.refetchEvents();
+ } else {
+ location.reload();
+ }
}, 500);
}
};
@@ -367,10 +371,11 @@ function deletecalItem(event_id, event_name) {
$.service("calendar", "delete_item"),
{calitemId:event_id},
function (data) {
- if (typeof calendar.refetchEvents == 'function') {
- calendar.refetchEvents();
+ if (typeof window.calendar !== 'undefined' && typeof window.calendar.refetchEvents === 'function') {
+ window.calendar.refetchEvents();
+ $.closeModal({all: true});
+ } else {
$.closeModal({all: true});
- }else{
location.reload();
}
}
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/09cea2b2108bfcb1d335ca1e3333b5fa232130a6
--
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/09cea2b2108bfcb1d335ca1e3333b5fa232130a6
You're receiving this email because of your account on gitlab.com.
_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs