From c05a7a021c46f11f350f94f5ba68b2bca503bf82 Mon Sep 17 00:00:00 2001 From: Zlatin Balevsky Date: Wed, 11 Dec 2019 14:40:49 +0000 Subject: [PATCH] table styling and caret on the file tree from zzz --- webui/build.gradle | 9 +- webui/src/main/css/i2pbote.css | 3 - webui/src/main/css/muwire.css | 150 +++++++++++++++++++++++++++++---- webui/src/main/js/conncount.js | 2 +- webui/src/main/js/files.js | 4 +- 5 files changed, 144 insertions(+), 24 deletions(-) diff --git a/webui/build.gradle b/webui/build.gradle index 6b71cab1..00e5daa8 100644 --- a/webui/build.gradle +++ b/webui/build.gradle @@ -42,8 +42,8 @@ task precompileJsp { classPath : sourceSets.main.runtimeClasspath.asPath, uriroot: webAppDir, outputDir: "$buildDir/tmp_jsp", - compilerSourceVM: "1.8", - compilerTargetVM: "1.8", + compilerSourceVM: project.sourceCompatibility, + compilerTargetVM: project.targetCompatibility, webXmlFragment: "$buildDir/tmp_jsp/web.xml.jasper") def output = new File("$buildDir/compiledJsps") output.mkdirs() @@ -52,6 +52,8 @@ task precompileJsp { debug : true, includeAntRuntime : false, deprecation : "on", + source: project.sourceCompatibility, + target: project.targetCompatibility, destDir:file("$buildDir/compiledJsps")) } @@ -80,7 +82,10 @@ task bundle { ant.mkdir(dir: "$buildDir/compiledMessages") ant.javac(srcDir: "$buildDir/messages-src", classPath : sourceSets.main.runtimeClasspath.asPath, + debug : false, includeAntRuntime : false, + source: project.sourceCompatibility, + target: project.targetCompatibility, destDir:file("$buildDir/compiledMessages")) // add resulting classes to build/libs/webui-(version).jar ant.jar(destfile: "$buildDir/libs/webui-${version}.jar", diff --git a/webui/src/main/css/i2pbote.css b/webui/src/main/css/i2pbote.css index 1fc7e08c..345c6265 100644 --- a/webui/src/main/css/i2pbote.css +++ b/webui/src/main/css/i2pbote.css @@ -1,6 +1,3 @@ -@import url("roboto.css"); -@import url("noto.css"); - /* General */ a:link { diff --git a/webui/src/main/css/muwire.css b/webui/src/main/css/muwire.css index 769e6cec..ccf11a8d 100644 --- a/webui/src/main/css/muwire.css +++ b/webui/src/main/css/muwire.css @@ -14,6 +14,10 @@ background: #ceeee8; color:black; } +#table-wrapper table td, th { + padding-right: 10px; + padding-bottom: 1px; +} #table-wrapper table thead th .text { position:absolute; top:-20px; @@ -23,32 +27,144 @@ border:1px solid red; } -div#activeSearches table thead th:first-child { - width: 40%; +div#activeSearches table thead th:nth-child(2) { + width: 55px; } -div#topTable table thead th:first-child { - width: 50%; +div#activeSearches table thead th:nth-child(3) { + width: 55px; } +div#activeSearches table td:nth-child(2) { + text-align: right; +} +div#activeSearches table tbody td:nth-child(3) { + text-align: right; +} + div#topTable table thead th:nth-child(2) { - width: 15%; + width: 100px; } -div#topTable table thead th:first-child { - width: 75%; +div#topTable table thead th:nth-child(3) { + width: 300px; +} +div#topTable table tbody td:nth-child(2) { + text-align: center; } -div#activeBrowses table thead th:first-child { - width: 50%; +div#bottomTable table thead th:nth-child(2) { + width: 100px; +} +div#bottomTable table thead th:nth-child(3) { + width: 100px; +} +div#bottomTable table tbody td:nth-child(2) { + text-align: right; +} +div#bottomTable table tbody td:nth-child(3) { + text-align: center; } -div#filesTable table thead th:first-child { - width: 70%; +div#activeBrowses table thead th:nth-child(2) { + width: 100px; +} +div#activeBrowses table thead th:nth-child(3) { + width: 200px; } -div#trustedUsers table thead th:first-child { - width: 50%; +div#filesTable table thead th:nth-child(2) { + width: 100px; } -div#trustLists table thead th:first-child { - width: 50%; +div#filesTable table thead th:nth-child(3) { + width: 100px; +} +div#filesTable table tbody td:nth-child(2) { + text-align: right; +} +div#filesTable table tbody td:nth-child(3) { + text-align: center; +} + +div#resultsTable table thead th:nth-child(2) { + width: 100px; +} +div#resultsTable table thead th:nth-child(3) { + width: 100px; +} +div#resultsTable table tbody td:nth-child(2) { + text-align: right; +} +div#resultsTable table tbody td:nth-child(3) { + text-align: center; +} + +div#downloads table thead th:nth-child(2) { + width: 80px; +} +div#downloads table thead th:nth-child(3) { + width: 80px; +} +div#downloads table thead th:nth-child(4) { + width: 80px; +} +div#downloads table thead th:nth-child(5) { + width: 120px; +} +div#downloads table thead th:nth-child(6) { + width: 80px; +} +div#downloads table tbody td:nth-child(2) { + text-align: center; +} +div#downloads table tbody td:nth-child(3) { + text-align: right; +} +div#downloads table tbody td:nth-child(4) { + text-align: right; +} +div#downloads table tbody td:nth-child(5) { + text-align: right; +} +div#downloads table tbody td:nth-child(6) { + text-align: center; +} + +div#trustedUsers table thead th:nth-child(2) { + width: 100px; +} +div#trustedUsers table thead th:nth-child(3) { + width: 100px; +} +div#trustedUsers table thead th:nth-child(4) { + width: 100px; +} +div#distrustedUsers table thead th:nth-child(2) { + width: 100px; +} +div#distrustedUsers table thead th:nth-child(3) { + width: 100px; +} +div#distrustedUsers table thead th:nth-child(4) { + width: 100px; +} +div#trustLists table thead th:nth-child(2) { + width: 100px; +} +div#trustLists table thead th:nth-child(3) { + width: 100px; +} +div#trustLists table thead th:nth-child(4) { + width: 100px; +} +div#trustLists table thead th:nth-child(5) { + width: 100px; +} +div#trustLists table thead th:nth-child(6) { + width: 100px; +} + +pre { + background: #a7d5d5; + padding: 5px; + margin: 10px 20px 10px 5px; } /* File tree CSS */ @@ -68,6 +184,8 @@ ul, #sharedTree { .caret { cursor: pointer; user-select: none; /* Prevent text selection */ + padding-right: 30px; + color: black; } /* Create the caret/arrow with a unicode, and style it */ @@ -75,7 +193,7 @@ ul, #sharedTree { content: "\25B6"; color: black; display: inline-block; - margin-right: 6px; + margin-right: 10px; } /* Rotate the caret/arrow icon when clicked on (using JavaScript) */ diff --git a/webui/src/main/js/conncount.js b/webui/src/main/js/conncount.js index c86e9b3d..d4b81ab4 100644 --- a/webui/src/main/js/conncount.js +++ b/webui/src/main/js/conncount.js @@ -3,6 +3,7 @@ function refreshConnectionsCount() { xmlhttp.onreadystatechange = function() { if (this.readyState == 4) { var connectionCountSpan = document.getElementById("connectionsCount"); + var connectionIcon = document.getElementById("connectionsIcon"); if (this.status == 200) { var image; var connections = this.responseXML.getElementsByTagName("Connections"); @@ -13,7 +14,6 @@ function refreshConnectionsCount() { image = "connected.png"; else image = "connecting.png"; - var connectionIcon = document.getElementById("connectionsIcon"); connectionIcon.innerHTML = "\"\""; } else { connectionCountSpan.innerHTML = _t("Down"); diff --git a/webui/src/main/js/files.js b/webui/src/main/js/files.js index cc7b6753..8ed8c1e2 100644 --- a/webui/src/main/js/files.js +++ b/webui/src/main/js/files.js @@ -26,10 +26,10 @@ class Node { commentLink + "
" } else { if (this.children.length == 0) { - div.innerHTML = "
  • " + + div.innerHTML = "
  • " + this.path + " " + unshareLink + "" + " " + certifyLink + " " + commentLink + "
  • " } else { - var l = "
  • "+this.path+" " + unshareLink + var l = "
  • "+this.path+" " + unshareLink l += " " + certifyLink + " " + commentLink+"
    " l += "