Commit 08a241d6 authored by Tim Zallmann's avatar Tim Zallmann

Moved the duplicate Available Refs to a default in RefSelectDropdown

parent 8663b63a
......@@ -251,7 +251,7 @@ import PerformanceBar from './performance_bar';
case 'projects:tags:new':
new ZenMode();
new gl.GLForm($('.tag-form'), true);
new RefSelectDropdown($('.js-branch-select'), JSON.parse(document.getElementById('availableRefs').innerHTML));
new RefSelectDropdown($('.js-branch-select'));
break;
case 'projects:snippets:new':
case 'projects:snippets:edit':
......@@ -318,7 +318,7 @@ import PerformanceBar from './performance_bar';
setupProjectEdit();
break;
case 'projects:pipelines:new':
new NewBranchForm($('.js-new-pipeline-form'), JSON.parse(document.getElementById('availableRefs').innerHTML));
new NewBranchForm($('.js-new-pipeline-form'));
break;
case 'projects:pipelines:builds':
case 'projects:pipelines:failures':
......
class RefSelectDropdown {
constructor($dropdownButton, availableRefs) {
const availableRefsValue = availableRefs || JSON.parse(document.getElementById('availableRefs').innerHTML);
$dropdownButton.glDropdown({
data: availableRefs,
data: availableRefsValue,
filterable: true,
filterByText: true,
remote: false,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment