diff options
author | Darren Lines <darren@darrenlines.uk> | 2022-08-13 22:38:13 +0300 |
---|---|---|
committer | Darren Lines <darren@darrenlines.uk> | 2022-08-13 22:38:13 +0300 |
commit | daa70fc4b1c3b46b4886f299623eaf74477c9b1f (patch) | |
tree | e9ec2fa3dbfa8cdc9daef820a11d9634aa94b8e1 /js | |
parent | b8485457dd41a4704728745928f2d732c3e88cea (diff) |
Added handing for selected LCs that are now disabledMrD_Fix-number-of-logic-conditions-visible
Diffstat (limited to 'js')
-rw-r--r-- | js/gui.js | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -304,13 +304,22 @@ GUI_control.prototype.renderLogicConditionSelect = function ($container, logicCo let $select = $container.append('<select class="mix-rule-condition">').find("select"), lcCount = logicConditions.getCount(); + option = ""; if (withAlways) { $select.append('<option value="-1">Always</option>') } for (let i = 0; i < lcCount ; i++) { - if (!onlyEnabled || (logicConditions.isEnabled(i))) { - $select.append('<option value="' + i + '">Logic Condition ' + i + ' </option>'); + if (!onlyEnabled || i === current || (logicConditions.isEnabled(i))) { + option = '<option'; + + if (i === current && !logicConditions.isEnabled(i)) { + option+= ' class="lc_disabled"'; + } + + option+= ' value="' + i + '">Logic Condition ' + i + ' </option>'; + + $select.append(option); } } |