Put the references autocomplete feature behind a feature flag for now.

This commit is contained in:
Shane Kilkelly 2016-01-13 14:42:35 +00:00
parent 1e904e6ab7
commit d5edea77db
2 changed files with 6 additions and 0 deletions

View file

@ -45,6 +45,8 @@ define [
references = @$scope.$root._references
ReferencesCompleter =
getCompletions: (editor, session, pos, prefix, callback) ->
if window._ENABLE_REFERENCES_AUTOCOMPLETE != true
return callback(null, [])
if references.keys
range = new Range(pos.row, 0, pos.row, pos.column)
lineUpToCursor = editor.getSession().getTextRange(range)

View file

@ -16,6 +16,8 @@ define [
@getReferenceKeys()
indexReferences: (doc_id) ->
if window._ENABLE_REFERENCES_AUTOCOMPLETE != true
return
$.post(
"/project/#{@$scope.project_id}/references",
{
@ -31,6 +33,8 @@ define [
)
getReferenceKeys: () ->
if window._ENABLE_REFERENCES_AUTOCOMPLETE != true
return
$.get(
"/project/#{@$scope.project_id}/references/keys",
{