From 8836674fd8494e14352171de59160918cd23e23e Mon Sep 17 00:00:00 2001
From: DeionSi
Date: Fri, 13 Jan 2023 22:43:24 +0100
Subject: [PATCH] Move button handlers from template to renderer
---
assets/js/main.js | 48 -----------------------------------------
index.html | 4 ++--
renderer.js | 55 ++++++++++++++++++++++++++++++++++++++++-------
3 files changed, 49 insertions(+), 58 deletions(-)
diff --git a/assets/js/main.js b/assets/js/main.js
index bd875a7..9ccaa9e 100644
--- a/assets/js/main.js
+++ b/assets/js/main.js
@@ -183,52 +183,4 @@
}
});
- // Button handlers
- $(document).on('click', '#btnChoosePort', function(event) {
- event.preventDefault();
- $("[href='#port']").trigger('click');
- });
-
- $(document).on('click', '#btnBasetune', function(event) {
- event.preventDefault();
- $("[href='#basetunes']").trigger('click');
- });
-
- $(document).on('click', '#btnLoader', function(event) {
- event.preventDefault();
- $("[href='#loader']").trigger('click');
- });
-
- $(document).on('click', '#btnDetails', function(event) {
- event.preventDefault();
- refreshDetails();
- $("[href='#details']").trigger('click');
- });
-
- $(document).on('click', '#btnInstall', function(event) {
- event.preventDefault();
- $("[href='#progress']").trigger('click');
- uploadFW();
- });
-
- $(document).on('click', '#btnReinstall', function(event) {
- event.preventDefault();
- $("[href='#progress']").trigger('click');
- uploadFW();
- });
-
- $(document).on('click', '#btnDownloadBasetune', function(event) {
- event.preventDefault();
- $("[href='#basetunewarning']").trigger('click');
-
- const select = document.getElementById('basetunesSelect');
- const selectedTune = select.options[select.selectedIndex];
- document.getElementById("tuneBoard").innerHTML = selectedTune.dataset.board;
- });
-
- $(document).on('click', '#btnDownloadCancel', function(event) {
- event.preventDefault();
- $("[href='#basetunes']").trigger('click');
- });
-
})(jQuery);
\ No newline at end of file
diff --git a/index.html b/index.html
index dee5748..ad39e15 100644
--- a/index.html
+++ b/index.html
@@ -11,7 +11,6 @@
-
@@ -146,7 +145,7 @@
@@ -196,5 +195,6 @@
+