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

when clicking on login there is processing dialog visible (to prevent double click)

parent d7eae74c
No related branches found
No related tags found
2 merge requests!450fix on export to cell designer + ldap connector patches,!445Resolve "double login using ldap"
Pipeline #6710 passed
...@@ -498,18 +498,18 @@ function createFooter() { ...@@ -498,18 +498,18 @@ function createFooter() {
type: "div", type: "div",
className: "minerva-footer-table", className: "minerva-footer-table",
content: '<table width="100%" border="0" cellspacing="0" cellpadding="0">' + content: '<table width="100%" border="0" cellspacing="0" cellpadding="0">' +
'<tr>' + '<tr>' +
'<td align="left"><a href="' + logoLink + '" title="' + logoText + '" target="_blank">' + '<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="' + GuiConnector.getImgPrefix() + logoImg + '" width="80" height="80" border="0" alt="' + logoText + '"/>' +
'</a></td>' + '</a></td>' +
'<td align="center" class="minerva-footer-text">MiNERVA version ' + configuration.getVersion() + ';<br/>' + '<td align="center" class="minerva-footer-text">MiNERVA version ' + configuration.getVersion() + ';<br/>' +
'build ' + configuration.getBuildDate() + ';<br/>' + 'build ' + configuration.getBuildDate() + ';<br/>' +
'git: ' + configuration.getGitHash() + '</td>' + 'git: ' + configuration.getGitHash() + '</td>' +
'<td align="right"><a href="http://wwwen.uni.lu/lcsb/" title="LCSB - Luxembourg Centre for Systems Biomedicine" target="_blank">' + '<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"/>' + '<img src="' + GuiConnector.getImgPrefix() + 'lcsb.png" width="80" height="80" border="0" alt="LCSB - Luxembourg Centre for Systems Biomedicine"/>' +
'</a></td>' + '</a></td>' +
'</tr>\n' + '</tr>\n' +
'</table>', xss: false '</table>', xss: false
}); });
}) })
} }
...@@ -578,6 +578,7 @@ function createLoginDiv() { ...@@ -578,6 +578,7 @@ function createLoginDiv() {
var fromPage = GuiConnector.getParams["from"]; var fromPage = GuiConnector.getParams["from"];
$("#login", result).on("click", function login() { $("#login", result).on("click", function login() {
GuiConnector.showProcessing();
var loginString = document.getElementById('username').value; var loginString = document.getElementById('username').value;
var passwordString = document.getElementById('password').value; var passwordString = document.getElementById('password').value;
return ServerConnector.login(loginString, passwordString).then(function () { return ServerConnector.login(loginString, passwordString).then(function () {
...@@ -587,12 +588,14 @@ function createLoginDiv() { ...@@ -587,12 +588,14 @@ function createLoginDiv() {
} else { } else {
window.location.href = ServerConnector.getServerBaseUrl(); window.location.href = ServerConnector.getServerBaseUrl();
} }
}, function (error) { }).catch(function (error) {
if (error.constructor.name === "InvalidCredentialsError") { if (error.constructor.name === "InvalidCredentialsError") {
GuiConnector.alert("invalid credentials"); GuiConnector.alert("invalid credentials");
} else { } else {
GuiConnector.alert(error); GuiConnector.alert(error);
} }
}).finally(function () {
GuiConnector.hideProcessing();
}); });
}); });
$('#go_to_map_button', result).click(function () { $('#go_to_map_button', result).click(function () {
......
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