diff --git a/assets/scripts/photosScript.js b/assets/scripts/photosScript.js index 2dfc7b3..3c871c2 100755 --- a/assets/scripts/photosScript.js +++ b/assets/scripts/photosScript.js @@ -181,15 +181,16 @@ function timerIncrement() { * Control images with keyboard arrows */ $(document).keydown(function (e) { - switch (e.which) { + switch (e.keyCode) { case 37: // left displayNext(-1); break; - case 39: // right displayNext(1); break; - + case 27: + closeBig(); + break; default: return; // exit this handler for other keys } diff --git a/photos.php b/photos.php index 216d386..4f3ea09 100755 --- a/photos.php +++ b/photos.php @@ -192,7 +192,7 @@ function isValidImage($imagePath) */ function isValidDirectory($directoryPath, $directory) { - return is_dir($directoryPath) && $directory != "." && $directory != ".."; + return is_dir($directoryPath) && $directory != "." && $directory != ".." && substr($directory, 0, 1 ) !== "."; } @@ -265,7 +265,7 @@ function generatePath($path) Télécharger l'album photos