gettradingsettings added portfolio tickbox

This commit is contained in:
Justin 2023-03-16 23:23:11 +08:00 committed by GitHub
parent ec29d48773
commit 7684d3fed5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1208,24 +1208,36 @@ let saveSettingsButtons = document.querySelectorAll(".save-btn").forEach((button
// gets the stock, crypto or forex specific settings
function getTradingSettings(page) {
// get all the tick boxes
let whatFeature = document.getElementById('drop').value;
let percent = page.querySelectorAll(".percent-select")[0].checked;
let point = page.querySelectorAll(".point-select")[0].checked;
let no_logos = page.querySelectorAll(".logo-select")[0].checked;
let title = page.querySelectorAll(".title-select")[0].checked;
let symbols_el = page.querySelectorAll(".symbol-list")[0];
let symbols = getListItems(symbols_el);
let settings = {
if (whatFeature == 1) {
let portfolio = page.querySelectorAll(".portfolio-select")[0].checked;
settings = {
percent: percent,
point: point,
logos: no_logos,
title: title,
symbols: symbols,
chart: portfolio,
};
}
else {
settings = {
percent: percent,
point: point,
logos: no_logos,
title: title,
symbols: symbols,
};
}
return settings;
}
// gets the current wether and forecast settings
function getWeatherSettings(page) {