|
|
|
@ -417,8 +417,12 @@ Toolbar = { |
|
|
|
|
* @param show <tt>true</tt> to show or <tt>false</tt> to hide |
|
|
|
|
*/ |
|
|
|
|
showAuthenticateButton (show) { |
|
|
|
|
document.querySelector('#authenticationContainer') |
|
|
|
|
.classList.toggle('hide', !show); |
|
|
|
|
let id = 'authenticationContainer'; |
|
|
|
|
if (show) { |
|
|
|
|
UIUtil.showElement(id); |
|
|
|
|
} else { |
|
|
|
|
UIUtil.hideElement(id); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
showEtherpadButton () { |
|
|
|
@ -429,12 +433,17 @@ Toolbar = { |
|
|
|
|
|
|
|
|
|
// Shows or hides the 'shared video' button.
|
|
|
|
|
showSharedVideoButton () { |
|
|
|
|
if (!UIUtil.isButtonEnabled('sharedvideo')) { |
|
|
|
|
return; |
|
|
|
|
let id = 'toolbar_button_sharedvideo'; |
|
|
|
|
let shouldShow = UIUtil.isButtonEnabled('sharedvideo') |
|
|
|
|
&& !config.disableThirdPartyRequests; |
|
|
|
|
|
|
|
|
|
if (shouldShow) { |
|
|
|
|
let el = document.getElementById(id); |
|
|
|
|
UIUtil.setTooltip(el, 'toolbar.sharedvideo', 'right'); |
|
|
|
|
UIUtil.showElement(id); |
|
|
|
|
} else { |
|
|
|
|
UIUtil.hideElement(id); |
|
|
|
|
} |
|
|
|
|
var el = document.querySelector('#toolbar_button_sharedvideo'); |
|
|
|
|
UIUtil.setTooltip(el, 'toolbar.sharedvideo', 'right'); |
|
|
|
|
el.classList.toggle('hide', config.disableThirdPartyRequests === true); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
// checks whether desktop sharing is enabled and whether
|
|
|
|
@ -448,20 +457,26 @@ Toolbar = { |
|
|
|
|
|
|
|
|
|
// Shows or hides SIP calls button
|
|
|
|
|
showSipCallButton (show) { |
|
|
|
|
if (!UIUtil.isButtonEnabled('sip')) { |
|
|
|
|
return; |
|
|
|
|
let shouldShow = APP.conference.sipGatewayEnabled() |
|
|
|
|
&& UIUtil.isButtonEnabled('sip') && show; |
|
|
|
|
let id = 'toolbar_button_sip'; |
|
|
|
|
|
|
|
|
|
if (shouldShow) { |
|
|
|
|
UIUtil.showElement(id); |
|
|
|
|
} else { |
|
|
|
|
UIUtil.hideElement(id); |
|
|
|
|
} |
|
|
|
|
document.querySelector('#toolbar_button_sip').classList |
|
|
|
|
.toggle('hide', !(show && APP.conference.sipGatewayEnabled())); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
// Shows or hides the dialpad button
|
|
|
|
|
showDialPadButton (show) { |
|
|
|
|
if (!UIUtil.isButtonEnabled('dialpad')) { |
|
|
|
|
return; |
|
|
|
|
let shouldShow = UIUtil.isButtonEnabled('dialpad') && show; |
|
|
|
|
let id = 'toolbar_button_dialpad'; |
|
|
|
|
if (shouldShow) { |
|
|
|
|
UIUtil.showElement(id); |
|
|
|
|
} else { |
|
|
|
|
UIUtil.hideElement(id); |
|
|
|
|
} |
|
|
|
|
document.querySelector('#toolbar_button_dialpad') |
|
|
|
|
.classList.toggle('hide', !show); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
@ -469,9 +484,14 @@ Toolbar = { |
|
|
|
|
* @param authIdentity identity name to be displayed. |
|
|
|
|
*/ |
|
|
|
|
setAuthenticatedIdentity (authIdentity) { |
|
|
|
|
let selector = $('#toolbar_auth_identity'); |
|
|
|
|
selector.text(authIdentity ? authIdentity : ''); |
|
|
|
|
selector.get(0).classList.toggle('hide', !authIdentity); |
|
|
|
|
let id = 'toolbar_auth_identity'; |
|
|
|
|
if(authIdentity) { |
|
|
|
|
UIUtil.showElement(id); |
|
|
|
|
$(`#${id}`).text(authIdentity); |
|
|
|
|
} else { |
|
|
|
|
UIUtil.hideElement(id); |
|
|
|
|
$(`#${id}`).text(''); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
@ -479,8 +499,12 @@ Toolbar = { |
|
|
|
|
* @param show <tt>true</tt> to show |
|
|
|
|
*/ |
|
|
|
|
showLoginButton (show) { |
|
|
|
|
document.querySelector('#toolbar_button_login') |
|
|
|
|
.classList.toggle('hide', !show); |
|
|
|
|
let id = 'toolbar_button_login'; |
|
|
|
|
if (show) { |
|
|
|
|
UIUtil.showElement(id); |
|
|
|
|
} else { |
|
|
|
|
UIUtil.hideElement(id); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
@ -488,8 +512,12 @@ Toolbar = { |
|
|
|
|
* @param show <tt>true</tt> to show |
|
|
|
|
*/ |
|
|
|
|
showLogoutButton (show) { |
|
|
|
|
document.querySelector('#toolbar_button_logout') |
|
|
|
|
.classList.toggle('hide', !show); |
|
|
|
|
let id = 'toolbar_button_logout'; |
|
|
|
|
if (show) { |
|
|
|
|
UIUtil.showElement(id); |
|
|
|
|
} else { |
|
|
|
|
UIUtil.hideElement(id); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|