d8d5424d25
1. Modify the component to support a callback for every key press in the filter. We need this so we can update the "Create: <branch_name" label. 2. Modify the component to use `$(<selector>).first().click()` instead of `$(selector)[0].click()`, because the latter is non-standard, and doesn't work in PhantomJS.
17 lines
821 B
Text
17 lines
821 B
Text
= f.hidden_field(:name)
|
|
|
|
= dropdown_tag("Protected Branch",
|
|
options: { title: "Pick protected branch", toggle_class: 'js-protected-branch-select js-filter-submit',
|
|
filter: true, dropdown_class: "dropdown-menu-selectable", placeholder: "Search protected branches",
|
|
footer_content: true,
|
|
data: { show_no: true, show_any: true, show_upcoming: true,
|
|
selected: params[:protected_branch_name],
|
|
project_id: @project.try(:id) } }) do
|
|
|
|
%ul.dropdown-footer-list.hidden.protected-branch-select-footer-list
|
|
%li
|
|
= link_to '#', title: "New Protected Branch", class: "create-new-protected-branch" do
|
|
Create new
|
|
|
|
:javascript
|
|
new ProtectedBranchSelect();
|