From 54721573564fb8f461ebe973fe0d34cc47b5f19b Mon Sep 17 00:00:00 2001 From: Piotr Gawron <piotr.gawron@uni.lu> Date: Mon, 19 Feb 2018 14:12:34 +0100 Subject: [PATCH] when switching tab with too much content scroll bars are aligned properly --- .../src/main/js/gui/admin/EditProjectDialog.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/frontend-js/src/main/js/gui/admin/EditProjectDialog.js b/frontend-js/src/main/js/gui/admin/EditProjectDialog.js index 06c5afaae8..89d61d1db5 100644 --- a/frontend-js/src/main/js/gui/admin/EditProjectDialog.js +++ b/frontend-js/src/main/js/gui/admin/EditProjectDialog.js @@ -19,6 +19,7 @@ function EditProjectDialog(params) { AbstractGuiElement.call(this, params); var self = this; $(self.getElement()).addClass("minerva-edit-project-dialog"); + $(self.getElement()).css({overflow: "hidden"}); self.createGui(); } @@ -33,7 +34,8 @@ EditProjectDialog.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); @@ -45,7 +47,8 @@ EditProjectDialog.prototype.createGui = function () { var tabContentDiv = Functions.createElement({ type: "div", - className: "tab-content" + className: "tab-content", + style: "height:100%" }); tabDiv.appendChild(tabContentDiv); @@ -53,6 +56,11 @@ EditProjectDialog.prototype.createGui = function () { self.createOverlaysTab(tabMenuDiv, tabContentDiv); self.createMapsTab(tabMenuDiv, tabContentDiv); self.createUsersTab(tabMenuDiv, tabContentDiv); + $("a", tabMenuDiv).bind("click", function () { + //workaround for some css issues... + tabDiv.style.top = "40px"; + tabDiv.style.bottom = "10px"; + }); }; EditProjectDialog.prototype.createGeneralTab = function (tabMenuDiv, tabContentDiv) { @@ -80,6 +88,7 @@ EditProjectDialog.prototype.addTab = function (params) { navigationObject: navLi, navigationBar: params.tabMenuDiv }); + contentDiv.style.overflow = "auto"; if (params.content !== undefined) { contentDiv.appendChild(params.content); -- GitLab