]> git.0d.be Git - panikweb.git/commitdiff
add loading bar
authorFrédéric Péters <fpeters@0d.be>
Sat, 21 Jul 2018 21:37:28 +0000 (23:37 +0200)
committerFrédéric Péters <fpeters@0d.be>
Sat, 21 Sep 2019 14:07:02 +0000 (16:07 +0200)
panikweb_templates/static/css/_specifics.scss
panikweb_templates/static/js/specifics.js

index 902716d82c61e668c6ef30428655f7118f431c2b..7efd5e7a1f06c975f8a3edb961db9ec327e41b4d 100644 (file)
@@ -2090,3 +2090,25 @@ div.programCell a.playlist {
                }
        }
 }
+
+div#loading-page {
+       position: fixed;
+       top: 0;
+       left: 0;
+       right: 0;
+       height: 5px;
+       background: $secondary;
+       z-index: 1100;
+       animation-name: load_animation;
+       animation-duration: 6000ms;
+       animation-timing-function: ease-out;
+       transition: opacity 200ms linear;
+       &.fade {
+               opacity: 0;
+       }
+}
+
+@keyframes load_animation {
+       0% { right: 100%; }
+       100% { right: 0%; }
+}
index 96402f3269dc5d49f496b1ae5b32b0be80f5eb76..2fc125784ba363975dffe254c10babb49f2b8579 100644 (file)
@@ -33,6 +33,7 @@ $(function() {
        };
        var loadPage_request = null;
        afterLoad = function(html, textStatus, XMLHttpRequest) {
+               $('#loading-page').addClass('fade');
                loadPage_request = null;
                if (textStatus == "error") {
                        doLog('Sorry! And error occur when loading page content','error');
@@ -104,6 +105,8 @@ $(function() {
                if (loadPage_request !== null) {
                        loadPage_request.abort();
                }
+               $('#loading-page').remove();
+               $('<div id="loading-page"></div>').prependTo($('#All'));
                loadPage_request = $.ajax({
                        url: href,
                        success: afterLoad,