diff --git a/ajax/ajax_calendar_edit.php b/ajax/ajax_calendar_edit.php new file mode 100644 index 00000000..7773b33d --- /dev/null +++ b/ajax/ajax_calendar_edit.php @@ -0,0 +1,55 @@ + + + +
+ + + +
+ + + + +
+ + + + +
+ +
- +
@@ -97,8 +102,6 @@ while ($row = mysqli_fetch_array($sql)) { $calendar_name = nullable_htmlentities($row['calendar_name']); $calendar_color = nullable_htmlentities($row['calendar_color']); $client_id = intval($row['event_client_id']); - - require "modals/calendar_event_edit_modal.php"; } ?> @@ -140,7 +143,16 @@ while ($row = mysqli_fetch_array($sql)) { selectMirror: true, eventClick: function(editEvent) { - $('#editEventModal' + editEvent.event.id).modal(); + var $link = $('', { + href: '#', + 'data-toggle': 'ajax-modal', + 'data-ajax-url': 'ajax/ajax_calendar_event_edit.php?', + 'data-ajax-id': editEvent.event.id + }); + + $('body').append($link); // Append to the body + $link.trigger('click'); // Trigger the modal + $link.remove(); // Cleanup }, dayMaxEvents: true, // allow "more" link when too many events views: { diff --git a/modals/calendar_edit_modal.php b/modals/calendar_edit_modal.php deleted file mode 100644 index 4747bd24..00000000 --- a/modals/calendar_edit_modal.php +++ /dev/null @@ -1,42 +0,0 @@ - diff --git a/modals/calendar_event_edit_modal.php b/modals/calendar_event_edit_modal.php deleted file mode 100644 index 9debcc42..00000000 --- a/modals/calendar_event_edit_modal.php +++ /dev/null @@ -1,174 +0,0 @@ -