diff --git a/osinaweb/static/js/points.js b/osinaweb/static/js/points.js new file mode 100644 index 00000000..1e0bafc7 --- /dev/null +++ b/osinaweb/static/js/points.js @@ -0,0 +1,17 @@ + +function setTextColor(color) { + document.querySelector('.pointTotalTime').classList.remove('text-green-700', 'text-red-500'); + document.querySelector('.pointTotalTime').classList.add(color); +} + +document.getElementById('startPointButton').addEventListener('click', function() { + document.getElementById('startPointButton').style.display = 'none'; + document.getElementById('pausePointButton').style.display = 'block'; + setTextColor('text-green-700'); +}); + +document.getElementById('pausePointButton').addEventListener('click', function() { + document.getElementById('pausePointButton').style.display = 'none'; + document.getElementById('startPointButton').style.display = 'block'; + setTextColor('text-red-500'); +}); \ No newline at end of file diff --git a/osinaweb/templates/popup_modals/showpoints-modal.html b/osinaweb/templates/popup_modals/showpoints-modal.html index 0ac9152a..19474eb4 100644 --- a/osinaweb/templates/popup_modals/showpoints-modal.html +++ b/osinaweb/templates/popup_modals/showpoints-modal.html @@ -49,11 +49,13 @@ -->