Ilya Daynatovich 8 роки тому
джерело
коміт
148960c6d2

+ 2
- 7
modules/UI/recording/Recording.js Переглянути файл

@@ -387,12 +387,10 @@ var Recording = {
387 387
      * @param show {true} to show the recording button, {false} to hide it
388 388
      */
389 389
     showRecordingButton (show) {
390
-        let isVisible = show && _isRecordingButtonEnabled();
390
+        let shouldShow = show && _isRecordingButtonEnabled();
391 391
         let id = 'toolbar_button_record';
392 392
 
393
-        console.log('recording is visible', isVisible);
394
-
395
-        if (isVisible) {
393
+        if (shouldShow) {
396 394
             UIUtil.showElement(id);
397 395
         } else {
398 396
             UIUtil.hideElement(id);
@@ -485,9 +483,6 @@ var Recording = {
485 483
         } else {
486 484
             UIUtil.hideElement(spinnerId);
487 485
         }
488
-
489
-        document.querySelector('#recordingSpinner').classList
490
-                .toggle('show-inline', recordingState === Status.RETRYING);
491 486
     },
492 487
     // checks whether recording is enabled and whether we have params
493 488
     // to start automatically recording

+ 3
- 3
modules/UI/side_pannels/chat/Chat.js Переглянути файл

@@ -296,11 +296,11 @@ var Chat = {
296 296
         let toggleFunction;
297 297
         if (subject) {
298 298
             subject = subject.trim();
299
-            toggleFunction = UIUtil.showElement.bind(UIUtil);
300
-        } else {
301
-            toggleFunction = UIUtil.hideElement.bind(UIUtil);
302 299
         }
303 300
 
301
+        toggleFunction = subject ? UIUtil.showElement : UIUtil.hideElement;
302
+        toggleFunction = toggleFunction.bind(UIUtil);
303
+
304 304
         let subjectId = 'subject';
305 305
         let html = linkify(UIUtil.escapeHtml(subject));
306 306
         $(`#${subjectId}`).html(html);

+ 4
- 3
modules/UI/util/UIUtil.js Переглянути файл

@@ -241,7 +241,7 @@ const SHOW_CLASSES = {
241 241
             element.classList.remove('hide');
242 242
         }
243 243
 
244
-        let type = this.getElementDefaultDisplay(element.tagName);
244
+        let type = this._getElementDefaultDisplay(element.tagName);
245 245
         let className = SHOW_CLASSES[type];
246 246
         element.classList.add(className);
247 247
     },
@@ -263,7 +263,7 @@ const SHOW_CLASSES = {
263 263
             return;
264 264
         }
265 265
 
266
-        let type = this.getElementDefaultDisplay(element.tagName);
266
+        let type = this._getElementDefaultDisplay(element.tagName);
267 267
         let className = SHOW_CLASSES[type];
268 268
 
269 269
         if(element.classList.contains(className)) {
@@ -277,8 +277,9 @@ const SHOW_CLASSES = {
277 277
      * Returns default display style for the tag
278 278
      * @param tag
279 279
      * @returns {*}
280
+     * @private
280 281
      */
281
-    getElementDefaultDisplay(tag) {
282
+    _getElementDefaultDisplay(tag) {
282 283
         let tempElement = document.createElement(tag);
283 284
 
284 285
         document.body.appendChild(tempElement);

Завантаження…
Відмінити
Зберегти