Procházet zdrojové kódy

Fix icon styles

master
Ilya Daynatovich před 9 roky
rodič
revize
69b79b7687

+ 9
- 0
css/_mixins.scss Zobrazit soubor

@@ -50,6 +50,15 @@
50 50
   border-radius: 50%;
51 51
 }
52 52
 
53
+/**
54
+* Absolute position the element at the top left corner
55
+**/
56
+@mixin topLeft() {
57
+    position: absolute;
58
+    top: 0;
59
+    left: 0;
60
+}
61
+
53 62
 @mixin absoluteAligning($sizeX, $sizeY) {
54 63
   top: 50%;
55 64
   left: 50%;

+ 32
- 26
css/_videolayout_default.scss Zobrazit soubor

@@ -306,37 +306,43 @@
306 306
         line-height: $thumbnailIndicatorSize - 2 * $thumbnailIndicatorBorder;
307 307
     }
308 308
 
309
-    .connection.connection_empty
310
-    {
311
-        color: #8B8B8B;/*#FFFFFF*/
312
-        overflow: hidden;
309
+    .connection {
310
+        position: relative;
311
+        margin: 0 auto;
312
+        width: 12px;
313
+        height: 8px;
314
+
315
+        &_empty
316
+        {
317
+            @include topLeft();
318
+            max-width: 12px;
319
+            width: 12px;
320
+            color: #8B8B8B;/*#FFFFFF*/
321
+            overflow: hidden;
322
+        }
323
+
324
+        &_lost
325
+        {
326
+            @include topLeft();
327
+            max-width: 12px;
328
+            width: 12px;
329
+            color: #8B8B8B;
330
+            overflow: visible;
331
+        }
332
+
333
+        &_full
334
+        {
335
+            @include topLeft();
336
+            max-width: 12px;
337
+            width: 12px;
338
+            color: #FFFFFF;/*#15A1ED*/
339
+            overflow: hidden;
340
+        }
313 341
     }
314 342
 
315
-    .connection.connection_lost
316
-    {
317
-        color: #8B8B8B;
318
-        overflow: visible;
319
-    }
320
-
321
-    .connection.connection_full
322
-    {
323
-        color: #FFFFFF;/*#15A1ED*/
324
-        overflow: hidden;
325
-    }
326
-
327
-    .connection,
328 343
     .icon-connection,
329 344
     .icon-connection-lost {
330 345
         font-size: 6pt;
331
-        line-height: $thumbnailIndicatorSize - 2*$thumbnailIndicatorBorder;
332
-    }
333
-
334
-    .connection
335
-    {
336
-        position: absolute;
337
-        left: 0px;
338
-        top: 0px;
339
-        border: 0px;
340 346
     }
341 347
 }
342 348
 

+ 8
- 4
modules/UI/util/UIUtil.js Zobrazit soubor

@@ -414,10 +414,14 @@ const TOOLTIP_POSITIONS = {
414 414
             indicatorSpan.className = 'indicator';
415 415
             indicatorSpan.id = indicatorId;
416 416
 
417
-            indicatorSpan.innerHTML = opts.content;
418
-
419
-            this.setTooltip(indicatorSpan, opts.tooltip, "top");
420
-            APP.translation.translateElement($(indicatorSpan));
417
+            if(opts.content) {
418
+                indicatorSpan.innerHTML = opts.content;
419
+            }
420
+
421
+            if (opts.tooltip) {
422
+                this.setTooltip(indicatorSpan, opts.tooltip, "top");
423
+                APP.translation.translateElement($(indicatorSpan));
424
+            }
421 425
 
422 426
             document.getElementById(videoSpanId)
423 427
                 .querySelector('.videocontainer__toptoolbar')

+ 13
- 7
modules/UI/videolayout/ConnectionIndicator.js Zobrazit soubor

@@ -249,7 +249,6 @@ ConnectionIndicator.prototype.showMore = function () {
249 249
 
250 250
 function createIcon(classes, iconClass) {
251 251
     var icon = document.createElement("span");
252
-    icon.classList.add("indicatoricon");
253 252
     for(var i in classes) {
254 253
         icon.classList.add(classes[i]);
255 254
     }
@@ -267,6 +266,7 @@ ConnectionIndicator.prototype.create = function () {
267 266
         videoSpanId: this.videoContainer.videoSpanId,
268 267
         indicatorId
269 268
     });
269
+    element.classList.add('show');
270 270
     this.connectionIndicatorContainer = element;
271 271
 
272 272
     let popoverContent = (
@@ -289,13 +289,19 @@ ConnectionIndicator.prototype.create = function () {
289 289
         origShowFunc.call(this.popover);
290 290
     }.bind(this);
291 291
 
292
-    this.emptyIcon = this.connectionIndicatorContainer.appendChild(
293
-        createIcon(["connection", "connection_empty"], "icon-connection"));
294
-    this.fullIcon = this.connectionIndicatorContainer.appendChild(
295
-        createIcon(["connection", "connection_full"], "icon-connection"));
296
-    this.interruptedIndicator = this.connectionIndicatorContainer.appendChild(
297
-        createIcon(["connection", "connection_lost"],"icon-connection-lost"));
292
+    let connectionIconContainer = document.createElement('div');
293
+    connectionIconContainer.className = 'connection indicatoricon';
294
+
295
+
296
+    this.emptyIcon = connectionIconContainer.appendChild(
297
+        createIcon(["connection_empty"], "icon-connection"));
298
+    this.fullIcon = connectionIconContainer.appendChild(
299
+        createIcon(["connection_full"], "icon-connection"));
300
+    this.interruptedIndicator = connectionIconContainer.appendChild(
301
+        createIcon(["connection_lost"],"icon-connection-lost"));
302
+
298 303
     $(this.interruptedIndicator).hide();
304
+    this.connectionIndicatorContainer.appendChild(connectionIconContainer);
299 305
 };
300 306
 
301 307
 /**

Načítá se…
Zrušit
Uložit