Changed the data for New Tag to a script block
This commit is contained in:
parent
24d9142cab
commit
395e34bd0f
|
@ -250,7 +250,7 @@ import PerformanceBar from './performance_bar';
|
|||
case 'projects:tags:new':
|
||||
new ZenMode();
|
||||
new gl.GLForm($('.tag-form'), true);
|
||||
new RefSelectDropdown($('.js-branch-select'), window.gl.availableRefs);
|
||||
new RefSelectDropdown($('.js-branch-select'), JSON.parse(document.getElementById('availableRefs').innerHTML));
|
||||
break;
|
||||
case 'projects:snippets:new':
|
||||
case 'projects:snippets:edit':
|
||||
|
|
|
@ -40,8 +40,4 @@
|
|||
.form-actions
|
||||
= button_tag 'Create tag', class: 'btn btn-create', tabindex: 3
|
||||
= link_to 'Cancel', project_tags_path(@project), class: 'btn btn-cancel'
|
||||
|
||||
-# haml-lint:disable InlineJavaScript
|
||||
:javascript
|
||||
window.gl = window.gl || { };
|
||||
window.gl.availableRefs = #{@project.repository.ref_names.to_json};
|
||||
%script#availableRefs{ type: "application/json" }= @project.repository.ref_names.to_json.html_safe
|
||||
|
|
Loading…
Reference in New Issue