From 7cb83755e67205657239fc04dfc673cf80623890 Mon Sep 17 00:00:00 2001 From: Dmitry Lyzo Date: Sat, 7 Mar 2020 13:15:30 +0300 Subject: [PATCH] Fix recording button icon --- src/components/recordingcreator/recordingbutton.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/components/recordingcreator/recordingbutton.js b/src/components/recordingcreator/recordingbutton.js index a32803e107..576fa59d59 100644 --- a/src/components/recordingcreator/recordingbutton.js +++ b/src/components/recordingcreator/recordingbutton.js @@ -21,6 +21,13 @@ define(['globalize', 'connectionManager', 'require', 'loading', 'apphost', 'dom' } } + function setButtonIcon(button, icon) { + var inner = button.querySelector('i'); + inner.classList.remove('fiber_smart_record'); + inner.classList.remove('fiber_manual_record'); + inner.classList.add(icon); + } + function RecordingButton(options) { this.options = options; @@ -30,7 +37,7 @@ define(['globalize', 'connectionManager', 'require', 'loading', 'apphost', 'dom' this.refresh(options.itemId, options.serverId); } var button = options.button; - button.querySelector('i').innerHTML = 'fiber_manual_record'; + setButtonIcon(button, 'fiber_manual_record'); var clickFn = onRecordingButtonClick.bind(this); this.clickFn = clickFn; @@ -80,7 +87,7 @@ define(['globalize', 'connectionManager', 'require', 'loading', 'apphost', 'dom' var options = this.options; var button = options.button; this.item = item; - button.querySelector('i').innerHTML = getIndicatorIcon(item); + setButtonIcon(button, getIndicatorIcon(item)); if (item.TimerId && (item.Status || 'Cancelled') !== 'Cancelled') { button.classList.add('recordingIcon-active');