| 629 | 629 | |
| 630 | 630 | $('#instruct_enabled').on('change', function () { |
| 631 | 631 | //color toggle for the main switch |
| 632 | | - if (power_user.instruct.enabled) { |
| 632 | + $('#instruct_enabled').parent().find('i').toggleClass('toggleEnabled', !!power_user.instruct.enabled); |
| 633 | | - $('#instruct_enabled').parent().find('i').addClass('toggleEnabled'); |
| 633 | + $('#instructSettingsBlock, #InstructSequencesColumn').toggleClass('disabled', !power_user.instruct.enabled); |
| 634 | | - $('#instructSettingsBlock, #InstructSequencesColumn') |
| 635 | | - .removeClass('disabled'); |
| 636 | | - } else { |
| 637 | | - $('#instruct_enabled').parent().find('i').removeClass('toggleEnabled'); |
| 638 | | - $('#instructSettingsBlock, #InstructSequencesColumn') |
| 639 | | - .addClass('disabled'); |
| 640 | | - } |
| 641 | 634 | |
| 642 | 635 | if (!power_user.instruct.bind_to_context) { |
| 643 | 636 | return; |