[TikiWiki-commits] [Git][tikiwiki/tiki][27.x] [BP] [FIX] tiki-calendar_edit_item.js: Remove unnecessary loading modal when editing an event

"ushindi bienvenu \(@usbbush\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <6a15b41d36e6a_38fa2008058057@gitlab-sidekiq-low-urgency-cpu-bound-v2-5bd7895658-gz9pn.mail>

ushindi bienvenu pushed to branch 27.x at Tiki Wiki CMS Groupware / Tiki


Commits:
d40644a1 by Joseph Lwanzo Kausi at 2026-05-26T14:36:22+00:00
[BP] [FIX] tiki-calendar_edit_item.js: Remove unnecessary loading modal when editing an event
---
* [FIX] tiki-calendar_edit_item.js: Remove unnecessary loading modal when editing an event
---
* [FIX] tiki-calendar_edit_item.js: Add loading message during preview updates and hide it after content loads

* [FIX] tiki-calendar_edit_item: Remove unnecessary loading modal from event preview in calendar edit form

See merge request tikiwiki/tiki!7631

See merge request tikiwiki/tiki!10195

- - - - -


1 changed file:

- lib/jquery_tiki/tiki-calendar_edit_item.js


Changes:

=====================================
lib/jquery_tiki/tiki-calendar_edit_item.js
=====================================
@@ -295,6 +295,11 @@ function handleEditCalendarItem() {
             $disabled.removeAttr('disabled');
             var params = $form.serialize();
             $disabled.attr('disabled', 'disabled');
+
+            // Show loading message in preview area ici
+            const $preview = $form.find(".preview");
+            $preview.removeClass("d-none").find(".alert").removeClass("d-none").find(".rboxcontent").html(tr("Loading..."));
+
             $.post(
                 $.service("calendar", "view_item"),
                 params,
@@ -400,6 +405,9 @@ function handleEditCalendarItem() {
                     .find(".preview").tikiModal()
                     .find(".alert .rboxcontent")
                     .html($html.find(".modal-body"));
+
+                    // Remove loading message after content is loaded ICI
+                $form.find(".preview").tikiModal();
             },
             "html"
         );
@@ -407,9 +415,10 @@ function handleEditCalendarItem() {
 
     $(".edit-event-form").on("change", "input, select, textarea", function () {
         const $form = $(this).closest("form");
-        const $preview = $form.find(".preview").tikiModal(tr("Loading..."));
+        const $preview = $form.find(".preview");
 
         if ($preview.is(":visible")) {
+            $preview.tikiModal(tr("Loading..."));
             previewExecutor($form);
         }
     });
@@ -433,6 +442,11 @@ function handleEditCalendarItem() {
     $("input, select, textarea", "#editcalitem").on("change", function () {
         window.needToConfirm = true;
     });
+
+    $(document).on("hidden.bs.modal", ".modal", function () {
+        const $modal = $(this);
+        $modal.find(".preview").addClass("d-none").find(".alert").addClass("d-none");
+    });
 }
 
 /**



View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/d40644a167756f330d86d7b36cd6e0e40027fe06

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/d40644a167756f330d86d7b36cd6e0e40027fe06
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.