]> git.0d.be Git - panikweb.git/blobdiff - panikweb_templates/static/js/specifics.js
add loading bar
[panikweb.git] / panikweb_templates / static / js / specifics.js
index 9569ab0748fe4c94061b77f8fabd72447e87e72e..d26af6e3b782426ba8a9a8bafb49c518a07cc1f7 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,