#5186 clean up JavaScript templates: doctools

move templating from `doctools` to `documentation_options`
This commit is contained in:
Timotheus Kampik 2018-07-21 20:17:00 +02:00
parent a3189b460c
commit d2a15f4035
2 changed files with 5 additions and 4 deletions

View File

@ -150,9 +150,9 @@ var Documentation = {
this.fixFirefoxAnchorBug(); this.fixFirefoxAnchorBug();
this.highlightSearchWords(); this.highlightSearchWords();
this.initIndexTable(); this.initIndexTable();
{% if theme_navigation_with_keys|tobool %} if (DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) {
this.initOnKeyListeners(); this.initOnKeyListeners();
{% endif %} }
}, },
/** /**

View File

@ -5,5 +5,6 @@ var DOCUMENTATION_OPTIONS = {
COLLAPSE_INDEX: false, COLLAPSE_INDEX: false,
FILE_SUFFIX: '{{ '' if no_search_suffix else file_suffix }}', FILE_SUFFIX: '{{ '' if no_search_suffix else file_suffix }}',
HAS_SOURCE: {{ has_source|lower }}, HAS_SOURCE: {{ has_source|lower }},
SOURCELINK_SUFFIX: '{{ sourcelink_suffix }}' SOURCELINK_SUFFIX: '{{ sourcelink_suffix }}',
NAVIGATION_WITH_KEYS: {{ 'true' if theme_navigation_with_keys|tobool else 'false'}}
}; };