From a6e9a98d3ec339e068e6ba2537fd9e19e36578d4 Mon Sep 17 00:00:00 2001 From: Piotr Gawron <piotr.gawron@uni.lu> Date: Wed, 27 Feb 2019 14:27:05 +0100 Subject: [PATCH] getLcsbLogImg removed --- frontend-js/src/main/js/GuiConnector.js | 16 ---------------- frontend-js/src/main/js/map/CustomMap.js | 18 +++++++----------- 2 files changed, 7 insertions(+), 27 deletions(-) diff --git a/frontend-js/src/main/js/GuiConnector.js b/frontend-js/src/main/js/GuiConnector.js index 9b5189af4a..a674e31ef9 100644 --- a/frontend-js/src/main/js/GuiConnector.js +++ b/frontend-js/src/main/js/GuiConnector.js @@ -167,22 +167,6 @@ GuiConnector.prototype.removeWindowResizeEvent = function (handler) { } }; -/** - * Returns name of the file with LCSB logo. - * - * @param bigLogo - * {@link Boolean} value determining if we want to have big logo or - * small one - * @returns {string} - */ -GuiConnector.prototype.getLcsbLogoImg = function (bigLogo) { - if (bigLogo) { - return 'lcsb_logo_mid.png'; - } else { - return 'lcsb_logo.png'; - } -}; - /** * Returns name of the file with image that should be presented when we are * waiting for data to be loaded. diff --git a/frontend-js/src/main/js/map/CustomMap.js b/frontend-js/src/main/js/map/CustomMap.js index aef9cff707..c66f943329 100644 --- a/frontend-js/src/main/js/map/CustomMap.js +++ b/frontend-js/src/main/js/map/CustomMap.js @@ -153,31 +153,27 @@ CustomMap.prototype.createLogo = function () { type: 'IMG', className: "minerva-logo", title: self.getConfiguration().getOption(ConfigurationType.LEFT_LOGO_TEXT).getValue(), + src: self.getConfiguration().getOption(ConfigurationType.LEFT_LOGO_IMG).getValue(), onclick: function () { - return self.getServerConnector().getLogoLink().then(function (url) { - var win = window.open(url, '_blank'); - win.focus(); - }).catch(GuiConnector.alert); + var win = window.open(self.getConfiguration().getOption(ConfigurationType.LEFT_LOGO_LINK).getValue(), '_blank'); + win.focus(); } }); - logo2.setAttribute('alt', self.getConfiguration().getOption(ConfigurationType.LEFT_LOGO_TEXT).getValue()); - logoControlDiv2.appendChild(logo2); - this.getMapCanvas().addLeftBottomControl(logoControlDiv2); - var logoControlDiv = Functions.createElement({type: "div", style: "padding: 5px", index: 1}); + var logoControlDiv = Functions.createElement({type: "div", index: 1}); var logo = Functions.createElement({ type: "IMG", - src: GuiConnector.getImgPrefix() + GuiConnector.getLcsbLogoImg(this.bigButtons), + title: self.getConfiguration().getOption(ConfigurationType.RIGHT_LOGO_TEXT).getValue(), + src: self.getConfiguration().getOption(ConfigurationType.RIGHT_LOGO_IMG).getValue(), className: "minerva-logo", onclick: function () { - var win = window.open('http://wwwen.uni.lu/lcsb/', '_blank'); + var win = window.open(self.getConfiguration().getOption(ConfigurationType.RIGHT_LOGO_LINK).getValue(), '_blank'); win.focus(); } }); logoControlDiv.appendChild(logo); - this.getMapCanvas().addRightBottomControl(logoControlDiv); }; -- GitLab