From 48360cf91a2db72d7300a006e639ca7fdeaa2766 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20tom=20W=C3=B6rden?= <henrik@trineo.org> Date: Wed, 24 Jun 2020 09:58:21 +0200 Subject: [PATCH] MAINT: Allow autocomplete to be enabled with BUILD var --- src/core/js/autocomplete.js | 9 ++++++--- src/core/js/ext_bottom_line.js | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/core/js/autocomplete.js b/src/core/js/autocomplete.js index 542849c5..345d06b3 100644 --- a/src/core/js/autocomplete.js +++ b/src/core/js/autocomplete.js @@ -101,6 +101,9 @@ var autocomplete = new function() { }; }; -//$(document).ready(function () { -// caosdb_modules.register(autocomplete); -//}); +// this will be replaced by require.js in the future. +$(document).ready(function() { + if ("${BUILD_MODULE_EXT_AUTOCOMPLETE}" === "ENABLED") { + caosdb_modules.register(autocomplete); + } +}); diff --git a/src/core/js/ext_bottom_line.js b/src/core/js/ext_bottom_line.js index 404648e5..25897319 100644 --- a/src/core/js/ext_bottom_line.js +++ b/src/core/js/ext_bottom_line.js @@ -529,4 +529,4 @@ $(document).ready(function() { caosdb_modules.register(plotly_preview); caosdb_modules.register(ext_bottom_line); } -}); \ No newline at end of file +}); -- GitLab