This commit is contained in:
@@ -306,6 +306,8 @@
|
||||
<option value="exchange">By Exchange</option>
|
||||
<option value="continent">By Continent</option>
|
||||
<option value="sector">By Sector</option>
|
||||
<option value="exchange_continent">Exchange + Region</option>
|
||||
<option value="exchange_sector">Exchange + Sector</option>
|
||||
</select>
|
||||
<div id="summary-step3" class="step-summary"></div>
|
||||
</div>
|
||||
@@ -423,8 +425,24 @@
|
||||
function updateSubGroupOptions() {
|
||||
const x = document.getElementById('axisX').value;
|
||||
const sub = document.getElementById('axisSub');
|
||||
|
||||
// Remove existing composite options first to avoid duplicates
|
||||
// We need to reset the options or add them dynamically
|
||||
|
||||
// For simplicity, we'll just enable/disable standard ones and maybe append composite ones?
|
||||
// Actually, let's just make sure they exist in the HTML (I will add them there)
|
||||
// and toggling disabled state here.
|
||||
|
||||
Array.from(sub.options).forEach(opt => {
|
||||
// Disable if same as X
|
||||
opt.disabled = (opt.value === x);
|
||||
|
||||
// Composite options are special: only allow them if X is time-based (day/month)
|
||||
if (['exchange_continent', 'exchange_sector'].includes(opt.value)) {
|
||||
opt.disabled = !['day', 'month'].includes(x);
|
||||
opt.hidden = !['day', 'month'].includes(x);
|
||||
}
|
||||
|
||||
if (opt.value === x && sub.value === x) sub.value = '';
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user