From: Svjatoslav Agejenko Date: Fri, 14 Sep 2018 19:01:47 +0000 (+0300) Subject: Merge branch 'master' of ssh://svjatoslav.eu:10006/home/n0/git/meviz X-Git-Tag: meviz-1.2~29 X-Git-Url: http://www2.svjatoslav.eu/gitweb/?a=commitdiff_plain;h=849de223371b2e7395f52ce05a6627f8a213e6a9;hp=f99c9be7ebb4dfd91dde35b78a9402362e977c06;p=meviz.git Merge branch 'master' of ssh://svjatoslav.eu:10006/home/n0/git/meviz # Conflicts: # meviz.iml --- diff --git a/meviz.iml b/meviz.iml new file mode 100644 index 0000000..7399dd5 --- /dev/null +++ b/meviz.iml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pom.xml b/pom.xml index eea9a82..b1cbf6d 100644 --- a/pom.xml +++ b/pom.xml @@ -132,12 +132,12 @@ svjatoslav.eu svjatoslav.eu - scpexe://svjatoslav.eu/var/www/svjatoslav.eu/maven + scpexe://svjatoslav.eu:10006/srv/maven svjatoslav.eu svjatoslav.eu - scpexe://svjatoslav.eu/var/www/svjatoslav.eu/maven + scpexe://svjatoslav.eu:10006/srv/maven diff --git a/src/main/java/eu/svjatoslav/meviz/htmlindexer/WebIndexer.java b/src/main/java/eu/svjatoslav/meviz/htmlindexer/WebIndexer.java index c649d98..dba6f5a 100644 --- a/src/main/java/eu/svjatoslav/meviz/htmlindexer/WebIndexer.java +++ b/src/main/java/eu/svjatoslav/meviz/htmlindexer/WebIndexer.java @@ -11,7 +11,6 @@ import java.io.IOException; import java.io.ObjectInputStream; import java.io.UnsupportedEncodingException; import java.net.URL; -import java.net.URLEncoder; import java.util.List; public class WebIndexer extends AbstractIndexer { @@ -35,13 +34,7 @@ public class WebIndexer extends AbstractIndexer { @Override public String getDirectoryUrl(final AbstractFile directory, final IndexingContext context) { - - try { - return jspPath + context.getLocalUrl() + "/" - + URLEncoder.encode(directory.fileName, "UTF-8"); - } catch (final UnsupportedEncodingException e) { - throw new RuntimeException(e); - } + return jspPath + context.getLocalUrl() + "/" + directory.fileName; } public String getHtml(String requestPath) throws diff --git a/src/main/java/eu/svjatoslav/meviz/htmlindexer/layouts/MixedLayout.java b/src/main/java/eu/svjatoslav/meviz/htmlindexer/layouts/MixedLayout.java index e20f875..55c4e80 100755 --- a/src/main/java/eu/svjatoslav/meviz/htmlindexer/layouts/MixedLayout.java +++ b/src/main/java/eu/svjatoslav/meviz/htmlindexer/layouts/MixedLayout.java @@ -189,17 +189,8 @@ public class MixedLayout implements Layout { // assemble final page HTML final StringBuilder html = new StringBuilder(); - if (doHtmlHeaderAndFooter) { - // page header - html.append("\n"); - html.append("\n"); - html.append(" \n"); - html.append("\n"); - html.append("\n"); - html.append("\n"); - html.append("\n"); - html.append("\n"); - } + if (doHtmlHeaderAndFooter) + appendHtmlHeader(html); if (showTitle) html.append("

" + galleryTitle + "

\n"); @@ -210,11 +201,27 @@ public class MixedLayout implements Layout { html.append(filesHtml.toString()); if (doHtmlHeaderAndFooter) - html.append("
\n"); + appendHtmlFooter(html); return html.toString(); } + private void appendHtmlFooter(StringBuilder html) { + html.append("\n"); + } + + private void appendHtmlHeader(StringBuilder html) { + // page header + html.append("\n"); + html.append("\n"); + html.append(" \n"); + html.append("\n"); + html.append("\n"); + html.append("\n"); + html.append("\n"); + html.append("\n"); + } + private String getImageThumbnailUrl(final Picture picture) { final Dimension imageSize = picture.getDimensions();