X-Git-Url: http://git.nikiroo.be/?p=fanfix.git;a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Ffanfix%2Flibrary%2FWebLibraryServerHtml.java;h=5310c7c104953fdf90ed9ee97b2c4a6cd8c222a6;hp=42ebead137c05e8189fec17a9d57d4da91e4858a;hb=8c7f2a44646ff1ca6b4b361046090a9ec12525f0;hpb=8d45985b29359a84eaf3b0465374acbec3474faf diff --git a/src/be/nikiroo/fanfix/library/WebLibraryServerHtml.java b/src/be/nikiroo/fanfix/library/WebLibraryServerHtml.java index 42ebead..5310c7c 100644 --- a/src/be/nikiroo/fanfix/library/WebLibraryServerHtml.java +++ b/src/be/nikiroo/fanfix/library/WebLibraryServerHtml.java @@ -16,7 +16,6 @@ import javax.net.ssl.SSLServerSocketFactory; import be.nikiroo.fanfix.Instance; import be.nikiroo.fanfix.bundles.Config; -import be.nikiroo.fanfix.bundles.UiConfig; import be.nikiroo.fanfix.data.Chapter; import be.nikiroo.fanfix.data.MetaData; import be.nikiroo.fanfix.data.Paragraph; @@ -248,6 +247,12 @@ abstract class WebLibraryServerHtml implements Runnable { mimeType = "text/html"; } else if (uri.endsWith(".js")) { mimeType = "text/javascript"; + } else if (uri.endsWith(".png")) { + mimeType = "image/png"; + } else if (uri.endsWith(".ico")) { + mimeType = "image/x-icon"; + } else if (uri.endsWith(".java")) { + mimeType = "text/plain"; } rep = newChunkedResponse(Status.OK, mimeType, in); @@ -543,14 +548,13 @@ abstract class WebLibraryServerHtml implements Runnable { String first, previous, next, last; - String viewer = ""; - - String disabledLeft = ""; - String disabledRight = ""; - String disabledZoomReal = ""; - String disabledZoomWidth = ""; - String disabledZoomHeight = ""; + boolean disabledLeft = false; + boolean disabledRight = false; + boolean disabledZoomReal = false; + boolean disabledZoomWidth = false; + boolean disabledZoomHeight = false; + Template viewerItem = null; if (paragraph <= 0) { first = WebLibraryUrls.getViewUrl(luid, 0, null); previous = WebLibraryUrls.getViewUrl(luid, @@ -561,42 +565,37 @@ abstract class WebLibraryServerHtml implements Runnable { last = WebLibraryUrls.getViewUrl(luid, story.getChapters().size(), null); - String desc = ""; + Template desc = null; if (chapter <= 0) { - StringBuilder desclines = new StringBuilder(); + List