From fe20c244fcff079b2cce3a9e69471d970fb79088 Mon Sep 17 00:00:00 2001 From: ishikawa999 Date: Mon, 2 Nov 2020 02:53:12 +0000 Subject: [PATCH] Change for a change event to occur when change a value in #issue_assigned_to_id. --- assets/javascripts/searchable_selectbox.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/assets/javascripts/searchable_selectbox.js b/assets/javascripts/searchable_selectbox.js index eaa4a22..b959623 100644 --- a/assets/javascripts/searchable_selectbox.js +++ b/assets/javascripts/searchable_selectbox.js @@ -37,6 +37,15 @@ $(function() { } } } + + // Changed for a change event to occur when change a value in #issue_assigned_to_id. + // https://github.com/ishikawa999/redmine_searchable_selectbox/issues/6 + $('form#issue-form .assign-to-me-link').click(function(event){ + event.preventDefault(); + var element = $(event.target); + $('#issue_assigned_to_id').val(element.data('id')).change(); + element.hide(); + }); }); function replaceSelect2() {