{% load i18n %}
{% load static %}
<!-- Mainly scripts -->
<script src="{% static "js/plugins/metisMenu/jquery.metisMenu.js" %}"></script>

<!-- Custom and plugin javascript -->
<script src="{% static "js/plugins/toastr/toastr.min.js" %}"></script>
<script src="{% static "js/inspinia.js" %}"></script>
<script type="text/javascript" src="{% url 'javascript-catalog' %}"></script>
<script src="{% static "js/jumpserver.js" %}?v=6"></script>
<script src="{% static 'js/plugins/select2/select2.full.min.js' %}"></script>
<script src="{% static 'js/plugins/select2/i18n/zh-CN.js' %}"></script>
<script>
activeNav("{{ FORCE_SCRIPT_NAME }}");
$(document).ready(function(){
    setAjaxCSRFToken();
    $('textarea').attr('rows', 5);
    if ($('.tooltip')[0]) {
        $('.tooltip').tooltip();
    }
    var userLang = navigator.language || navigator.userLanguage;
    if (userLang.indexOf('zh') !== -1) {
        $.fn.select2.defaults.set('language', 'zh-CN')
    }
});
</script>
