mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-25 11:04:02 +03:00
Update docs search plugin (#6810)
This commit is contained in:
parent
a4c2d4f0d5
commit
0cb2523927
|
@ -9,11 +9,6 @@ var getSearchTerm = function() {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
var initilizeSearch = function() {
|
|
||||||
require.config({ baseUrl: '/mkdocs/js' });
|
|
||||||
require(['search']);
|
|
||||||
};
|
|
||||||
|
|
||||||
$(function() {
|
$(function() {
|
||||||
var searchTerm = getSearchTerm(),
|
var searchTerm = getSearchTerm(),
|
||||||
$searchModal = $('#mkdocs_search_modal'),
|
$searchModal = $('#mkdocs_search_modal'),
|
||||||
|
@ -30,6 +25,5 @@ $(function() {
|
||||||
|
|
||||||
$searchModal.on('shown', function() {
|
$searchModal.on('shown', function() {
|
||||||
$searchQuery.focus();
|
$searchQuery.focus();
|
||||||
initilizeSearch();
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -138,14 +138,17 @@
|
||||||
<!-- Le javascript
|
<!-- Le javascript
|
||||||
================================================== -->
|
================================================== -->
|
||||||
<!-- Placed at the end of the document so the pages load faster -->
|
<!-- Placed at the end of the document so the pages load faster -->
|
||||||
|
<script async src="https://fund.django-rest-framework.org/sidebar_include.js"></script>
|
||||||
<script src="{{ base_url }}/js/jquery-1.8.1-min.js"></script>
|
<script src="{{ base_url }}/js/jquery-1.8.1-min.js"></script>
|
||||||
<script src="{{ base_url }}/js/prettify-1.0.js"></script>
|
<script src="{{ base_url }}/js/prettify-1.0.js"></script>
|
||||||
<script src="{{ base_url }}/js/bootstrap-2.1.1-min.js"></script>
|
<script src="{{ base_url }}/js/bootstrap-2.1.1-min.js"></script>
|
||||||
<script async src="https://fund.django-rest-framework.org/sidebar_include.js"></script>
|
|
||||||
<script>var base_url = '{{ base_url }}';</script>
|
|
||||||
<script src="{{ base_url }}/mkdocs/js/require.js"></script>
|
|
||||||
<script src="{{ base_url }}/js/theme.js"></script>
|
<script src="{{ base_url }}/js/theme.js"></script>
|
||||||
|
|
||||||
|
<script>var base_url = '{{ base_url }}';</script>
|
||||||
|
{% for path in config.extra_javascript %}
|
||||||
|
<script src="{{ path|url }}" defer></script>
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
var shiftWindow = function() {
|
var shiftWindow = function() {
|
||||||
scrollBy(0, -50)
|
scrollBy(0, -50)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user