Skip to content

Commit

Permalink
Merge pull request #320 from alercebroker/fix/Magstats
Browse files Browse the repository at this point in the history
Fix javascript Magstats and Object
  • Loading branch information
Demurest authored Aug 29, 2024
2 parents 49e9a7b + 89ecdb7 commit 42ff81c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
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>
<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

0 comments on commit 42ff81c

Please sign in to comment.