From d8d5424d25c1738b170d58657ef71d4dbc89ca5e Mon Sep 17 00:00:00 2001 From: Timothy Andrew Date: Thu, 30 Jun 2016 13:02:05 +0530 Subject: Use the `GLDropdown` component to select protected branches. 1. Modify the component to support a callback for every key press in the filter. We need this so we can update the "Create: ).first().click()` instead of `$(selector)[0].click()`, because the latter is non-standard, and doesn't work in PhantomJS. --- app/controllers/projects/protected_branches_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/controllers/projects/protected_branches_controller.rb') diff --git a/app/controllers/projects/protected_branches_controller.rb b/app/controllers/projects/protected_branches_controller.rb index 026c5b74eb9..80dad758afa 100644 --- a/app/controllers/projects/protected_branches_controller.rb +++ b/app/controllers/projects/protected_branches_controller.rb @@ -9,7 +9,7 @@ class Projects::ProtectedBranchesController < Projects::ApplicationController def index @protected_branches = @project.protected_branches.order(:name).page(params[:page]) @protected_branch = @project.protected_branches.new - gon.push({ open_branches: @project.open_branches.map { |br| { text: br.name, id: br.name } } }) + gon.push({ open_branches: @project.open_branches.map { |br| { text: br.name, id: br.name, title: br.name } } }) end def create -- cgit v1.2.3