gitlab-org--gitlab-foss/app/views/layouts/_init_auto_complete.html.haml
2018-05-04 11:33:09 -06:00

11 lines
376 B
Text

- object = @target_project || @project || @group
- noteable_type = @noteable.class if @noteable.present?
- datasources = autocomplete_data_sources(object, noteable_type)
- if object
-# haml-lint:disable InlineJavaScript
:javascript
gl = window.gl || {};
gl.GfmAutoComplete = gl.GfmAutoComplete || {};
gl.GfmAutoComplete.dataSources = #{datasources.to_json};