Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix javascript Magstats and Object #320

Merged
merged 1 commit into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions lightcurve/src/magstats_api/templates/magstatRebuild.html.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@
<span id="first-number" class="tw-text-black dark:tw-text-white"></span> - <span id="second-number" class="tw-text-black dark:tw-text-white"></span> of <span id="total-number" class="tw-text-black dark:tw-text-white"></span>
</div>
<div class="tw-text-sm">
<button onclick="navigateTable(-1)" class="tw-pr-[10px] tw-text-sm tw-rounded-full hover:tw-text-gray-600" id='leftArrow'> &lt; </button>
<button onclick="navigateTable(1)" class="tw-pl-[10px] tw-text-sm tw-rounded-full hover:tw-text-gray-600" id="rightArrow"> &gt; </button></div>
<button class="tw-pr-[10px] tw-text-sm tw-rounded-full hover:tw-text-gray-600" id='leftArrow'> &lt; </button>
HectorxH marked this conversation as resolved.
Show resolved Hide resolved
<button class="tw-pl-[10px] tw-text-sm tw-rounded-full hover:tw-text-gray-600" id="rightArrow"> &gt; </button></div>
</div>
</div>

</div>

<script>
<script type="module">

// Only usefull definitions and getting the data from Python

Expand Down Expand Up @@ -301,5 +301,14 @@
displayRows();
});

const btnLeft = document.getElementById("leftArrow");
const btnRight = document.getElementById("rightArrow");

btnLeft.addEventListener('click', () => {
navigateTable(-1);
})
btnRight.addEventListener('click', () => {
navigateTable(1);
})
</script>

Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@

</div>

<script type="module">
<script type="module" async>

import {

Expand Down Expand Up @@ -303,7 +303,7 @@

document.addEventListener('click', handleOutsideClick);

fetch("https://tns.alerce.online/search", {
await fetch("https://tns.alerce.online/search", {
"headers": {
"accept": "application/json",
"cache-control": "no-cache",
Expand Down
Loading