mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Added toggle footer bar option in webapp.
This commit is contained in:
parent
3ae3da2187
commit
7491607ad3
16 changed files with 226 additions and 33 deletions
|
@ -112,6 +112,7 @@
|
|||
<div tabindex="0" id="uiViewButton2" class="uiSelector" onclick="userInterfaceSelectMenu(2)" title="Interface da barra superior" onkeypress="if (event.key == 'Enter') userInterfaceSelectMenu(2)"><div class="uiSelector2"></div></div>
|
||||
<div tabindex="0" id="uiViewButton3" class="uiSelector" onclick="userInterfaceSelectMenu(3)" title="Interface de largura fixa" onkeypress="if (event.key == 'Enter') userInterfaceSelectMenu(3)"><div class="uiSelector3"></div></div>
|
||||
<div tabindex="0" id="uiViewButton4" class="uiSelector" onclick="toggleNightMode()" title="Alternar modo noturno" onkeypress="if (event.key == 'Enter') toggleNightMode()"><div class="uiSelector4"></div></div>
|
||||
<div tabindex="0" id="uiViewButton5" class="uiSelector" onclick="toggleFooterBarMode()" title="Toggle footer bar" onkeypress="if (event.key == 'Enter') toggleFooterBarMode()"><div class="uiSelector5"></div></div>
|
||||
</div>
|
||||
</div>
|
||||
<table id="MainMenuSpan" cellpadding="0" cellspacing="0" class="style1">
|
||||
|
@ -1108,6 +1109,7 @@
|
|||
var webPageStackMenu = false;
|
||||
var webPageFullScreen = true;
|
||||
var nightMode = (getstore('_nightMode', '0') == '1');
|
||||
var footerBar = (getstore('_footerBar', '1') == '1');
|
||||
var sessionActivity = Date.now();
|
||||
var updateSessionTimer = null;
|
||||
var pluginHandlerBuilder = {{{pluginHandler}}};
|
||||
|
@ -1150,6 +1152,7 @@
|
|||
if (globalHide) { hide = (hide | globalHide); }
|
||||
}
|
||||
args.hide = hide;
|
||||
QV('uiViewButton5', !(args.hide & 4)); // Hide the footer toggle button if footer is hidden anyway.
|
||||
adjustPanels();
|
||||
|
||||
// Setup logout control
|
||||
|
@ -1240,6 +1243,7 @@
|
|||
|
||||
function adjustPanels() {
|
||||
var hide = args.hide;
|
||||
if (footerBar == false) { hide |= 4; }
|
||||
QV('masthead', !(hide & 1));
|
||||
QV('topbar', !(hide & 2));
|
||||
QV('footer', !(hide & 4));
|
||||
|
@ -1278,7 +1282,7 @@
|
|||
|
||||
// Adjust height of remote desktop, files and Intel AMT
|
||||
// 1 = Top bar, 2 = Tool Bar, 4 = Bottom Bar, 8 = Tab Title
|
||||
var xh = (((args.hide & 1) ? 0 : 66) + ((args.hide & 2) ? 0 : 24) + ((args.hide & 4) ? 0 : 45) + ((args.hide & 8) ? 0 : 60)); // 0 to 195
|
||||
var xh = (((hide & 1) ? 0 : 66) + ((hide & 2) ? 0 : 24) + ((hide & 4) ? 0 : 45) + ((hide & 8) ? 0 : 60)); // 0 to 195
|
||||
var xh2 = (uiMode > 1)?24:0;
|
||||
QS('p3users')['max-height'] = 'calc(100vh - ' + (50 + xh) + 'px)'; // 124
|
||||
QS('p3events')['height'] = 'calc(100vh - ' + (50 + xh) + 'px)'; // 124
|
||||
|
@ -1352,10 +1356,12 @@
|
|||
Q('uiViewButton2').classList.remove('uiSelectorSel');
|
||||
Q('uiViewButton3').classList.remove('uiSelectorSel');
|
||||
Q('uiViewButton4').classList.remove('uiSelectorSel');
|
||||
Q('uiViewButton5').classList.remove('uiSelectorSel');
|
||||
try { Q('uiViewButton' + uiMode).classList.add('uiSelectorSel'); } catch (ex) { }
|
||||
QV('uiMenu', (QS('uiMenu').display == 'none'));
|
||||
//Q('uiViewButton1').focus();
|
||||
if (nightMode) { Q('uiViewButton4').classList.add('uiSelectorSel'); }
|
||||
if (footerBar) { Q('uiViewButton5').classList.add('uiSelectorSel'); }
|
||||
}
|
||||
|
||||
function userInterfaceSelectMenu(s) {
|
||||
|
@ -1374,6 +1380,14 @@
|
|||
putstore('_nightMode', nightMode?'1':'0');
|
||||
}
|
||||
|
||||
function toggleFooterBarMode() {
|
||||
footerBar = !footerBar;
|
||||
putstore('_footerBar', footerBar?'1':'0');
|
||||
QS('container')['grid-template-rows'] = null;
|
||||
QS('container')['-ms-grid-rows'] = null;
|
||||
adjustPanels();
|
||||
}
|
||||
|
||||
// Toggle the web page to full screen
|
||||
function toggleFullScreen(toggle) {
|
||||
if (toggle === 1) { webPageFullScreen = !webPageFullScreen; putstore('webPageFullScreen', webPageFullScreen); }
|
||||
|
@ -5542,7 +5556,9 @@
|
|||
if (e.shiftKey == true) { enterBrowserFullscreen(Q('deskarea0')); browserfullscreen = true; }
|
||||
} else {
|
||||
QC('body').remove('fulldesk');
|
||||
var xh = (((args.hide & 1) ? 0 : 66) + ((args.hide & 2) ? 0 : 24) + ((args.hide & 4) ? 0 : 45) + ((args.hide & 8) ? 0 : 60)); // 0 to 195
|
||||
var hide = args.hide;
|
||||
if (footerBar == false) { hide |= 4; }
|
||||
var xh = (((hide & 1) ? 0 : 66) + ((hide & 2) ? 0 : 24) + ((hide & 4) ? 0 : 45) + ((hide & 8) ? 0 : 60)); // 0 to 195
|
||||
QS('deskarea3x')['height'] = 'calc(100vh - ' + (75 + xh) + 'px)';
|
||||
QS('deskarea3x')['max-height'] = 'calc(100vh - ' + (75 + xh) + 'px)';
|
||||
if (browserfullscreen == true) { exitBrowserFullscreen(); browserfullscreen = false; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue