Added table update of timing editor

This commit is contained in:
Kai Lauterbach 2023-05-05 10:45:56 +02:00
parent 39dc462114
commit b328adb177
2 changed files with 6 additions and 9 deletions

View file

@ -1,5 +1,4 @@
function addTabListener() { function addTabListener() {
console.log("Try to add tab listener");
try { try {
var tabMain = document.getElementById("tab-lights"); var tabMain = document.getElementById("tab-lights");
var tabConfig = document.getElementById("tab-config"); var tabConfig = document.getElementById("tab-config");
@ -8,7 +7,6 @@ var amain = document.getElementById("tab-a-lights");
var acfg = document.getElementById("tab-a-config"); var acfg = document.getElementById("tab-a-config");
var atde = document.getElementById("tab-a-tde"); var atde = document.getElementById("tab-a-tde");
amain.addEventListener("click", function() { amain.addEventListener("click", function() {
console.log("Switch to main lights tab");
tabMain.classList.add("visible"); tabMain.classList.add("visible");
tabConfig.classList.remove("visible"); tabConfig.classList.remove("visible");
tabTDE.classList.remove("visible"); tabTDE.classList.remove("visible");
@ -17,7 +15,6 @@ acfg.classList.remove("pure-button-primary");
atde.classList.remove("pure-button-primary"); atde.classList.remove("pure-button-primary");
}); });
acfg.addEventListener("click", function() { acfg.addEventListener("click", function() {
console.log("Switch to config tab");
tabMain.classList.remove("visible"); tabMain.classList.remove("visible");
tabConfig.classList.add("visible"); tabConfig.classList.add("visible");
tabTDE.classList.remove("visible"); tabTDE.classList.remove("visible");
@ -26,13 +23,13 @@ acfg.classList.add("pure-button-primary");
atde.classList.remove("pure-button-primary"); atde.classList.remove("pure-button-primary");
}); });
atde.addEventListener("click", function() { atde.addEventListener("click", function() {
console.log("Switch to TDE tab");
tabMain.classList.remove("visible"); tabMain.classList.remove("visible");
tabConfig.classList.remove("visible"); tabConfig.classList.remove("visible");
tabTDE.classList.add("visible"); tabTDE.classList.add("visible");
amain.classList.remove("pure-button-primary"); amain.classList.remove("pure-button-primary");
acfg.classList.remove("pure-button-primary"); acfg.classList.remove("pure-button-primary");
atde.classList.add("pure-button-primary"); atde.classList.add("pure-button-primary");
createTable();
}); });
} catch (error) { } catch (error) {
console.log("Error: load listener of the tab action listener management: " + error.message); console.log("Error: load listener of the tab action listener management: " + error.message);

View file

@ -1,5 +1,5 @@
function addTabListener() { function addTabListener() {
console.log("Try to add tab listener"); //console.log("Try to add tab listener");
try { try {
var tabMain = document.getElementById("tab-lights"); var tabMain = document.getElementById("tab-lights");
var tabConfig = document.getElementById("tab-config"); var tabConfig = document.getElementById("tab-config");
@ -11,7 +11,7 @@ function addTabListener() {
amain.addEventListener("click", function() { amain.addEventListener("click", function() {
console.log("Switch to main lights tab"); //console.log("Switch to main lights tab");
tabMain.classList.add("visible"); tabMain.classList.add("visible");
tabConfig.classList.remove("visible"); tabConfig.classList.remove("visible");
tabTDE.classList.remove("visible"); tabTDE.classList.remove("visible");
@ -22,7 +22,7 @@ function addTabListener() {
}); });
acfg.addEventListener("click", function() { acfg.addEventListener("click", function() {
console.log("Switch to config tab"); //console.log("Switch to config tab");
tabMain.classList.remove("visible"); tabMain.classList.remove("visible");
tabConfig.classList.add("visible"); tabConfig.classList.add("visible");
tabTDE.classList.remove("visible"); tabTDE.classList.remove("visible");
@ -33,7 +33,7 @@ function addTabListener() {
}); });
atde.addEventListener("click", function() { atde.addEventListener("click", function() {
console.log("Switch to TDE tab"); //console.log("Switch to TDE tab");
tabMain.classList.remove("visible"); tabMain.classList.remove("visible");
tabConfig.classList.remove("visible"); tabConfig.classList.remove("visible");
tabTDE.classList.add("visible"); tabTDE.classList.add("visible");
@ -42,7 +42,7 @@ function addTabListener() {
acfg.classList.remove("pure-button-primary"); acfg.classList.remove("pure-button-primary");
atde.classList.add("pure-button-primary"); atde.classList.add("pure-button-primary");
//createTable(); // recreate the table on timing data editor tab createTable(); // recreate the table on timing data editor tab
}); });
} catch (error) { } catch (error) {
console.log("Error: load listener of the tab action listener management: " + error.message); console.log("Error: load listener of the tab action listener management: " + error.message);