From 2220817b53fb7aee72814bd9821e9d4871e97593 Mon Sep 17 00:00:00 2001 From: OnlineDynamic Date: Tue, 3 Sep 2024 13:51:10 +0100 Subject: [PATCH] add file/directory count to file manager tabs display --- www/filemanager.php | 145 +++++++++++++++++++++++++++++++++++--- www/js/fpp-filemanager.js | 3 + 2 files changed, 137 insertions(+), 11 deletions(-) diff --git a/www/filemanager.php b/www/filemanager.php index d7e7c7bb0..36be8ae5f 100644 --- a/www/filemanager.php +++ b/www/filemanager.php @@ -198,9 +198,19 @@
-
-

Sequence Files (.fseq)

+
+
+

Sequence Files (.fseq)

+
+
+
+
Items
+
0
+
+
+
@@ -251,7 +261,20 @@ class="disableButtons singleSequencesButton multiSequencesButton"
-

Music Files (.mp3/.ogg/.m4a/.flac/.aac/.wav/.m4p)

+
+
+

Music Files (.mp3/.ogg/.m4a/.flac/.aac/.wav/.m4p)

+
+
+
+
Items
+
0
+
+
+ +
+
@@ -300,7 +323,20 @@ class="disableButtons singleMusicButton multiMusicButton" type="button"
-

Video Files (.mp4/.mkv/.avi/.mpg/.mov)

+
+
+

Video Files (.mp4/.mkv/.avi/.mpg/.mov)

+
+
+
+
Items
+
0
+
+
+ +
+
@@ -345,7 +381,20 @@ class="disableButtons singleVideosButton multiVideosButton" type="button"
-

Images

+
+
+

Images

+
+
+
+
Items
+
0
+
+
+ +
+
@@ -386,7 +435,20 @@ class="disableButtons singleImagesButton multiImagesButton" type="button"
-

Effect Sequences (.eseq)

+
+
+

Effect Sequences (.eseq)

+
+
+
+
Items
+
0
+
+
+ +
+
@@ -426,7 +488,20 @@ class="disableButtons singleEffectsButton multiEffectsButton" type="button"
- Scripts (.sh/.pl/.pm/.php/.py) +
+
+

Scripts (.sh/.pl/.pm/.php/.py)

+
+
+
+
Items
+
0
+
+
+ +
+
@@ -477,7 +552,19 @@ class="disableButtons singleScriptsButton multiScriptsButton" type="button"
- Log Files +
+
+

Log Files

+
+
+
+
Items
+
0
+
+
+ +
@@ -517,7 +604,19 @@ class="disableButtons singleLogsButton multiLogsButton" type="button"
- Uploaded Files +
+
+

Uploaded Files

+
+
+
+
Items
+
0
+
+
+ +
@@ -554,7 +653,19 @@ class="disableButtons singleUploadsButton multiUploadsButton" type="button"
- Crash Reports +
+
+

Crash Reports

+
+
+
+
Items
+
0
+
+
+ +
@@ -589,7 +700,19 @@ class="disableButtons singleCrashesButton multiCrashesButton" type="button"
- Backup Files +
+
+

Backup Files

+
+
+
+
Items
+
0
+
+
+ +
diff --git a/www/js/fpp-filemanager.js b/www/js/fpp-filemanager.js index ab451480f..976b1a600 100644 --- a/www/js/fpp-filemanager.js +++ b/www/js/fpp-filemanager.js @@ -95,6 +95,9 @@ function GetFiles (dir) { }, complete: function () { SetupTableSorter('tbl' + dir); + $('#fileCount_' + dir)[0].innerText = $('#tbl' + dir + ' tbody tr').not( + '.unselectableRow' + ).length; } }); }