diff --git a/application/poe/static/js/receiptsHandler.js b/application/poe/static/js/receiptsHandler.js index 490caee..88241ff 100644 --- a/application/poe/static/js/receiptsHandler.js +++ b/application/poe/static/js/receiptsHandler.js @@ -303,22 +303,4 @@ async function addPLUToReceipt(item) { data: {'cost': item.cost, 'expires': false} }, type: 'PLU SKU'}) await replenishScannedReceiptTable(scannedReceiptItems) -} - - - -var mode = false -async function toggleDarkMode() { - let darkMode = document.getElementById("dark-mode"); - darkMode.disabled = !darkMode.disabled; - mode = !mode; - if(mode){ - document.getElementById('modeToggle').innerHTML = "light_mode" - document.getElementById('main_html').classList.add('uk-light') - } else { - document.getElementById('modeToggle').innerHTML = "dark_mode" - document.getElementById('main_html').classList.remove('uk-light') - - } - } \ No newline at end of file diff --git a/application/poe/static/js/transactionHandler.js b/application/poe/static/js/transactionHandler.js index e371010..ba24436 100644 --- a/application/poe/static/js/transactionHandler.js +++ b/application/poe/static/js/transactionHandler.js @@ -153,20 +153,4 @@ async function replenishScanTable() { tableRow.append(statusCell, barcodeCell, nameCell, typeCell, locationCell) scanTableBody.append(tableRow) } -} - -var mode = false -async function toggleDarkMode() { - let darkMode = document.getElementById("dark-mode"); - darkMode.disabled = !darkMode.disabled; - mode = !mode; - if(mode){ - document.getElementById('modeToggle').innerHTML = "light_mode" - document.getElementById('main_html').classList.add('uk-light') - } else { - document.getElementById('modeToggle').innerHTML = "dark_mode" - document.getElementById('main_html').classList.remove('uk-light') - - } - } \ No newline at end of file diff --git a/application/poe/templates/receipts.html b/application/poe/templates/receipts.html index cc8bc10..62a9aeb 100644 --- a/application/poe/templates/receipts.html +++ b/application/poe/templates/receipts.html @@ -12,8 +12,9 @@ - - + {% if session['user']['flags']['darkmode'] %} + + {% endif %} @@ -24,7 +25,11 @@ cursor: pointer; } + {% if session['user']['flags']['darkmode'] %} + + {% else %} + {% endif %}