diff --git a/gallery.php b/gallery.php index e6efc5ceb..73f9cc13c 100644 --- a/gallery.php +++ b/gallery.php @@ -108,5 +108,9 @@ + + diff --git a/lib/configsetup.inc.php b/lib/configsetup.inc.php index ecc7350b9..01252a6aa 100644 --- a/lib/configsetup.inc.php +++ b/lib/configsetup.inc.php @@ -1323,6 +1323,13 @@ 'name' => 'remotebuzzer[userotary]', 'value' => $config['remotebuzzer']['userotary'], ], + 'remotebuzzer_enable_standalonegallery' => [ + 'view' => 'expert', + 'type' => 'checkbox', + 'name' => 'remotebuzzer[enable_standalonegallery]', + 'value' => $config['remotebuzzer']['enable_standalonegallery'], + ], + 'remotebuzzer_picturebutton' => [ 'view' => 'advanced', 'type' => 'checkbox', diff --git a/resources/lang/en.json b/resources/lang/en.json index a84c93c80..f5e9d68ee 100644 --- a/resources/lang/en.json +++ b/resources/lang/en.json @@ -362,6 +362,7 @@ "manual:print:textonprint_rotation": "Enter a value which is used as degrees the text gets rotated at print.", "manual:remotebuzzer:remotebuzzer_collagebutton": "For COLLAGE connect the hardware button to GPIO20. Pull GPIO to ground for to trigger. If enabled, long-press on PICTURE button will not trigger collage.", "manual:remotebuzzer:remotebuzzer_collagetime": "If PICTURE button pressed less than seconds here, a picture is triggered. If pressed more seconds than here, a collage is triggered. Only works if collage is enabled in the admin settings and the collage button is disbaled.", + "manual:remotebuzzer:remotebuzzer_enable_standalonegallery": "Controls whether the rotary encoder is active on the standalone gallery view.", "manual:remotebuzzer:remotebuzzer_enabled": "This feature enables hardware button support through Raspberry GPIO pins. IMPORTANT: For WLAN connected screens you must make sure to configure the IP address of the Photobooth web server in the section \"General\", for this feature to work properly.", "manual:remotebuzzer:remotebuzzer_logfile": "In Dev-Mode server debugging information will be written to the logfile, located in the tmp folder and defaults to io_server.log.", "manual:remotebuzzer:remotebuzzer_picturebutton": "For PICTURE connect the hardware button to GPIO21. Pull GPIO to ground for to trigger. Long-press will trigger COLLAGE, if enabled and Collage hardware button is disabled.", @@ -474,6 +475,7 @@ "remotebuzzer": "Hardware Button", "remotebuzzer:remotebuzzer_collagebutton": "Collage Button", "remotebuzzer:remotebuzzer_collagetime": "Seconds to trigger collage", + "remotebuzzer:remotebuzzer_enable_standalonegallery": "Rotary for standalone gallery", "remotebuzzer:remotebuzzer_enabled": "Enable Hardware Button Support", "remotebuzzer:remotebuzzer_logfile": "Logfile", "remotebuzzer:remotebuzzer_picturebutton": "Picture Button", diff --git a/src/js/remotebuzzer_client.js b/src/js/remotebuzzer_client.js index 270c6f6a8..409e4f1f8 100644 --- a/src/js/remotebuzzer_client.js +++ b/src/js/remotebuzzer_client.js @@ -131,6 +131,16 @@ function initRemoteBuzzerFromDOM() { // API functions api.init = function () { enabled = config.remotebuzzer.userotary; + if (typeof onStandaloneGalleryView !== 'undefined') { + enabled = enabled && config.remotebuzzer.enable_standalonegallery; + if (config.dev.enabled) { + console.log( + 'Rotary Controller is ', + config.remotebuzzer.enable_standalonegallery ? 'enabled' : 'disabled', + ' for standalone gallery view' + ); + } + } }; api.focusSet = function (id) {