ソースを参照

BEMificated classes and add title

master
Ilya Daynatovich 8年前
コミット
26792625f2
3個のファイルの変更47行の追加19行の削除
  1. 3
    1
      css/_jitsi_popover.scss
  2. 2
    2
      modules/UI/util/JitsiPopover.js
  3. 42
    16
      modules/UI/videolayout/ConnectionIndicator.js

+ 3
- 1
css/_jitsi_popover.scss ファイルの表示

@@ -21,7 +21,9 @@
21 21
     margin-bottom: 35px;
22 22
 
23 23
     &__title {
24
-        text-align: center;
24
+        text-align: left;
25
+        margin: 0;
26
+        padding: 0;
25 27
     }
26 28
 
27 29
     &__content {

+ 2
- 2
modules/UI/util/JitsiPopover.js ファイルの表示

@@ -76,7 +76,7 @@ var JitsiPopover = (function () {
76 76
      */
77 77
     JitsiPopover.prototype.createPopover = function () {
78 78
         $("body").append(this.template);
79
-        $(".jitsipopover > .jitsipopover-content").html(this.options.content);
79
+        $(".jitsipopover > .jitsipopover__content").html(this.options.content);
80 80
         var self = this;
81 81
         $(".jitsipopover").on("mouseenter", function () {
82 82
             self.popoverIsHovered = true;
@@ -103,7 +103,7 @@ var JitsiPopover = (function () {
103 103
                 $(".jitsipopover").css(
104 104
                     {top: position.top, left: position.left, display: "table"});
105 105
                 $(".jitsipopover > .arrow").css({left: calcLeft});
106
-                $(".jitsipopover > .jitsiPopupmenuPadding").css(
106
+                $(".jitsipopover > .jitsipopover__menu-padding").css(
107 107
                     {left: calcLeft - 50});
108 108
             }
109 109
         });

+ 42
- 16
modules/UI/videolayout/ConnectionIndicator.js ファイルの表示

@@ -95,21 +95,47 @@ ConnectionIndicator.prototype.generateText = function () {
95 95
         return `${width}x${height}`;
96 96
     }).join(', ') || 'N/A';
97 97
 
98
-    var result = "<table style='width:100%'>" +
99
-        "<tr>" +
100
-        "<td><span data-i18n='connectionindicator.bitrate'>" +
101
-        translate("connectionindicator.bitrate") + "</span></td>" +
102
-        "<td><span class='jitsipopover__green'>&darr;</span>" +
103
-        downloadBitrate + " <span class='jitsipopover__orange'>&uarr;</span>" +
104
-        uploadBitrate + "</td>" +
105
-        "</tr><tr>" +
106
-        "<td><span data-i18n='connectionindicator.packetloss'>" +
107
-        translate("connectionindicator.packetloss") + "</span></td>" +
108
-        "<td>" + packetLoss  + "</td>" +
109
-        "</tr><tr>" +
110
-        "<td><span data-i18n='connectionindicator.resolution'>" +
111
-        translate("connectionindicator.resolution") + "</span></td>" +
112
-        "<td>" + resolutionStr + "</td></tr></table>";
98
+    let headerKey = 'connectionindicator.header';
99
+    let result = (
100
+        `<table style='width:100%'>
101
+            <tr>
102
+                <td>
103
+                    <span class="jitsipopover__title"
104
+                        data-i18n="">${translate(headerKey)}</span>
105
+                </td>
106
+            </tr>
107
+            <tr>
108
+                <td>
109
+                    <span data-i18n='connectionindicator.bitrate'>
110
+                        ${translate("connectionindicator.bitrate")}
111
+                    </span>
112
+                </td>
113
+                <td>
114
+                    <span class='jitsipopover__green'>&darr;</span>
115
+                    ${downloadBitrate}
116
+                    <span class='jitsipopover__orange'>&uarr;</span>
117
+                    ${uploadBitrate}
118
+                </td>
119
+            </tr>
120
+            <tr>
121
+                <td>
122
+                    <span data-i18n='connectionindicator.packetloss'>
123
+                        ${translate("connectionindicator.packetloss")}
124
+                    </span>
125
+                </td>
126
+                <td>${packetLoss}</td>
127
+            </tr>
128
+            <tr>
129
+                <td>
130
+                    <span data-i18n='connectionindicator.resolution'>
131
+                        ${translate("connectionindicator.resolution")}
132
+                    </span>
133
+                </td>
134
+                <td>
135
+                    ${resolutionStr}
136
+                </td>
137
+            </tr>
138
+        </table>`);
113 139
 
114 140
     if(this.videoContainer.videoSpanId == "localVideoContainer") {
115 141
         result += "<a class=\"jitsipopover__showmore link\" " +
@@ -232,7 +258,7 @@ ConnectionIndicator.prototype.generateText = function () {
232 258
 
233 259
         result += transport + "</table>";
234 260
     }
235
-    
261
+
236 262
     return result;
237 263
 };
238 264
 

読み込み中…
キャンセル
保存