瀏覽代碼

Update Connection indicator and popover js

master
Ilya Daynatovich 8 年之前
父節點
當前提交
83e7f23d0f
共有 2 個檔案被更改,包括 21 行新增21 行删除
  1. 2
    2
      modules/UI/util/JitsiPopover.js
  2. 19
    19
      modules/UI/videolayout/ConnectionIndicator.js

+ 2
- 2
modules/UI/util/JitsiPopover.js 查看文件

29
         this.element = element;
29
         this.element = element;
30
         this.template = ' <div class="jitsipopover ' + this.options.skin +
30
         this.template = ' <div class="jitsipopover ' + this.options.skin +
31
             '"><div class="arrow"></div>' +
31
             '"><div class="arrow"></div>' +
32
-            '<div class="jitsipopover-content"></div>' +
33
-            '<div class="jitsiPopupmenuPadding"></div></div>';
32
+            '<div class="jitsipopover__content"></div>' +
33
+            '<div class="jitsipopover__menu-padding"></div></div>';
34
         var self = this;
34
         var self = this;
35
         this.element.on("mouseenter", function () {
35
         this.element.on("mouseenter", function () {
36
             self.elementIsHovered = true;
36
             self.elementIsHovered = true;

+ 19
- 19
modules/UI/videolayout/ConnectionIndicator.js 查看文件

80
         packetLoss = "N/A";
80
         packetLoss = "N/A";
81
     } else {
81
     } else {
82
 
82
 
83
-        packetLoss = "<span class='jitsipopover_green'>&darr;</span>" +
83
+        packetLoss = "<span class='jitsipopover__green'>&darr;</span>" +
84
             (this.packetLoss.download !== null ?
84
             (this.packetLoss.download !== null ?
85
                 this.packetLoss.download : "N/A") +
85
                 this.packetLoss.download : "N/A") +
86
-            "% <span class='jitsipopover_orange'>&uarr;</span>" +
86
+            "% <span class='jitsipopover__orange'>&uarr;</span>" +
87
             (this.packetLoss.upload !== null? this.packetLoss.upload : "N/A") +
87
             (this.packetLoss.upload !== null? this.packetLoss.upload : "N/A") +
88
             "%";
88
             "%";
89
     }
89
     }
97
 
97
 
98
     var result = "<table style='width:100%'>" +
98
     var result = "<table style='width:100%'>" +
99
         "<tr>" +
99
         "<tr>" +
100
-        "<td><span class='jitsipopover_blue' data-i18n='connectionindicator.bitrate'>" +
100
+        "<td><span data-i18n='connectionindicator.bitrate'>" +
101
         translate("connectionindicator.bitrate") + "</span></td>" +
101
         translate("connectionindicator.bitrate") + "</span></td>" +
102
-        "<td><span class='jitsipopover_green'>&darr;</span>" +
103
-        downloadBitrate + " <span class='jitsipopover_orange'>&uarr;</span>" +
102
+        "<td><span class='jitsipopover__green'>&darr;</span>" +
103
+        downloadBitrate + " <span class='jitsipopover__orange'>&uarr;</span>" +
104
         uploadBitrate + "</td>" +
104
         uploadBitrate + "</td>" +
105
         "</tr><tr>" +
105
         "</tr><tr>" +
106
-        "<td><span class='jitsipopover_blue' data-i18n='connectionindicator.packetloss'>" +
106
+        "<td><span data-i18n='connectionindicator.packetloss'>" +
107
         translate("connectionindicator.packetloss") + "</span></td>" +
107
         translate("connectionindicator.packetloss") + "</span></td>" +
108
         "<td>" + packetLoss  + "</td>" +
108
         "<td>" + packetLoss  + "</td>" +
109
         "</tr><tr>" +
109
         "</tr><tr>" +
110
-        "<td><span class='jitsipopover_blue' data-i18n='connectionindicator.resolution'>" +
110
+        "<td><span data-i18n='connectionindicator.resolution'>" +
111
         translate("connectionindicator.resolution") + "</span></td>" +
111
         translate("connectionindicator.resolution") + "</span></td>" +
112
         "<td>" + resolutionStr + "</td></tr></table>";
112
         "<td>" + resolutionStr + "</td></tr></table>";
113
 
113
 
114
     if(this.videoContainer.videoSpanId == "localVideoContainer") {
114
     if(this.videoContainer.videoSpanId == "localVideoContainer") {
115
-        result += "<div class=\"jitsipopover_showmore\" " +
115
+        result += "<a class=\"jitsipopover__showmore link\" " +
116
             "onclick = \"APP.UI.connectionIndicatorShowMore('" +
116
             "onclick = \"APP.UI.connectionIndicatorShowMore('" +
117
             // FIXME: we do not know local id when this text is generated
117
             // FIXME: we do not know local id when this text is generated
118
             //this.id + "')\"  data-i18n='connectionindicator." +
118
             //this.id + "')\"  data-i18n='connectionindicator." +
119
             "local')\"  data-i18n='connectionindicator." +
119
             "local')\"  data-i18n='connectionindicator." +
120
                 (this.showMoreValue ? "less" : "more") + "'>" +
120
                 (this.showMoreValue ? "less" : "more") + "'>" +
121
             translate("connectionindicator." + (this.showMoreValue ? "less" : "more")) +
121
             translate("connectionindicator." + (this.showMoreValue ? "less" : "more")) +
122
-            "</div><br />";
122
+            "</a>";
123
     }
123
     }
124
 
124
 
125
     if (this.showMoreValue) {
125
     if (this.showMoreValue) {
138
 
138
 
139
         if (!this.transport || this.transport.length === 0) {
139
         if (!this.transport || this.transport.length === 0) {
140
             transport = "<tr>" +
140
             transport = "<tr>" +
141
-                "<td><span class='jitsipopover_blue' " +
141
+                "<td><span " +
142
                 "data-i18n='connectionindicator.address'>" +
142
                 "data-i18n='connectionindicator.address'>" +
143
                 translate("connectionindicator.address") + "</span></td>" +
143
                 translate("connectionindicator.address") + "</span></td>" +
144
                 "<td> N/A</td></tr>";
144
                 "<td> N/A</td></tr>";
171
             var local_address_key = "connectionindicator.localaddress";
171
             var local_address_key = "connectionindicator.localaddress";
172
             var remote_address_key = "connectionindicator.remoteaddress";
172
             var remote_address_key = "connectionindicator.remoteaddress";
173
             var localTransport =
173
             var localTransport =
174
-                "<tr><td><span class='jitsipopover_blue' data-i18n='" +
174
+                "<tr><td><span data-i18n='" +
175
                 local_address_key +"' data-i18n-options='" +
175
                 local_address_key +"' data-i18n-options='" +
176
                     JSON.stringify({count: data.localIP.length}) + "'>" +
176
                     JSON.stringify({count: data.localIP.length}) + "'>" +
177
                     translate(local_address_key, {count: data.localIP.length}) +
177
                     translate(local_address_key, {count: data.localIP.length}) +
179
                 ConnectionIndicator.getStringFromArray(data.localIP) +
179
                 ConnectionIndicator.getStringFromArray(data.localIP) +
180
                 "</td></tr>";
180
                 "</td></tr>";
181
             transport =
181
             transport =
182
-                "<tr><td><span class='jitsipopover_blue' data-i18n='" +
182
+                "<tr><td><span data-i18n='" +
183
                 remote_address_key + "' data-i18n-options='" +
183
                 remote_address_key + "' data-i18n-options='" +
184
                     JSON.stringify({count: data.remoteIP.length}) + "'>" +
184
                     JSON.stringify({count: data.remoteIP.length}) + "'>" +
185
                     translate(remote_address_key,
185
                     translate(remote_address_key,
193
 
193
 
194
             transport += "<tr>" +
194
             transport += "<tr>" +
195
                 "<td>" +
195
                 "<td>" +
196
-                "<span class='jitsipopover_blue' data-i18n='" + key_remote +
196
+                "<span data-i18n='" + key_remote +
197
                 "' data-i18n-options='" +
197
                 "' data-i18n-options='" +
198
                 JSON.stringify({count: this.transport.length}) + "'>" +
198
                 JSON.stringify({count: this.transport.length}) + "'>" +
199
                 translate(key_remote, {count: this.transport.length}) +
199
                 translate(key_remote, {count: this.transport.length}) +
200
                 "</span></td><td>";
200
                 "</span></td><td>";
201
             localTransport += "<tr>" +
201
             localTransport += "<tr>" +
202
                 "<td>" +
202
                 "<td>" +
203
-                "<span class='jitsipopover_blue' data-i18n='" + key_local +
203
+                "<span data-i18n='" + key_local +
204
                 "' data-i18n-options='" +
204
                 "' data-i18n-options='" +
205
                 JSON.stringify({count: this.transport.length}) + "'>" +
205
                 JSON.stringify({count: this.transport.length}) + "'>" +
206
                 translate(key_local, {count: this.transport.length}) +
206
                 translate(key_local, {count: this.transport.length}) +
213
             transport += "</td></tr>";
213
             transport += "</td></tr>";
214
             transport += localTransport + "</td></tr>";
214
             transport += localTransport + "</td></tr>";
215
             transport +="<tr>" +
215
             transport +="<tr>" +
216
-                "<td><span class='jitsipopover_blue' data-i18n='connectionindicator.transport'>" +
216
+                "<td><span data-i18n='connectionindicator.transport'>" +
217
                 translate("connectionindicator.transport") + "</span></td>" +
217
                 translate("connectionindicator.transport") + "</span></td>" +
218
                 "<td>" + this.transport[0].type + "</td></tr>";
218
                 "<td>" + this.transport[0].type + "</td></tr>";
219
 
219
 
222
         result += "<table  style='width:100%'>" +
222
         result += "<table  style='width:100%'>" +
223
             "<tr>" +
223
             "<tr>" +
224
             "<td>" +
224
             "<td>" +
225
-            "<span class='jitsipopover_blue' data-i18n='connectionindicator.bandwidth'>" +
225
+            "<span data-i18n='connectionindicator.bandwidth'>" +
226
             translate("connectionindicator.bandwidth") + "</span>" +
226
             translate("connectionindicator.bandwidth") + "</span>" +
227
             "</td><td>" +
227
             "</td><td>" +
228
-            "<span class='jitsipopover_green'>&darr;</span>" +
228
+            "<span class='jitsipopover__green'>&darr;</span>" +
229
             downloadBandwidth +
229
             downloadBandwidth +
230
-            " <span class='jitsipopover_orange'>&uarr;</span>" +
230
+            " <span class='jitsipopover__orange'>&uarr;</span>" +
231
             uploadBandwidth + "</td></tr>";
231
             uploadBandwidth + "</td></tr>";
232
 
232
 
233
         result += transport + "</table>";
233
         result += transport + "</table>";
234
     }
234
     }
235
-
235
+    
236
     return result;
236
     return result;
237
 };
237
 };
238
 
238
 

Loading…
取消
儲存