Marthee commited on
Commit
0e9b0c8
·
verified ·
1 Parent(s): e50e63d

Update templates/proposed-GUI.html

Browse files
Files changed (1) hide show
  1. templates/proposed-GUI.html +19 -2
templates/proposed-GUI.html CHANGED
@@ -1967,7 +1967,7 @@ let selectedValues = []; // global
1967
  checkbox.checked = false;
1968
  }
1969
  });
1970
- }
1971
 
1972
  // Check the current checkbox
1973
  const selectedCheckboxes = Array.from(document.querySelectorAll('input[name="measureCheckbox"]:checked'));
@@ -1987,10 +1987,27 @@ let selectedValues = []; // global
1987
  item.style.backgroundColor = checkbox.checked ? '#d3f8d3' : '';
1988
  });
1989
  console.log("Selected projects:", selectedValues);
 
 
 
 
 
1990
 
1991
-
 
 
 
 
 
 
1992
 
 
 
 
 
 
1993
 
 
1994
 
1995
  // Show alert immediately to prompt the user
1996
  if (projsec.value.startsWith('3.2') || projsec.value.startsWith('3.3') || projsec.value.startsWith('2.7')) {
 
1967
  checkbox.checked = false;
1968
  }
1969
  });
1970
+
1971
 
1972
  // Check the current checkbox
1973
  const selectedCheckboxes = Array.from(document.querySelectorAll('input[name="measureCheckbox"]:checked'));
 
1987
  item.style.backgroundColor = checkbox.checked ? '#d3f8d3' : '';
1988
  });
1989
  console.log("Selected projects:", selectedValues);
1990
+ }
1991
+ ////////////////////////////////////////
1992
+ document.querySelectorAll('input[name="measureCheckbox"]').forEach(checkbox => {
1993
+ checkbox.checked = false;
1994
+ });
1995
 
1996
+ // Check the current checkbox
1997
+ event.target.checked = true;
1998
+
1999
+ // Action when checkbox is clicked (e.g., log the selected project)
2000
+ let selectedValue = event.target.value;
2001
+ measSelect.value=selectedValue;
2002
+ console.log("Selected project:", selectedValue);
2003
 
2004
+ // Highlight the selected item
2005
+ document.querySelectorAll(".measure-item").forEach(item => {
2006
+ item.style.backgroundColor = ''; // Reset background color for all items
2007
+ });
2008
+ event.target.closest(".measure-item").style.backgroundColor = '#d3f8d3'; // Highlight the selected item
2009
 
2010
+ /////////////////////////////////////////////
2011
 
2012
  // Show alert immediately to prompt the user
2013
  if (projsec.value.startsWith('3.2') || projsec.value.startsWith('3.3') || projsec.value.startsWith('2.7')) {