budoco
budoco copied to clipboard
for ajax posts, like run sql and file upload, revise how we do user feedback.
This works real bad on demo site
Maybe a simple loader panel?
I don't know what that means.
On start ajax request block UI.
https://stackoverflow.com/questions/1964839/how-can-i-create-a-please-wait-loading-animation-using-jquery
I did something simple and it's sufficient.
To site.js file.
$(function () {
var $document = $(document);
var $loader = $("<div class='loader' style='position: absolute; width: 100%; height: 100%; z-index: 100; top: 0;background: rgba(0, 0, 0, 0.5);display: flex;align-items: center;justify-content: center;color: #fff;'><div>Please wait...</div><div>")
$document.ajaxStart(function () {
$loader.appendTo(document.body);
});
$document.ajaxStop(function () {
$loader.remove();
});
});
Thanks for explaining. I like that better than what I did. I'll revisit.
position: absolute; to position: fixed; for work with scrolling No needs call methods directly.
👍