@@ -1055,29 +1068,29 @@ const chart = new Chart(ctx, {
-
- {% if filters.page_no > 1 %}
-
-
-
- {% endif %}
-
-
-
Page: {{ filters.page_no }}
-
-
- {% if offers_count > 10 %}
-
-
-
- {% endif %}
+
+ {% if filters.page_no > 1 %}
+
+
+ {% endif %}
+
+
+
Page: {{ filters.page_no }}
+
+
+ {% if offers_count > 20 %}
+
+
+
+ {% endif %}
+
@@ -1258,6 +1271,34 @@ function sortTable(columnIndex) {
rows.forEach(row => table.querySelector('tbody').appendChild(row));
}
+document.addEventListener('DOMContentLoaded', function() {
+ const coinToSelect = document.getElementById('coin_to');
+ const coinFromSelect = document.getElementById('coin_from');
+ const coinToButton = document.getElementById('coin_to_button');
+ const coinFromButton = document.getElementById('coin_from_button');
+
+ function updateSelectedImage(selectElement, buttonElement) {
+ const selectedOption = selectElement.options[selectElement.selectedIndex];
+ const imageURL = selectedOption.getAttribute('data-image');
+ if (imageURL) {
+ buttonElement.style.backgroundImage = `url('${imageURL}')`;
+ } else {
+ buttonElement.style.backgroundImage = 'none';
+ }
+ }
+
+ coinToSelect.addEventListener('change', function() {
+ updateSelectedImage(coinToSelect, coinToButton);
+ });
+
+ coinFromSelect.addEventListener('change', function() {
+ updateSelectedImage(coinFromSelect, coinFromButton);
+ });
+
+ // Initialize selected images on page load
+ updateSelectedImage(coinToSelect, coinToButton);
+ updateSelectedImage(coinFromSelect, coinFromButton);
+});
{% include 'footer.html' %}