diff --git a/frontend-js/src/main/js/GuiConnector.js b/frontend-js/src/main/js/GuiConnector.js index 7a6eb93c44ab7cd2c10a3d3e4fc0bad9b1ce48ee..2f8d2132fd055d35c79b1b644435f94017e8ea5b 100644 --- a/frontend-js/src/main/js/GuiConnector.js +++ b/frontend-js/src/main/js/GuiConnector.js @@ -170,14 +170,6 @@ GuiConnector.showSelectionMenu = function(x, y) { } }; -/** - * Gets html div where overview images should be visualized. - * - */ -GuiConnector.getOverviewHtmlTag = function() { - return document.getElementById(ServerConnector.formIdentifier + ':overviewDialog'); -}; - /** * Updates coordinates of the mouse in the browser. */ @@ -240,10 +232,6 @@ GuiConnector.getObjectByPrimefaceId = function(id) { return $(PrimeFaces.escapeClientId(id)); }; -GuiConnector.getOverviewDialog = function() { - return _overviewDialog; -}; - GuiConnector.alert = function(message) { logger.error(message); alert(message); diff --git a/frontend-js/src/main/js/gui/OverviewDialog.js b/frontend-js/src/main/js/gui/OverviewDialog.js index 20245945ebf58196dabe0024e24f1eaf32feb071..785ba2a210f9b5a613d3cd4980592b50e45539ce 100644 --- a/frontend-js/src/main/js/gui/OverviewDialog.js +++ b/frontend-js/src/main/js/gui/OverviewDialog.js @@ -119,14 +119,14 @@ OverviewDialog.prototype.showOverview = function(overviewImageId) { // TODO min zoom value can be different for every map, it should be // changed in the future map.showModel(link.modelLinkId, link.latLng, link.zoomLevel + map.getMinZoom()); - overviewDialog.hide(); + $(self.getElement()).dialog("close"); } else if (link.type === "OverviewImageLink") { logger.debug("Opening image from overview. ImageId: " + link.imageLinkId); self.showOverview(link.imageLinkId); } else if (link.type === "OverviewSearchLink") { logger.debug("Sending search query. Query: " + link.query); GuiConnector.search(link.query); - overviewDialog.hide(); + $(self.getElement()).dialog("close"); } else { logger.warn("Unknown type of link: " + link.type + ". Don't know what to do... LinkId: " + link.idObject); }