Merge pull request #1135 from BeatC/fix-js-from-styles-editions
Editions to "clean css from js"
This commit is contained in:
commit
b2577090bd
|
@ -387,12 +387,10 @@ var Recording = {
|
|||
* @param show {true} to show the recording button, {false} to hide it
|
||||
*/
|
||||
showRecordingButton (show) {
|
||||
let isVisible = show && _isRecordingButtonEnabled();
|
||||
let shouldShow = show && _isRecordingButtonEnabled();
|
||||
let id = 'toolbar_button_record';
|
||||
|
||||
console.log('recording is visible', isVisible);
|
||||
|
||||
if (isVisible) {
|
||||
if (shouldShow) {
|
||||
UIUtil.showElement(id);
|
||||
} else {
|
||||
UIUtil.hideElement(id);
|
||||
|
@ -485,9 +483,6 @@ var Recording = {
|
|||
} else {
|
||||
UIUtil.hideElement(spinnerId);
|
||||
}
|
||||
|
||||
document.querySelector('#recordingSpinner').classList
|
||||
.toggle('show-inline', recordingState === Status.RETRYING);
|
||||
},
|
||||
// checks whether recording is enabled and whether we have params
|
||||
// to start automatically recording
|
||||
|
|
|
@ -296,11 +296,11 @@ var Chat = {
|
|||
let toggleFunction;
|
||||
if (subject) {
|
||||
subject = subject.trim();
|
||||
toggleFunction = UIUtil.showElement.bind(UIUtil);
|
||||
} else {
|
||||
toggleFunction = UIUtil.hideElement.bind(UIUtil);
|
||||
}
|
||||
|
||||
toggleFunction = subject ? UIUtil.showElement : UIUtil.hideElement;
|
||||
toggleFunction = toggleFunction.bind(UIUtil);
|
||||
|
||||
let subjectId = 'subject';
|
||||
let html = linkify(UIUtil.escapeHtml(subject));
|
||||
$(`#${subjectId}`).html(html);
|
||||
|
|
|
@ -241,7 +241,7 @@ const SHOW_CLASSES = {
|
|||
element.classList.remove('hide');
|
||||
}
|
||||
|
||||
let type = this.getElementDefaultDisplay(element.tagName);
|
||||
let type = this._getElementDefaultDisplay(element.tagName);
|
||||
let className = SHOW_CLASSES[type];
|
||||
element.classList.add(className);
|
||||
},
|
||||
|
@ -263,7 +263,7 @@ const SHOW_CLASSES = {
|
|||
return;
|
||||
}
|
||||
|
||||
let type = this.getElementDefaultDisplay(element.tagName);
|
||||
let type = this._getElementDefaultDisplay(element.tagName);
|
||||
let className = SHOW_CLASSES[type];
|
||||
|
||||
if(element.classList.contains(className)) {
|
||||
|
@ -277,8 +277,9 @@ const SHOW_CLASSES = {
|
|||
* Returns default display style for the tag
|
||||
* @param tag
|
||||
* @returns {*}
|
||||
* @private
|
||||
*/
|
||||
getElementDefaultDisplay(tag) {
|
||||
_getElementDefaultDisplay(tag) {
|
||||
let tempElement = document.createElement(tag);
|
||||
|
||||
document.body.appendChild(tempElement);
|
||||
|
|
Loading…
Reference in New Issue