Implement Exit Fullscreen using same button
This commit is contained in:
parent
43c1886267
commit
5d0bd978e4
|
@ -971,8 +971,18 @@ function initPage() {
|
||||||
} // initPage
|
} // initPage
|
||||||
|
|
||||||
function watchFullscreen() {
|
function watchFullscreen() {
|
||||||
const content = document.getElementById('content');
|
const btn = document.getElementById('fullscreenBtn');
|
||||||
openFullscreen(content);
|
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
|
// Kick everything off
|
||||||
|
|
|
@ -97,9 +97,13 @@ foreach( dbFetchAll( 'SELECT * FROM ControlPresets WHERE MonitorId = ?', NULL, a
|
||||||
$labels[$row['Preset']] = $row['Label'];
|
$labels[$row['Preset']] = $row['Label'];
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ( $labels as $index=>$label ) {
|
foreach ($labels as $index=>$label) {
|
||||||
?>
|
?>
|
||||||
labels[<?php echo validInt($index) ?>] = '<?php echo validJsStr($label) ?>';
|
labels[<?php echo validInt($index) ?>] = '<?php echo validJsStr($label) ?>';
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
var translate = {
|
||||||
|
"Fullscreen": "<?php echo translate('Fullscreen') ?>",
|
||||||
|
"Exit Fullscreen": "<?php echo translate('Exit Fullscreen') ?>",
|
||||||
|
};
|
||||||
|
|
Loading…
Reference in New Issue