Commit 0a4b8aff authored by Piotr Gawron's avatar Piotr Gawron

Merge branch '1019-null-user' into 'devel_14.0.x'

if by any chance user is null then reload webpage (but it should never happen)

See merge request !1025
parents 86ec9821 f099a38a
Pipeline #17921 passed with stage
in 14 minutes and 27 seconds
......@@ -16,8 +16,11 @@ minerva (14.0.5) stable; urgency=medium
#1012)
* Bug fix: after loading/removing too many plugins it was impossible to load
new plugins (#1011)
* Bug fix: CLEAR button disappears after legend, comment checkboxes when
plugin tab used to much space (#976)
-- Piotr Gawron <piotr.gawron@uni.lu> Mon, 02 Dec 2019 16:00:00 +0200
-- Piotr Gawron <piotr.gawron@uni.lu> Tue, 03 Dec 2019 12:00:00 +0200
minerva (14.0.4) stable; urgency=high
* Bug fix: some SBGN files uploaded to minerva could not be exported to SBML
......
......@@ -57,9 +57,7 @@ h5 {
color: #ffffff;
display: inline;
width: auto;
position: absolute;
top: 0;
right: 0;
float: right;
}
.minerva-header a:hover {
......
......@@ -1340,6 +1340,10 @@ ServerConnector.getLoggedUser = function () {
if (self._loggedUser !== undefined && self._loggedUser !== null) {
return Promise.resolve(self._loggedUser);
} else {
if (self.getSessionData().getLogin() === null) {
logger.warn("User login is null...");
window.location.reload(false);
}
//this prevents double calls
self._loggedUser = self.getUser(self.getSessionData().getLogin()).then(function (user) {
if (user !== null) {
......@@ -2049,7 +2053,7 @@ ServerConnector.createSession = function () {
ServerConnector.login = function (login, password) {
var self = this;
var params = {};
if (login !== undefined && login !== "") {
if (login !== undefined && login !== "" && login !== null) {
params.login = login;
params.password = password;
} else {
......
......@@ -102,17 +102,22 @@ TopMenu.prototype._createGui = function () {
showOverviewDiv.appendChild(showOverviewButton);
self.setControlElement(PanelControlElementType.MENU_SHOW_OVERVIEW_BUTTON, showOverviewButton);
var rightHeaderMenuDiv = Functions.createElement({
type: "div",
className: "minerva-header-right-menu"
var clearButton = Functions.createElement({
type: "button",
name: "clearButton",
className: "minerva-overview-button",
style: "float:right",
content: "<i class='fa fa-times' style='font-size:18px; font-weight:300; padding-right:10px;'></i>CLEAR",
xss: false
});
self.getElement().appendChild(rightHeaderMenuDiv);
self.getElement().appendChild(clearButton);
var div4checkboxes = Functions.createElement({
type: "div",
style: "float:right",
className: "minerva-top-checkbox-div"
});
rightHeaderMenuDiv.appendChild(div4checkboxes);
self.getElement().appendChild(div4checkboxes);
var legendCheckbox = Functions.createElement({
type: "input",
......@@ -149,14 +154,6 @@ TopMenu.prototype._createGui = function () {
div4checkboxes.appendChild(refreshCommentButton);
self.setControlElement(PanelControlElementType.MENU_REFRESH_COMMENTS_BUTTON, refreshCommentButton);
var clearButton = Functions.createElement({
type: "button",
name: "clearButton",
className: "minerva-overview-button",
content: "<i class='fa fa-times' style='font-size:18px; font-weight:300; padding-right:10px;'></i>CLEAR",
xss: false
});
rightHeaderMenuDiv.appendChild(clearButton);
self.setControlElement(PanelControlElementType.MENU_CLEAR_BUTTON, clearButton);
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment