A few more simple efficiency cleanups

This commit is contained in:
Junior 2026-11-08 16:02:38 -05:00
parent 596148f4bb
commit 269e25c2e0

View File

@ -1,6 +1,7 @@
let folderRequest = false;
let lightbox = null;
toastr.options.escapeHtml = true;
toastr.options.preventDuplicates = true;
// This function is executed after the page load completes on the client
$(document).ready(function() {
@ -63,10 +64,9 @@ function cycleSortOrder() {
if ( !data.validated ) {
redirectToLogin();
return;
} else {
$("#sortorder").html(data.order);
getFolderContents();
}
$("#sortorder").html(data.order);
getFolderContents();
},
error : function(xhr, stat, err) {
toastr.error("There was an error retrieving the cycling sort order.", "API Error...", {timeOut: 15000});
@ -83,7 +83,6 @@ function cycleSortOrder() {
* - Shows a loading notification to the user.
* - Sends an AJAX request to retrieve folder contents as JSON.
* - If the user is not validated, redirects to the login page.
* - Updates the current path and path navigator.
* - Appends each folder or issue entry to the list.
* - Removes the loading notification upon completion.
*
@ -123,7 +122,6 @@ function getFolderContents() {
* Changes the current folder by sending an AJAX request to update the path on the server.
* Displays a notification to the user and updates global variables upon success.
*
* @param {string} name - The display name of the folder to open.
* @param {string} path - The path of the folder to open.
*/
function changeFolder(path) {
@ -186,6 +184,7 @@ function updateCurrentPage() {
function closeComic() {
$.ajax({
url : 'ajax/closecomic.php',
type : 'POST',
dataType : 'json',
success : function(data, stat, jqo) {
if ( !data.validated ) {