Commit 32873d0d authored by Michael Iseard's avatar Michael Iseard
Browse files

Add page data attribute to modal

parent ce0ba337
......@@ -181,6 +181,9 @@ $(() => {
duration,
easing: 'linear',
complete() {
let page = $modal.attr('data-page')
let newPage = (direction === 'next' ? +page + 1 : +page - 1)
$modal.attr('data-page', newPage)
$current_tab.removeClass('current-tab')
$next_tab.addClass('current-tab')
$modal.animate(
......
<div id="{{ modal_id ?: 'kudos_modal-1' }}" class="kudos_modal {{ classes }} kd-absolute kd-hidden" aria-hidden="true">
<div class="kudos_modal_overlay kd-flex kd-justify-center kd-items-center kd-fixed kd-top-0 kd-left-0 kd-w-full kd-h-full kd-bg-modal kd-z-1050"
tabindex="-1">
<div class="kudos_modal_container kd-bg-white kd-p-8 kd-rounded-lg kd-max-h-screen kd-max-w-lg kd-relative kd-overflow-hidden"
<div data-page="1" class="kudos_modal_container kd-bg-white kd-p-8 kd-rounded-lg kd-max-h-screen kd-max-w-lg kd-relative kd-overflow-hidden"
role="dialog" aria-modal="true" aria-labelledby="kudos_modal_title">
<header class="kudos_modal_header kd-flex kd-items-center kd-justify-between">
<div class="kudos_modal_logo"></div>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment