mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-07-05 18:56:20 -04:00
Load logoutModal on click instead of always
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user