diff --git a/web/skins/classic/views/js/watch.js b/web/skins/classic/views/js/watch.js index 5ba4b407c..324e7f7e0 100644 --- a/web/skins/classic/views/js/watch.js +++ b/web/skins/classic/views/js/watch.js @@ -971,8 +971,18 @@ function initPage() { } // initPage function watchFullscreen() { - const content = document.getElementById('content'); - openFullscreen(content); + const btn = document.getElementById('fullscreenBtn'); + console.log(btn); + if (btn.firstElementChild.innerHTML=='fullscreen') { + const content = document.getElementById('content'); + openFullscreen(content); + btn.firstElementChild.innerHTML='fullscreen_exit'; + btn.setAttribute('title', translate["Exit Fullscreen"]); + } else { + closeFullscreen(); + btn.firstElementChild.innerHTML='fullscreen'; + btn.setAttribute('title', translate["Fullscreen"]); + } } // Kick everything off diff --git a/web/skins/classic/views/js/watch.js.php b/web/skins/classic/views/js/watch.js.php index 258a1da73..5b4568dfc 100644 --- a/web/skins/classic/views/js/watch.js.php +++ b/web/skins/classic/views/js/watch.js.php @@ -97,9 +97,13 @@ foreach( dbFetchAll( 'SELECT * FROM ControlPresets WHERE MonitorId = ?', NULL, a $labels[$row['Preset']] = $row['Label']; } -foreach ( $labels as $index=>$label ) { +foreach ($labels as $index=>$label) { ?> labels[] = ''; +var translate = { + "Fullscreen": "", + "Exit Fullscreen": "", +};