|
@@ -285,6 +285,9 @@ ConnectionIndicator.prototype.create = function () {
|
285
|
285
|
createIcon(["connection", "connection_empty"], "icon-connection"));
|
286
|
286
|
this.fullIcon = this.connectionIndicatorContainer.appendChild(
|
287
|
287
|
createIcon(["connection", "connection_full"], "icon-connection"));
|
|
288
|
+ this.interruptedIndicator = this.connectionIndicatorContainer.appendChild(
|
|
289
|
+ createIcon(["connection", "connection_lost"],"icon-connection-lost"));
|
|
290
|
+ $(this.interruptedIndicator).hide();
|
288
|
291
|
};
|
289
|
292
|
|
290
|
293
|
/**
|
|
@@ -298,6 +301,27 @@ ConnectionIndicator.prototype.remove = function() {
|
298
|
301
|
this.popover.forceHide();
|
299
|
302
|
};
|
300
|
303
|
|
|
304
|
+/**
|
|
305
|
+ * Updates the UI which displays warning about user's connectivity problems.
|
|
306
|
+ *
|
|
307
|
+ * @param {boolean} isActive true if the connection is working fine or false if
|
|
308
|
+ * the user is having connectivity issues.
|
|
309
|
+ */
|
|
310
|
+ConnectionIndicator.prototype.updateConnectionStatusIndicator
|
|
311
|
+= function (isActive) {
|
|
312
|
+ this.isConnectionActive = isActive;
|
|
313
|
+ if (this.isConnectionActive) {
|
|
314
|
+ $(this.interruptedIndicator).hide();
|
|
315
|
+ $(this.emptyIcon).show();
|
|
316
|
+ $(this.fullIcon).show();
|
|
317
|
+ } else {
|
|
318
|
+ $(this.interruptedIndicator).show();
|
|
319
|
+ $(this.emptyIcon).hide();
|
|
320
|
+ $(this.fullIcon).hide();
|
|
321
|
+ this.updateConnectionQuality(0 /* zero bars */);
|
|
322
|
+ }
|
|
323
|
+};
|
|
324
|
+
|
301
|
325
|
/**
|
302
|
326
|
* Updates the data of the indicator
|
303
|
327
|
* @param percent the percent of connection quality
|