Load logoutModal on click instead of always

This commit is contained in:
Isaac Connor 2020-10-16 14:51:47 -04:00
parent d6dfde5630
commit c5cd617204
2 changed files with 2 additions and 2 deletions

View File

@ -737,7 +737,7 @@ function getAcctCircleHTML($skin, $user=null) {
if ( ZM_OPT_USE_AUTH and $user ) {
$result .= '<p id="getAcctCircleHTML" class="navbar-text mr-2">'.PHP_EOL;
$result .= makeLink('#', '<i class="material-icons">account_circle</i> '. $user['Username'],
(ZM_AUTH_TYPE == 'builtin'), 'data-toggle="modal" data-target="#modalLogout" data-backdrop="false"' ).PHP_EOL;
(ZM_AUTH_TYPE == 'builtin'), 'id="logoutButton" data-toggle="modal" data-target="#modalLogout" data-backdrop="false"' ).PHP_EOL;
$result .= '</p>'.PHP_EOL;
}

View File

@ -240,7 +240,7 @@ if ( currentView != 'none' && currentView != 'login' ) {
$j(document).ready(function() {
// Load the Logout and State modals into the dom
getLogoutModal();
$j('#logoutButton').click(getLogoutModal());
if ( canEditSystem ) $j('#stateModalBtn').click(getStateModal);
// Trigger autorefresh of the widget bar stats on the navbar