From 0896c071d25da345b74adc6653a43e938af9c61e Mon Sep 17 00:00:00 2001 From: Chad Davis Date: Mon, 8 Jul 2024 15:40:38 -0500 Subject: [PATCH 01/13] Add fade out to message box #31 Added JavaScript setTimeout with CSS to hide message box after 10 seconds. Close #31 --- index.php | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/index.php b/index.php index 5e5a433..75b3712 100644 --- a/index.php +++ b/index.php @@ -308,6 +308,7 @@ function get_sibling_folders($dir) { padding: 10px; border-radius: 5px; margin-bottom: 10px; + transition: opacity 1s ease-out; } table { width: 100%; @@ -350,6 +351,9 @@ function get_sibling_folders($dir) { border-top: 1px solid #fff; margin: 20px 0; } + .fade-out { + opacity: 0; + } .inline-form { display: inline; } @@ -376,6 +380,16 @@ function get_sibling_folders($dir) { } @@ -470,14 +481,14 @@ function triggerUpdate() { - + $folder): ?> - +
BackupCreated Date (CST)Created Date Delete
From 7ef5ffebcd367676e4381772aecc9c818172b888 Mon Sep 17 00:00:00 2001 From: Chad Davis Date: Mon, 8 Jul 2024 17:46:27 -0500 Subject: [PATCH 07/13] Remove comma from date #25 --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.php b/index.php index b1e5432..3791dab 100644 --- a/index.php +++ b/index.php @@ -415,7 +415,7 @@ function triggerUpdate() { // Function to convert ISO 8601 date to local timezone and format function convertToLocalTime(isoDate) { const date = new Date(isoDate); - return date.toLocaleString(); + return date.toLocaleString().replace(',', ''); } // Convert all dates in the table to local timezone From 96ca93aa074542257c2ae9bfdbc31f1b95ae23d4 Mon Sep 17 00:00:00 2001 From: Chad Davis Date: Mon, 8 Jul 2024 17:49:06 -0500 Subject: [PATCH 08/13] Split backup name into two columns #10 - Split the backup name into two columns: Backup Folder & Description - Added `white-space: nowrap;` to prevent table columns from wrapping Close #10 --- index.php | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/index.php b/index.php index 3791dab..c119e4a 100644 --- a/index.php +++ b/index.php @@ -317,6 +317,7 @@ function get_sibling_folders($dir) { border: 1px solid #fff; padding: 10px; color: #000; + white-space: nowrap; } table th { background-color: #007bff; @@ -328,11 +329,11 @@ function get_sibling_folders($dir) { table tr:nth-child(odd) { background-color: lightgray; } - table th:nth-child(1), table th:nth-child(2), - table td:nth-child(1), table td:nth-child(2) { - width: 45%; + table th:nth-child(1), table th:nth-child(2), table th:nth-child(3), + table td:nth-child(1), table td:nth-child(2), table td:nth-child(3) { + width: 30%; } - table th:nth-child(3), table td:nth-child(3) { + table th:nth-child(4), table td:nth-child(4) { width: 10%; } .checkbox-columns { @@ -480,14 +481,16 @@ function convertToLocalTime(isoDate) { - + + $folder): ?> - + +
BackupBackup FolderDescription Created Date Delete
From 80d292508cb169a9c6c9fc47730ebf7faa714792 Mon Sep 17 00:00:00 2001 From: Chad Davis Date: Tue, 9 Jul 2024 14:30:24 -0500 Subject: [PATCH 09/13] Fix #36 Error when message element missing There was a JavaScript error on the console when the message element was missing, so it was updated to only run the timeout code when the message exists. Close #36 --- index.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/index.php b/index.php index c119e4a..293abd2 100644 --- a/index.php +++ b/index.php @@ -383,11 +383,12 @@ function get_sibling_folders($dir) { // Hide message after 10 seconds setTimeout(function() { var messageDiv = document.getElementById('message'); - messageDiv.classList.add('fade-out'); - - setTimeout(function() { - messageDiv.style.display = 'none'; - }, 2000); + if (messageDiv) { + messageDiv.classList.add('fade-out'); + setTimeout(function() { + messageDiv.style.display = 'none'; + }, 2000); + } }, 10000); // Function to confirm folder deletion and submit the form From 4596eb2c9be5afe59f6689151bd48800629e257f Mon Sep 17 00:00:00 2001 From: Chad Davis Date: Tue, 9 Jul 2024 17:33:33 -0500 Subject: [PATCH 10/13] Fix #35 Container can shrink smaller than contents Added JavaScript event listener to update the container's min-width based on the content width Close #35 --- index.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/index.php b/index.php index 293abd2..371d024 100644 --- a/index.php +++ b/index.php @@ -380,6 +380,26 @@ function get_sibling_folders($dir) { }