Merge branch 'm-voloshin-FIX-frozen-tooltips'
This commit is contained in:
commit
d2ccd20c78
|
@ -519,16 +519,13 @@ SmallVideo.prototype.showDominantSpeakerIndicator = function (show) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var indicatorSpanId = "dominantspeakerindicator";
|
var indicatorSpan = this.getIndicatorSpan({
|
||||||
var indicatorSpan = this.getIndicatorSpan(indicatorSpanId);
|
id: 'dominantspeakerindicator',
|
||||||
|
content: '<i id="indicatoricon" class="fa fa-bullhorn"></i>',
|
||||||
|
tooltip: 'speaker'
|
||||||
|
});
|
||||||
|
|
||||||
indicatorSpan.innerHTML
|
indicatorSpan.style.display = show ? "" : "none";
|
||||||
= "<i id='indicatoricon' class='fa fa-bullhorn'></i>";
|
|
||||||
// adds a tooltip
|
|
||||||
UIUtil.setTooltip(indicatorSpan, "speaker", "top");
|
|
||||||
APP.translation.translateElement($(indicatorSpan));
|
|
||||||
|
|
||||||
$(indicatorSpan).css("visibility", show ? "visible" : "hidden");
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -542,35 +539,43 @@ SmallVideo.prototype.showRaisedHandIndicator = function (show) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var indicatorSpanId = "raisehandindicator";
|
var indicatorSpan = this.getIndicatorSpan({
|
||||||
var indicatorSpan = this.getIndicatorSpan(indicatorSpanId);
|
id: 'raisehandindicator',
|
||||||
|
content: '<i id="indicatoricon" class="icon-raised-hand"></i>',
|
||||||
|
tooltip: 'raisedHand'
|
||||||
|
});
|
||||||
|
|
||||||
indicatorSpan.innerHTML
|
indicatorSpan.style.display = show ? "" : "none";
|
||||||
= "<i id='indicatoricon' class='icon-raised-hand'></i>";
|
|
||||||
|
|
||||||
// adds a tooltip
|
|
||||||
UIUtil.setTooltip(indicatorSpan, "raisedHand", "top");
|
|
||||||
APP.translation.translateElement($(indicatorSpan));
|
|
||||||
|
|
||||||
$(indicatorSpan).css("visibility", show ? "visible" : "hidden");
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets (creating if necessary) the "indicator" span for this SmallVideo
|
* Gets (creating if necessary) the "indicator" span for this SmallVideo.
|
||||||
identified by an ID.
|
*
|
||||||
|
* @param options.id {String} element ID
|
||||||
|
* @param options.content {String} HTML content of the indicator
|
||||||
|
* @param options.tooltip {String} The key that should be passed to tooltip
|
||||||
|
*
|
||||||
|
* @returns {HTMLElement} DOM represention of the indicator
|
||||||
*/
|
*/
|
||||||
SmallVideo.prototype.getIndicatorSpan = function(id) {
|
SmallVideo.prototype.getIndicatorSpan = function(options) {
|
||||||
var indicatorSpan;
|
var indicator = this.container.querySelector('#' + options.id);
|
||||||
var spans = $(`#${this.videoSpanId}>[id=${id}`);
|
|
||||||
if (spans.length <= 0) {
|
if (indicator) {
|
||||||
indicatorSpan = document.createElement('span');
|
return indicator;
|
||||||
indicatorSpan.id = id;
|
|
||||||
indicatorSpan.className = "indicator";
|
|
||||||
$('#' + this.videoSpanId)[0].appendChild(indicatorSpan);
|
|
||||||
} else {
|
|
||||||
indicatorSpan = spans[0];
|
|
||||||
}
|
}
|
||||||
return indicatorSpan;
|
|
||||||
|
indicator = document.createElement('span');
|
||||||
|
indicator.className = 'indicator';
|
||||||
|
indicator.id = options.id;
|
||||||
|
|
||||||
|
indicator.innerHTML = options.content;
|
||||||
|
|
||||||
|
UIUtil.setTooltip(indicator, options.tooltip, "top");
|
||||||
|
APP.translation.translateElement($(indicator));
|
||||||
|
|
||||||
|
this.container.appendChild(indicator);
|
||||||
|
|
||||||
|
return indicator;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue