Implement Exit Fullscreen using same button
This commit is contained in:
parent
a7fd65d844
commit
14e578cdb2
|
@ -971,8 +971,18 @@ function initPage() {
|
||||||
} // initPage
|
} // initPage
|
||||||
|
|
||||||
function watchFullscreen() {
|
function watchFullscreen() {
|
||||||
|
const btn = document.getElementById('fullscreenBtn');
|
||||||
|
console.log(btn);
|
||||||
|
if (btn.firstElementChild.innerHTML=='fullscreen') {
|
||||||
const content = document.getElementById('content');
|
const content = document.getElementById('content');
|
||||||
openFullscreen(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