Updated method for showing/hiding elements

This commit is contained in:
Ilya Daynatovich 2016-11-04 12:40:21 +02:00
parent 68ab87cc0d
commit a8a6b38c28
2 changed files with 22 additions and 8 deletions

View File

@ -443,10 +443,10 @@ UI.start = function () {
// Display notice message at the top of the toolbar
if (config.noticeMessage) {
$('#noticeText').text(config.noticeMessage);
$('#notice').css({display: 'block'});
UIUtil.showElement('notice');
}
} else {
document.querySelector('#mainToolbarContainer').classList.add('hide');
UIUtil.hideElement('mainToolbarContainer');
FilmStrip.setupFilmStripOnly();
messageHandler.enableNotifications(false);
JitsiPopover.enabled = false;

View File

@ -219,10 +219,17 @@ const TOOLTIP_POSITIONS = {
* @param {String} the identifier of the element to show
*/
showElement(id) {
if ($("#"+id).hasClass("hide"))
$("#"+id).removeClass("hide");
let element = document.getElementById(id);
$("#"+id).addClass("show");
if (!element) {
return;
}
if(element.classList.contains('hide')) {
element.classList.remove('hide');
}
element.classList.add('show');
},
/**
@ -231,10 +238,17 @@ const TOOLTIP_POSITIONS = {
* @param {String} the identifier of the element to hide
*/
hideElement(id) {
if ($("#"+id).hasClass("show"))
$("#"+id).removeClass("show");
let element = document.getElementById(id);
$("#"+id).addClass("hide");
if (!element) {
return;
}
if(element.classList.contains('show')) {
element.classList.remove('show');
}
element.classList.add('hide');
},
/**