Sfoglia il codice sorgente

Fixes comments.

master
damencho 8 anni fa
parent
commit
3ae299cf2b
1 ha cambiato i file con 9 aggiunte e 22 eliminazioni
  1. 9
    22
      modules/UI/videolayout/SmallVideo.js

+ 9
- 22
modules/UI/videolayout/SmallVideo.js Vedi File

54
     return $('#' + this.videoSpanId).is(':visible');
54
     return $('#' + this.videoSpanId).is(':visible');
55
 };
55
 };
56
 
56
 
57
-SmallVideo.prototype.showDisplayName = function(isShow) {
58
-    var nameSpan = $('#' + this.videoSpanId + ' .displayname').get(0);
59
-    if (isShow) {
60
-        if (nameSpan && nameSpan.innerHTML && nameSpan.innerHTML.length)
61
-            nameSpan.setAttribute("style", "display:inline-block;");
62
-    }
63
-    else {
64
-        if (nameSpan)
65
-            nameSpan.setAttribute("style", "display:none;");
66
-    }
67
-};
68
-
69
 /**
57
 /**
70
  * Enables / disables the device availability icons for this small video.
58
  * Enables / disables the device availability icons for this small video.
71
  * @param {enable} set to {true} to enable and {false} to disable
59
  * @param {enable} set to {true} to enable and {false} to disable
160
  */
148
  */
161
 SmallVideo.prototype.bindHoverHandler = function () {
149
 SmallVideo.prototype.bindHoverHandler = function () {
162
     // Add hover handler
150
     // Add hover handler
163
-    var self = this;
164
     $(this.container).hover(
151
     $(this.container).hover(
165
-        function () {
166
-            if (!self.VideoLayout.isCurrentlyOnLarge(self.id)) {
167
-                $('#' + self.videoSpanId + ' .videocontainer__overlay')
152
+        () => {
153
+            if (!this.VideoLayout.isCurrentlyOnLarge(this.id)) {
154
+                $('#' + this.videoSpanId + ' .videocontainer__overlay')
168
                     .removeClass("hide")
155
                     .removeClass("hide")
169
                     .addClass("show-inline");
156
                     .addClass("show-inline");
157
+                UIUtil.setVisibility(this.$displayName(), true);
170
             }
158
             }
171
-            self.showDisplayName(true);
172
         },
159
         },
173
-        function () {
174
-            $('#' + self.videoSpanId + ' .videocontainer__overlay')
160
+        () => {
161
+            $('#' + this.videoSpanId + ' .videocontainer__overlay')
175
                 .removeClass("show-inline")
162
                 .removeClass("show-inline")
176
                 .addClass("hide");
163
                 .addClass("hide");
177
             // If the video has been "pinned" by the user we want to
164
             // If the video has been "pinned" by the user we want to
178
             // keep the display name on place.
165
             // keep the display name on place.
179
-            if (!self.VideoLayout.isLargeVideoVisible() ||
180
-                !self.VideoLayout.isCurrentlyOnLarge(self.id))
181
-                self.showDisplayName(false);
166
+            if (!this.VideoLayout.isLargeVideoVisible() ||
167
+                !this.VideoLayout.isCurrentlyOnLarge(this.id))
168
+                UIUtil.setVisibility(this.$displayName(), false);
182
         }
169
         }
183
     );
170
     );
184
 };
171
 };

Loading…
Annulla
Salva