| @@ -20,11 +20,26 @@ | ||
| 20 | 20 | $fcgiButton.removeClass('active'); |
| 21 | 21 | $fcgiSettings.slideUp('fast'); |
| 22 | 22 | }); |
| 23 | 23 | |
| 24 | - // Remove page cache notice after 2 seconds | |
| 25 | - if ($('#fly-page-cache-notice').length) { | |
| 24 | + // Remove form update notice after 2 seconds | |
| 25 | + if ($('.fly-form-notice').length) { | |
| 26 | 26 | setTimeout(function () { |
| 27 | - $('#fly-page-cache-notice').fadeOut('slow'); | |
| 27 | + $('.fly-form-notice').fadeOut('slow', function () { | |
| 28 | + $(this).remove(); | |
| 29 | + }); | |
| 28 | 30 | }, 2000); |
| 29 | 31 | } |
| 32 | + | |
| 33 | + if ($('#optimization-wrapper').length) { | |
| 34 | + let sections = $('#optimization-wrapper .section'); | |
| 35 | + | |
| 36 | + $('input[id="enable-optimization"]').on('change', function () { | |
| 37 | + if ($(this).is(':checked')) { | |
| 38 | + sections.slideDown('fast'); | |
| 39 | + } else { | |
| 40 | + sections.slideUp('fast'); | |
| 41 | + } | |
| 42 | + }); | |
| 43 | + } | |
| 44 | + | |
| 30 | 45 | })(jQuery); |