Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
bbalganjjm committed May 21, 2024
1 parent 0908d29 commit 4d2439f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 8 additions & 1 deletion src/main/resources/static/js/natural_js/natural.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,14 @@
beforeSend : function(request, xhr, settings) {
// Display page loading image.
if(request.options.dataType === "html" && request.options.target !== null && request.options.append === false) {
request.options.target.html('<div style="text-align: center; vertical-align: middle;border: 0; border: none;width: 100%;height: 100%;"><img src="images/loading.gif" height="24"></div>');
var html = '<div style="text-align: center; vertical-align: middle;border: 0; border: none;width: 100%;height: 100%;">';
if(window.matchMedia && window.matchMedia("(prefers-color-scheme:dark)").matches) {
html += '<img src="images/page-loading-dark.png" style="opacity: 0.6;">';
} else {
html += '<img src="images/page-loading-light.png" style="opacity: 0.7;">';
}
html += '</div>';
request.options.target.html(html);
}
},
/**
Expand Down

0 comments on commit 4d2439f

Please sign in to comment.