Remove animation on prefers-reduced-motion/low referesh rate devices

Also normalises handling of asset list cable table & improves its use of space on large devices
This commit is contained in:
2020-10-18 11:04:58 +01:00
parent 7736a2d3cc
commit 59756ab86a
11 changed files with 58 additions and 40 deletions

View File

@@ -1,12 +1,15 @@
{% block js %}
{% include 'partials/version_scripts.html' %}
<script>
const matches = window.matchMedia("(prefers-reduced-motion: reduce)").matches || window.matchMedia("(update: slow)").matches;
//TODO Maybe this should be a reduce rather than remove
dur = matches ? 0 : 'slow';
$(document).ready(function() {
$(function () {
$( "#activity" ).hide();
$( "#activity" ).load( "{% url 'activity_feed' %}", function() {
$('#activity_loading').slideUp('slow',function(){
$('#activity').slideDown('slow');
$('#activity_loading').slideUp(dur,function(){
$('#activity').slideDown(dur);
});
var whiteList = $.fn.tooltip.Constructor.Default.whiteList
whiteList.ins = []