diff --git a/frontend-js/src/main/js/ServerConnector.js b/frontend-js/src/main/js/ServerConnector.js index e47b11cbda2169129c816c468baec9f66cdff4ee..ae6de2653f56a887a2917c84be3e55616535e267 100644 --- a/frontend-js/src/main/js/ServerConnector.js +++ b/frontend-js/src/main/js/ServerConnector.js @@ -1592,10 +1592,6 @@ ServerConnector.getProjectId = function (projectId) { } }; -ServerConnector.getLogoImg = function () { - return this.getConfigurationParam(ConfigurationType.LOGO_IMG); -}; - ServerConnector.getLogoLink = function () { return this.getConfigurationParam(ConfigurationType.LOGO_LINK); }; diff --git a/frontend-js/src/main/js/map/CustomMap.js b/frontend-js/src/main/js/map/CustomMap.js index def66cc57d2d0aa518d875ce40ab4fa5544a737d..d58857135f53a3ec37988ca910a9046fe281d64f 100644 --- a/frontend-js/src/main/js/map/CustomMap.js +++ b/frontend-js/src/main/js/map/CustomMap.js @@ -133,13 +133,8 @@ CustomMap.prototype.init = function () { } }); }).then(function () { - return self.getServerConnector().getLogoImg(); - }).then(function (url) { var logo2 = self.getControl(ControlType.LOGO_2_IMG); - if (!/^(f|ht)tps?:\/\//i.test(url)) { - url = GuiConnector.getImgPrefix() + url; - } - logo2.src = url; + logo2.src = self.getConfiguration().getOption(ConfigurationType.LOGO_IMG).getValue(); logo2.setAttribute('title', self.getConfiguration().getOption(ConfigurationType.LOGO_TEXT).getValue()); logo2.setAttribute('alt', self.getConfiguration().getOption(ConfigurationType.LOGO_TEXT).getValue()); }); diff --git a/frontend-js/src/main/js/minerva.js b/frontend-js/src/main/js/minerva.js index 6cdf12cd52563064b0c7238a16b6b56be47a9260..72213c40885c681513fa6f8e9064bcc2859537b5 100644 --- a/frontend-js/src/main/js/minerva.js +++ b/frontend-js/src/main/js/minerva.js @@ -502,7 +502,7 @@ function createFooter() { content: '<table width="100%" border="0" cellspacing="0" cellpadding="0">' + '<tr>' + '<td align="left"><a href="' + logoLink + '" title="' + logoText + '" target="_blank">' + - '<img src="' + GuiConnector.getImgPrefix() + logoImg + '" width="80" height="80" border="0" alt="' + logoText + '"/>' + + '<img src="' + logoImg + '" width="80" height="80" border="0" alt="' + logoText + '"/>' + '</a></td>' + '<td align="center" class="minerva-footer-text">MiNERVA version ' + configuration.getVersion() + ';<br/>' + 'build ' + configuration.getBuildDate() + ';<br/>' + diff --git a/persist/src/main/resources/db/migration/12.2.0~alpha.0/V12.2.0.20181002__logo_location.sql b/persist/src/main/resources/db/migration/12.2.0~alpha.0/V12.2.0.20181002__logo_location.sql new file mode 100644 index 0000000000000000000000000000000000000000..4a9b5e8292ce8668a2aa1b5b9fd4d626fd0aac09 --- /dev/null +++ b/persist/src/main/resources/db/migration/12.2.0~alpha.0/V12.2.0.20181002__logo_location.sql @@ -0,0 +1,2 @@ +--logo location should be moved outside of minerva resources page +update configuration_table set value=concat('resources/images/', value) where type='LOGO_IMG' and not (value like 'http:%' or value like 'https:%');