fix checkbox manipulation
This commit is contained in:
parent
5eca2ae7fc
commit
633cb67434
|
|
@ -561,7 +561,7 @@ if (window.location.href.indexOf("5cf02dde58a00904bda41926") > -1) {
|
||||||
var componentsHTML = '<center><button id="allComponentsButton" type="button">AllComponents</button> <button id="apiButton" type="button">API</button>' +
|
var componentsHTML = '<center><button id="allComponentsButton" type="button">AllComponents</button> <button id="apiButton" type="button">API</button>' +
|
||||||
'<button id="authButton">Auth</button><button id="computeButton" type="button">Compute</button><button id="jobsButton" type="button">Jobs</button>' +
|
'<button id="authButton">Auth</button><button id="computeButton" type="button">Compute</button><button id="jobsButton" type="button">Jobs</button>' +
|
||||||
'<button id="odbcButton" type="button">ODBC/JDBC</button><button id="webappButton" type="button">Webapp</button>' +
|
'<button id="odbcButton" type="button">ODBC/JDBC</button><button id="webappButton" type="button">Webapp</button>' +
|
||||||
'<button id="sqlButton" type="button">SQL</button></center></br></br>';
|
'<button id="sqlButton" type="button">SQL</button></br><button id="ceButton" type="button">CE</button></center></br>';
|
||||||
|
|
||||||
// regional functions
|
// regional functions
|
||||||
function cacentral1ButtonClickAction(zEvent) {
|
function cacentral1ButtonClickAction(zEvent) {
|
||||||
|
|
@ -625,8 +625,7 @@ if (window.location.href.indexOf("5cf02dde58a00904bda41926") > -1) {
|
||||||
console.log("Loading AWS dataplanes profile");
|
console.log("Loading AWS dataplanes profile");
|
||||||
var dataplaneHTML = '<center><button id="ceButton" style="width:117px" type="button">CE</button><button id="cacentral1Button" style="width:117px" type="button">ca-central-1</button><button id="eucentral1Button" style="width:117px" type="button">eu-central-1</button><button id="euwest2Button" style="width:117px" type="button">eu-west-2</button></br></br><button id="uswest2Button" style="width:234px" type="button">us-west-2</button><button id="uswest1Button" style="width:234px" type="button">us-west-1</button></br><button id="useast1Button" style="width:234px" type="button">us-east-1</button><button id="useast2Button" style="width:234px" type="button">us-east-2</button></br></br><button id="apsouth1Button" style="width:156px" type="button">ap-south-1</button><button id="apsoutheast2Button" style="width:156px" type="button">ap-southeast-2</button><button id="apnortheast1Button" style="width:156px" type="button">ap-northeast-1</button></br></br><button id="euwest1Button" style="width:468px" type="button">eu-west-1</button></center>';
|
var dataplaneHTML = '<center><button id="ceButton" style="width:117px" type="button">CE</button><button id="cacentral1Button" style="width:117px" type="button">ca-central-1</button><button id="eucentral1Button" style="width:117px" type="button">eu-central-1</button><button id="euwest2Button" style="width:117px" type="button">eu-west-2</button></br></br><button id="uswest2Button" style="width:234px" type="button">us-west-2</button><button id="uswest1Button" style="width:234px" type="button">us-west-1</button></br><button id="useast1Button" style="width:234px" type="button">us-east-1</button><button id="useast2Button" style="width:234px" type="button">us-east-2</button></br></br><button id="apsouth1Button" style="width:156px" type="button">ap-south-1</button><button id="apsoutheast2Button" style="width:156px" type="button">ap-southeast-2</button><button id="apnortheast1Button" style="width:156px" type="button">ap-northeast-1</button></br></br><button id="euwest1Button" style="width:468px" type="button">eu-west-1</button></center>';
|
||||||
|
|
||||||
zNode.innerHTML = profilesHTML + '<hr class="solid">' + dataplaneHTML + '<hr class="solid">' + componentsHTML +
|
zNode.innerHTML = profilesHTML + '<hr class="solid">' + dataplaneHTML + '<hr class="solid">' + componentsHTML + auxHTML;
|
||||||
auxHTML;
|
|
||||||
|
|
||||||
// array of active buttons
|
// array of active buttons
|
||||||
buttonArray = ["CE", "ca-central-1", "eu-central-1", "eu-west-2", "us-west-2", "us-east-1", "us-east-2", "ap-south-1",
|
buttonArray = ["CE", "ca-central-1", "eu-central-1", "eu-west-2", "us-west-2", "us-east-1", "us-east-2", "ap-south-1",
|
||||||
|
|
@ -832,11 +831,11 @@ function checkRegion(region) {
|
||||||
};
|
};
|
||||||
function selectComponent(component) {
|
function selectComponent(component) {
|
||||||
selectedComponents.set(component, true);
|
selectedComponents.set(component, true);
|
||||||
console.log(selectedComponents);
|
// console.log(selectedComponents);
|
||||||
};
|
};
|
||||||
function deselectComponent(component) {
|
function deselectComponent(component) {
|
||||||
selectedComponents.set(component, false);
|
selectedComponents.set(component, false);
|
||||||
console.log(selectedComponents);
|
// console.log(selectedComponents);
|
||||||
};
|
};
|
||||||
function toggleRegion(region) {
|
function toggleRegion(region) {
|
||||||
if (checkRegion(region) == false) {
|
if (checkRegion(region) == false) {
|
||||||
|
|
@ -847,11 +846,11 @@ function toggleRegion(region) {
|
||||||
};
|
};
|
||||||
function selectRegion(region) {
|
function selectRegion(region) {
|
||||||
selectedRegions.set(region, true);
|
selectedRegions.set(region, true);
|
||||||
console.log(selectedRegions);
|
// console.log(selectedRegions);
|
||||||
};
|
};
|
||||||
function deselectRegion(region) {
|
function deselectRegion(region) {
|
||||||
selectedRegions.set(region, false);
|
selectedRegions.set(region, false);
|
||||||
console.log(selectedRegions);
|
// console.log(selectedRegions);
|
||||||
};
|
};
|
||||||
function setButtonColor(buttonName) {
|
function setButtonColor(buttonName) {
|
||||||
document.getElementById(buttonName).style.background = '#00FF00';
|
document.getElementById(buttonName).style.background = '#00FF00';
|
||||||
|
|
@ -860,10 +859,12 @@ function clearButtonColor(buttonName) {
|
||||||
document.getElementById(buttonName).style.background = '';
|
document.getElementById(buttonName).style.background = '';
|
||||||
};
|
};
|
||||||
function selectCheckbox(box) {
|
function selectCheckbox(box) {
|
||||||
box.setAttribute("class", "checked");
|
box.filter("A")[0].classList.add("checked");
|
||||||
|
box.filter("INPUT")[0].checked = true;
|
||||||
};
|
};
|
||||||
function deselectCheckbox(box) {
|
function deselectCheckbox(box) {
|
||||||
box.setAttribute("class", "");
|
box.filter("A")[0].classList.remove("checked");
|
||||||
|
box.filter("INPUT")[0].checked = false;
|
||||||
};
|
};
|
||||||
function apply() {
|
function apply() {
|
||||||
for (i = 0; i < componentArray.length; i++) {
|
for (i = 0; i < componentArray.length; i++) {
|
||||||
|
|
@ -872,7 +873,7 @@ function apply() {
|
||||||
var region = regionArray[j];
|
var region = regionArray[j];
|
||||||
var groupName = component + "Group";
|
var groupName = component + "Group";
|
||||||
var group = eval(groupName);
|
var group = eval(groupName);
|
||||||
var checkboxStr = `group.find('*').filter(\":contains(' ${region}:')\").filter("div.clearfix.prettycheckbox.labelright.blue").children().filter("A")[0]`;
|
var checkboxStr = `group.find('*').filter(\":contains(' ${region}:')\").filter("div.clearfix.prettycheckbox.labelright.blue").children()`;
|
||||||
var checkbox = eval(checkboxStr);
|
var checkbox = eval(checkboxStr);
|
||||||
if (checkRegion(region) == true && checkComponent(component) == true) {
|
if (checkRegion(region) == true && checkComponent(component) == true) {
|
||||||
selectCheckbox(checkbox);
|
selectCheckbox(checkbox);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue