mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-26 10:40:08 +02:00
Put the references autocomplete feature behind a feature flag for now.
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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",
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user