From cd429ec385e604973b80ffa97d9ae03b092b1ce8 Mon Sep 17 00:00:00 2001 From: nataly Date: Wed, 31 Jan 2024 10:24:06 +0200 Subject: [PATCH] New changes. --- osinaweb/static/js/points.js | 17 +++++++ .../popup_modals/showpoints-modal.html | 45 +++++-------------- 2 files changed, 27 insertions(+), 35 deletions(-) create mode 100644 osinaweb/static/js/points.js 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 @@ -->
- - - - - {% endif %} {% if point.status == 'Completed' %} @@ -156,6 +127,10 @@ {% endfor %} + + + + \ No newline at end of file