From 609e5092f44ee175d9227fe93e9cc22438583092 Mon Sep 17 00:00:00 2001 From: Tom Richards Date: Fri, 18 Oct 2024 10:35:21 +0100 Subject: [PATCH] call `updateDeployInfo()` more reliably to ensure recent deploys and restrictions reflect the choices more so than now --- .../app/assets/javascripts/form-autocomplete.coffee | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/riff-raff/app/assets/javascripts/form-autocomplete.coffee b/riff-raff/app/assets/javascripts/form-autocomplete.coffee index 38deefaa2..c54f8d61f 100644 --- a/riff-raff/app/assets/javascripts/form-autocomplete.coffee +++ b/riff-raff/app/assets/javascripts/form-autocomplete.coffee @@ -19,6 +19,7 @@ updateStageInfo = () -> stageInput = $('#stage') stageInput.html(stageOptions) stageInput.prop('disabled', false) + updateDeployInfo() }); updateDeployInfo = () -> @@ -119,7 +120,7 @@ $ -> input.on('change', updateFavouriteButton) input.on('keyup', updateFavouriteButton) - $('#projectInput').blur updateDeployInfo + $('#projectInput').blur -> updateDeployInfo() $('#buildInput').each -> input = $(this) @@ -154,10 +155,12 @@ $ -> $('#buildInput').on('input keyup', -> updateStageInfo() + updateDeployInfo() ) - $('#stage').change -> - updateDeployInfo() + $('#buildInput').blur -> updateDeployInfo() + + $('#stage').change -> updateDeployInfo() updateDeployInfo()