Skip to content
Snippets Groups Projects
Commit fe6da3ee authored by Piotr Gawron's avatar Piotr Gawron
Browse files

obaining config data simplified

parent 63bedbac
No related branches found
No related tags found
2 merge requests!630WIP: Resolve "The privileges of a new user are not saved in some cases",!438Resolve "logo is forced to dimensions of square"
Pipeline #6651 failed
......@@ -485,35 +485,28 @@ function create(params) {
* @returns {Promise}
*/
function createFooter() {
var logoLink, logoText, logoImg;
return ServerConnector.getConfigurationParam(ConfigurationType.LOGO_LINK).then(function (result) {
logoLink = result;
return ServerConnector.getConfigurationParam(ConfigurationType.LOGO_TEXT);
}).then(function (result) {
logoText = result;
return ServerConnector.getConfigurationParam(ConfigurationType.LOGO_IMG);
}).then(function (result) {
logoImg = result;
return ServerConnector.getConfiguration();
}).then(function (configuration) {
return ServerConnector.getConfiguration().then(function (configuration) {
var logoLink = configuration.getOption(ConfigurationType.LOGO_LINK).getValue();
var logoText = configuration.getOption(ConfigurationType.LOGO_TEXT).getValue();
var logoImg = configuration.getOption(ConfigurationType.LOGO_IMG).getValue();
return functions.createElement({
type: "div",
className: "minerva-footer-table",
content: '<table width="100%" border="0" cellspacing="0" cellpadding="0">' +
'<tr>' +
'<td align="left"><a href="' + logoLink + '" title="' + logoText + '" target="_blank">' +
'<img src="' + logoImg + '" class="minerva-logo" alt="' + logoText + '"/>' +
'</a></td>' +
'<td align="center" class="minerva-footer-text">MiNERVA version ' + configuration.getVersion() + ';<br/>' +
'build ' + configuration.getBuildDate() + ';<br/>' +
'git: ' + configuration.getGitHash() + '</td>' +
'<td align="right"><a href="http://wwwen.uni.lu/lcsb/" title="LCSB - Luxembourg Centre for Systems Biomedicine" target="_blank">' +
'<img src="' + GuiConnector.getImgPrefix() + 'lcsb.png" width="80" height="80" border="0" alt="LCSB - Luxembourg Centre for Systems Biomedicine"/>' +
'</a></td>' +
'</tr>\n' +
'</table>', xss: false
'<tr>' +
'<td align="left"><a href="' + logoLink + '" title="' + logoText + '" target="_blank">' +
'<img src="' + logoImg + '" class="minerva-logo" alt="' + logoText + '"/>' +
'</a></td>' +
'<td align="center" class="minerva-footer-text">MiNERVA version ' + configuration.getVersion() + ';<br/>' +
'build ' + configuration.getBuildDate() + ';<br/>' +
'git: ' + configuration.getGitHash() + '</td>' +
'<td align="right"><a href="http://wwwen.uni.lu/lcsb/" title="LCSB - Luxembourg Centre for Systems Biomedicine" target="_blank">' +
'<img src="' + GuiConnector.getImgPrefix() + 'lcsb.png" width="80" height="80" border="0" alt="LCSB - Luxembourg Centre for Systems Biomedicine"/>' +
'</a></td>' +
'</tr>\n' +
'</table>', xss: false
});
})
});
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment