More optimisation and cleanup (#420)

This commit is contained in:
2021-03-02 11:29:57 +00:00
committed by GitHub
parent 2bf0175786
commit 911336ceec
113 changed files with 6472 additions and 2397 deletions

View File

@@ -4,9 +4,6 @@
{% load widget_tweaks %}
{% block js %}
<script src="{% static 'js/jquery-ui.js' %}"></script>
<script src="{% static "js/interaction.js" %}"></script>
<script src="{% static "js/modal.js" %}"></script>
<script>
$('document').ready(function(){
$('#asset-search-form').submit(function () {
@@ -49,7 +46,7 @@
<span>Asset with that ID does not exist!</span>
</div>
<form id="asset-search-form" class="mb-3" method="POST">
<form id="asset-search-form" class="mb-3" method="GET">
<div class="form-group form-row">
<h3>Audit Asset:</h3>
<div class="input-group input-group-lg">

View File

@@ -3,13 +3,17 @@
{% load static %}
{% block css %}
<link rel="stylesheet" href="{% static 'css/bootstrap-select.css' %}"/>
<link rel="stylesheet" href="{% static 'css/ajax-bootstrap-select.css' %}"/>
{{ block.super }}
<link rel="stylesheet" href="{% static 'css/selects.css' %}"/>
{% endblock %}
{% block preload_js %}
{{ block.super }}
<script src="{% static 'js/selects.js' %}"></script>
{% endblock %}
{% block js %}
<script src="{% static 'js/bootstrap-select.js' %}"></script>
<script src="{% static 'js/ajax-bootstrap-select.js' %}"></script>
{{ block.super }}
<script src="{% static 'js/autocompleter.js' %}"></script>
<script>
const matches = window.matchMedia("(prefers-reduced-motion: reduce)").matches || window.matchMedia("(update: slow)").matches;

View File

@@ -5,16 +5,17 @@
{% load static %}
{% block css %}
<link rel="stylesheet" href="{% static 'css/bootstrap-select.css' %}"/>
<link rel="stylesheet" href="{% static 'css/ajax-bootstrap-select.css' %}"/>
{{ block.super }}
<link rel="stylesheet" href="{% static 'css/selects.css' %}"/>
{% endblock %}
{% block preload_js %}
<script src="{% static 'js/bootstrap-select.js' %}"></script>
<script src="{% static 'js/ajax-bootstrap-select.js' %}"></script>
{{ block.super }}
<script src="{% static 'js/selects.js' %}" async></script>
{% endblock %}
{% block js %}
{{ block.super }}
<script>
//Get querystring value
function getParameterByName(name) {

View File

@@ -5,7 +5,7 @@
{% button 'submit' %}
{% elif duplicate %}
<!--duplicate-->
<button type="submit" class="btn btn-success"><i class="fas fa-tick"></i> Create Duplicate</button>
<button type="submit" class="btn btn-success"><span class="fas fa-check"></span> Create Duplicate</button>
{% else %}
<!--detail view-->
<div class="btn-group">

View File

@@ -25,6 +25,8 @@
{% button 'view' url='asset_detail' pk=item.asset_id clazz="btn-sm" %}
{% if perms.assets.change_asset %}
{% button 'edit' url='asset_update' pk=item.asset_id clazz="btn-sm" %}
{% endif %}
{% if perms.assets.add_asset %}
{% button 'duplicate' url='asset_duplicate' pk=item.asset_id clazz="btn-sm" %}
{% endif %}
</div>