|
|
|
@ -285,6 +285,9 @@ ConnectionIndicator.prototype.create = function () { |
|
|
|
|
createIcon(["connection", "connection_empty"], "icon-connection")); |
|
|
|
|
this.fullIcon = this.connectionIndicatorContainer.appendChild( |
|
|
|
|
createIcon(["connection", "connection_full"], "icon-connection")); |
|
|
|
|
this.interruptedIndicator = this.connectionIndicatorContainer.appendChild( |
|
|
|
|
createIcon(["connection", "connection_lost"],"icon-connection-lost")); |
|
|
|
|
$(this.interruptedIndicator).hide(); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
@ -298,6 +301,27 @@ ConnectionIndicator.prototype.remove = function() { |
|
|
|
|
this.popover.forceHide(); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Updates the UI which displays warning about user's connectivity problems. |
|
|
|
|
* |
|
|
|
|
* @param {boolean} isActive true if the connection is working fine or false if |
|
|
|
|
* the user is having connectivity issues. |
|
|
|
|
*/ |
|
|
|
|
ConnectionIndicator.prototype.updateConnectionStatusIndicator |
|
|
|
|
= function (isActive) { |
|
|
|
|
this.isConnectionActive = isActive; |
|
|
|
|
if (this.isConnectionActive) { |
|
|
|
|
$(this.interruptedIndicator).hide(); |
|
|
|
|
$(this.emptyIcon).show(); |
|
|
|
|
$(this.fullIcon).show(); |
|
|
|
|
} else { |
|
|
|
|
$(this.interruptedIndicator).show(); |
|
|
|
|
$(this.emptyIcon).hide(); |
|
|
|
|
$(this.fullIcon).hide(); |
|
|
|
|
this.updateConnectionQuality(0 /* zero bars */); |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Updates the data of the indicator |
|
|
|
|
* @param percent the percent of connection quality |
|
|
|
|