core: optimisation and take off the auto-download of Font Awesome

This commit is contained in:
Cyl 2019-05-10 15:49:20 +02:00
parent 3548c3e7c4
commit a4ed535b34
2 changed files with 3 additions and 6 deletions

View File

@ -10,12 +10,8 @@
<link rel="stylesheet" href="{{ static('ajax_select/css/ajax_select.css') }}">
<link rel="stylesheet" href="{{ scss('core/style.scss') }}">
<link rel="stylesheet" href="{{ static('core/js/ui/jquery-ui.min.css') }}">
{% if settings.EXTERNAL_RES %}
<noscript><link rel="stylesheet" href="/static/core/font-awesome/css/font-awesome.min.css"></noscript>
<link rel="stylesheet" href="/static/core/font-awesome/css/font-awesome.min.css">
<script href="/core/static/core/font-awesome/js/fontawesone.min.js"></script>
{% else %}
<link rel="stylesheet" href="{{ static('core/font-awesome/css/font-awesome.min.css') }}">
{% endif %}
<!-- Jquery declared here to be accessible in every django widgets -->
<script src="{{ static('core/js/jquery-3.1.0.min.js') }}"></script>

View File

@ -28,6 +28,7 @@
var easymde = new EasyMDE({
element: document.getElementById("{{ widget.attrs.id }}"),
spellChecker: false,
autoDownloadFontAwesome: false,
previewRender: function(plainText, preview){ // Async method
clearTimeout(lastAPICall);
lastAPICall = setTimeout(function (plainText, preview){