Commit 6be579a9 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

ServerConnector is accessed as an object property

parent 732660be
......@@ -192,7 +192,7 @@ TopMenu.prototype.init = function () {
var commentCheckbox = self.getControlElement(PanelControlElementType.MENU_COMMENTS_CHECKBOX);
var refreshCommentButton = self.getControlElement(PanelControlElementType.MENU_REFRESH_COMMENTS_BUTTON);
commentCheckbox.onclick = function () {
ServerConnector.getSessionData(project).setShowComments(commentCheckbox.checked);
self.getServerConnector().getSessionData(project).setShowComments(commentCheckbox.checked);
if (commentCheckbox.checked) {
$(refreshCommentButton).css("display", "inline");
} else {
......@@ -230,7 +230,7 @@ TopMenu.prototype.init = function () {
$(showOverviewButton).css("display", "inline-block");
}
if (ServerConnector.getSessionData().getShowComments()) {
if (self.getServerConnector().getSessionData().getShowComments()) {
self.getControlElement(PanelControlElementType.MENU_COMMENTS_CHECKBOX).checked = true;
return self.getMap().refreshComments();
} else {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment