From 012cc1bfd335e193ee80011cfe76d7e10ec21ca8 Mon Sep 17 00:00:00 2001 From: Piotr Gawron <piotr.gawron@uni.lu> Date: Wed, 28 Mar 2018 17:08:20 +0200 Subject: [PATCH] footer with version is visible in the admin panel --- frontend-js/package-lock.json | 54 ++++++++++----------- frontend-js/src/main/css/global.css | 45 ++++++----------- frontend-js/src/main/js/minerva.js | 21 ++++---- web/src/main/webapp/resources/css/admin.css | 4 -- 4 files changed, 54 insertions(+), 70 deletions(-) diff --git a/frontend-js/package-lock.json b/frontend-js/package-lock.json index 29898ad842..378ebd3885 100644 --- a/frontend-js/package-lock.json +++ b/frontend-js/package-lock.json @@ -45,30 +45,38 @@ "litemol": "github:dsehnal/LiteMol#a5419c696faa84530dd93acd55b747cf8136902b" }, "dependencies": { + "ProtVista": { + "version": "git://github.com/davidhoksza/protvista.git#4e4bb737ba1e183291505bd25f8bae2e651ce21e", + "dev": true, + "requires": { + "d3": "3.5.17", + "file-saver": "1.3.3", + "jquery": "2.2.4", + "jszip": "3.1.4", + "underscore": "1.8.3" + }, + "dependencies": { + "jquery": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/jquery/-/jquery-2.2.4.tgz", + "integrity": "sha1-LInWiJterFIqfuoywUUhVZxsvwI=", + "dev": true + } + } + }, "jquery": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.3.1.tgz", "integrity": "sha512-Ubldcmxp5np52/ENotGxlLe6aGMvmF4R8S6tZjsP6Knsaxd/xp3Zrh50cG93lR6nPXyUFwzN3ZSOQI0wRJNdGg==", "dev": true - } - } - }, - "ProtVista": { - "version": "git://github.com/davidhoksza/protvista.git#4e4bb737ba1e183291505bd25f8bae2e651ce21e", - "dev": true, - "requires": { - "d3": "3.5.17", - "file-saver": "1.3.3", - "jquery": "2.2.4", - "jszip": "3.1.4", - "underscore": "1.8.3" - }, - "dependencies": { - "jquery": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/jquery/-/jquery-2.2.4.tgz", - "integrity": "sha1-LInWiJterFIqfuoywUUhVZxsvwI=", - "dev": true + }, + "litemol": { + "version": "github:dsehnal/LiteMol#a5419c696faa84530dd93acd55b747cf8136902b", + "dev": true, + "requires": { + "@types/react": "15.6.14", + "@types/react-dom": "15.5.7" + } } } }, @@ -2050,14 +2058,6 @@ "immediate": "3.0.6" } }, - "litemol": { - "version": "github:dsehnal/LiteMol#a5419c696faa84530dd93acd55b747cf8136902b", - "dev": true, - "requires": { - "@types/react": "15.6.14", - "@types/react-dom": "15.5.7" - } - }, "lodash": { "version": "4.17.4", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", diff --git a/frontend-js/src/main/css/global.css b/frontend-js/src/main/css/global.css index 9c47b6c754..251cea095a 100644 --- a/frontend-js/src/main/css/global.css +++ b/frontend-js/src/main/css/global.css @@ -196,34 +196,19 @@ border-left: 1px solid #e1e1e1; } -.footerLinks { +.minerva-footer-table { position: absolute; - left: 0; - right: 0; bottom: 0; + height: 80px; + left: 0; + width: 100%; + z-index: -1; } -.footerLinks { - background-color: #333333; - color: #ffffff; - display: block; - float: left; - line-height: 35px; - height: 35px; - z-index: 10000 -} - -.footerLinks a:link, .footerLinks a:visited { - text-decoration: none; - font-size: 13px; +.minerva-footer-text { font-weight: 900; - color: #ffffff; - transition: all 0.4s ease-in-out 0s; -} - -.footerLinks a:hover { - color: #999999; - transition: all 0.4s ease-in-out 0s; + font-size: 13px; + color: #999999 } /* twitter typeahead */ @@ -642,14 +627,14 @@ table.dataTable tbody td.no_padding, table.dataTable thead th.no_padding { .minerva-molstar-container { position: absolute; - left:0; + left: 0; top: 0; width: 100%; height: 100vh; background-color: white; - border: 30px solid rgba(0,0,0,0.5); - -moz-background-clip: padding; /* Firefox 3.6 */ - -webkit-background-clip: padding; /* Safari 4? Chrome 6? */ + border: 30px solid rgba(0, 0, 0, 0.5); + -moz-background-clip: padding; /* Firefox 3.6 */ + -webkit-background-clip: padding; /* Safari 4? Chrome 6? */ background-clip: padding-box; z-index: 100; display: none; @@ -661,7 +646,7 @@ table.dataTable tbody td.no_padding, table.dataTable thead th.no_padding { top: 3px; font-size: 17px; padding-top: 2px; - background:rgba(0, 0, 0, 0.2); + background: rgba(0, 0, 0, 0.2); cursor: pointer; width: 28px; height: 28px; @@ -670,8 +655,8 @@ table.dataTable tbody td.no_padding, table.dataTable thead th.no_padding { z-index: 101 } -.minerva-molstar-close-button:hover{ - background:rgba(0, 0, 0, 0.4); +.minerva-molstar-close-button:hover { + background: rgba(0, 0, 0, 0.4); } diff --git a/frontend-js/src/main/js/minerva.js b/frontend-js/src/main/js/minerva.js index 39b87f2453..a06cd21a49 100644 --- a/frontend-js/src/main/js/minerva.js +++ b/frontend-js/src/main/js/minerva.js @@ -84,7 +84,7 @@ function insertGoogleAnalyticsCode() { }); } -function createDivStructure(element) { +function createDivStructure(element) { var tableDiv = functions.createElement({ type: "div", style: "display: table; width:100%; height: 100%" @@ -372,7 +372,7 @@ function create(params) { } -function createFooter(params) { +function createFooter() { var logoLink, logoText, logoImg; return ServerConnector.getConfigurationParam(ConfigurationType.LOGO_LINK).then(function (result) { logoLink = result; @@ -384,23 +384,23 @@ function createFooter(params) { logoImg = result; return ServerConnector.getConfiguration(); }).then(function (configuration) { - var div = functions.createElement({ - type: "div", id: "footerTable", + 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">' + - '<h:graphicImage library="images" name="' + logoImg + '" width="80" height="80" border="0" alt="' + logoText + '"/>' + + '<img src="' + GuiConnector.getImgPrefix() + logoImg + '" width="80" height="80" border="0" alt="' + logoText + '"/>' + '</a></td>' + - '<td align="center" class="footerText">MiNERVA version ' + configuration.getVersion() + ';<br/>' + + '<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">' + - '<h:graphicImage library="images" name="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>' + '</tr>\n' + '</table>', xss: false }); - return div; }) } @@ -515,7 +515,7 @@ function createLogin(params) { }).then(function (configuration) { var loginDiv = createLoginDiv(params); params.getElement().appendChild(loginDiv); - return createFooter(params); + return createFooter(); }).then(function (footer) { params.getElement().appendChild(footer); return insertGoogleAnalyticsCode(); @@ -567,6 +567,9 @@ function createAdmin(params) { }).then(function (configuration) { params.setConfiguration(configuration); result = new Admin(params); + return createFooter(); + }).then(function (footer) { + params.getElement().appendChild(footer); return result.init(); }).then(function () { return result; diff --git a/web/src/main/webapp/resources/css/admin.css b/web/src/main/webapp/resources/css/admin.css index c85c52134e..5696f73ff0 100644 --- a/web/src/main/webapp/resources/css/admin.css +++ b/web/src/main/webapp/resources/css/admin.css @@ -24,9 +24,6 @@ html, body {margin:0 !important; padding:0 !important; background-color:#EBEBEB; font-weight:900; } -#footerTable {position:absolute; bottom:0px; height:80px; left:0; width:100%; background-color:#EBEBEB;} - - .ui-widget-content {padding:0 !important; margin:0 !important;} #content {padding:20px 30px 20px 30px !important} @@ -70,7 +67,6 @@ textarea {border:none} .textLighter {font-weight:900; color:#666666; line-height:30px; text-transform:uppercase} .bold {font-weight:900} .imgMiddle {vertical-align: middle;} -.footerText {font-weight:900; font-size:13px; color:#999999} .welcomeBox {width:300px; margin:100px auto; text-align:center} .welcomeBigText {color:#666666; font-size:24px;} -- GitLab