[TikiWiki-commits] [Git][tikiwiki/tiki][29.x] [BP][FIX][UX] Calendar: Calendar change field refresh and new-event modal save
"MAGENE Sem Joel \(@Jomagene\) via TikiWiki-cvs" <[email protected]>
| Newsgroups | gmane.comp.cms.tiki.cvs |
|---|---|
| Message-ID | <69e6b029c9522_3818e2a0689a3@gitlab-sidekiq-low-urgency-cpu-bound-v2-7cbcb67f54-jb7qx.mail> |
MAGENE Sem Joel pushed to branch 29.x at Tiki Wiki CMS Groupware / Tiki
Commits:
188b5ec4 by MAGENE Sem Joel at 2026-04-20T22:52:41+00:00
[BP][FIX][UX] Calendar: Calendar change field refresh and new-event modal save
---
* [BP][FIX][UX] Calendar: Calendar change field refresh and new-event modal save
---
* [FIX][UX] Calendar: Calendar change field refresh and new-event modal save
---
* [FIX][UX] Calendar: Calendar-change field refresh and new-event modal save
See merge request tikiwiki/tiki!9973
(cherry picked from commit e4609a95124228aa8906296a5616b37e14e58b1e)
See merge request tikiwiki/tiki!10054
(cherry picked from commit 94113fa43457377ca043cc703062e181e6a09063)
See merge request tikiwiki/tiki!10057
- - - - -
2 changed files:
- lib/jquery_tiki/tiki-calendar_edit_item.js
- src/js/jquery-tiki/tiki-calendar.js
Changes:
=====================================
lib/jquery_tiki/tiki-calendar_edit_item.js
=====================================
@@ -129,6 +129,20 @@ function handleEditCalendarItem() {
$('#add_participant_email').val('');
});
+ // Reload form fields when calendar changes, so custom options match selected calendar.
+ $(document)
+ .off("change.calendarEditItem", ".edit-event-form select#calid")
+ .on("change.calendarEditItem", ".edit-event-form select#calid", function () {
+ const $form = $(this).closest(".edit-event-form");
+ if (!$form.length) {
+ return;
+ }
+ $form.tikiModal(tr("Loading..."));
+ window.needToConfirm = false;
+ $form.find("input[name=calendarchanged]").val(1);
+ $form.find("input[name=saveitem]").trigger("click");
+ });
+
// process form submits etc
$(document).on("click", ".edit-event-form input[type=submit]", function (event) {
// add a hidden input version of this form as jQuery.fn.serialize doesn't include the clicked button
=====================================
src/js/jquery-tiki/tiki-calendar.js
=====================================
@@ -241,7 +241,14 @@ $.fn.setupEventCalendar = function (
remote: $.service("calendar", "edit_item", { todate: info.date.toUnix(), modal: 1, return_url: returnUrl }),
open: function () {
$this.tikiModal();
- $("form:not(.no-ajax)", this).addClass("no-ajax"); // Remove default ajax handling, we replace it
+ $("form:not(.no-ajax)", this)
+ .addClass("no-ajax") // Remove default ajax handling, we replace it
+ .on(
+ "submit",
+ ajaxSubmitEventHandler(function (data) {
+ calendarEditSubmit(data, this);
+ })
+ );
},
});
} else {
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/188b5ec4438ec43d67a6a38674b25ecafbf18d78
--
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/188b5ec4438ec43d67a6a38674b25ecafbf18d78
You're receiving this email because of your account on gitlab.com. Manage all notifications: https://gitlab.com/-/profile/notifications | Help: https://gitlab.com/help
_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs