From b2cdb32325f88f97ffa333c52d2d6648423aba4e Mon Sep 17 00:00:00 2001 From: Piotr Gawron <piotr.gawron@uni.lu> Date: Mon, 19 Feb 2018 14:13:00 +0100 Subject: [PATCH] when switching tab with too much content scroll bars are aligned properly --- .../src/main/js/gui/admin/EditUserDialog.js | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/frontend-js/src/main/js/gui/admin/EditUserDialog.js b/frontend-js/src/main/js/gui/admin/EditUserDialog.js index 248aa190f0..e4a51806b4 100644 --- a/frontend-js/src/main/js/gui/admin/EditUserDialog.js +++ b/frontend-js/src/main/js/gui/admin/EditUserDialog.js @@ -18,6 +18,8 @@ function EditUserDialog(params) { var self = this; self.setUser(params.user); + $(self.getElement()).css({overflow: "hidden"}); + self.createGui(); self.registerListenerType("onSave"); } @@ -47,7 +49,8 @@ EditUserDialog.prototype.createGui = function () { var tabDiv = Functions.createElement({ type: "div", name: "tabView", - className: "tabbable boxed parentTabs" + className: "tabbable boxed parentTabs", + style: "position:absolute;top:10px;bottom:40px;left:10px;right:10px" }); element.appendChild(tabDiv); @@ -59,13 +62,19 @@ EditUserDialog.prototype.createGui = function () { var tabContentDiv = Functions.createElement({ type: "div", - className: "tab-content" + className: "tab-content", + style: "height:100%" }); tabDiv.appendChild(tabContentDiv); self.createGeneralTab(tabMenuDiv, tabContentDiv); self.createPrivilegesTab(tabMenuDiv, tabContentDiv); self.createProjectsTab(tabMenuDiv, tabContentDiv); + $("a", tabMenuDiv).bind("click", function () { + //workaround for some css issues... + tabDiv.style.top = "40px"; + tabDiv.style.bottom = "10px"; + }); }; EditUserDialog.prototype.createGeneralTab = function (tabMenuDiv, tabContentDiv) { @@ -117,6 +126,8 @@ EditUserDialog.prototype.addTab = function (params) { navigationBar: params.tabMenuDiv }); + contentDiv.style.overflow = "auto"; + if (params.content !== undefined) { contentDiv.appendChild(params.content); } -- GitLab