# HG changeset patch # User robcast # Date 1098995159 -7200 # Node ID bf34a4d8f6b40c7e53c3778726eb8b9d50a25a2c # Parent d7f0045384f508b8c6a1aa1a5ec9e834530aa1fd big autumn cleaning :-) - finally digilib.jsp uses the new javascript code - dito digicat.jsp - all files corresponding to the old frontend moved into /oldskin - all icons moved into /img diff -r d7f0045384f5 -r bf34a4d8f6b4 client/digitallibrary/digicat.jsp --- a/client/digitallibrary/digicat.jsp Thu Oct 28 22:25:59 2004 +0200 +++ b/client/digitallibrary/digicat.jsp Thu Oct 28 22:25:59 2004 +0200 @@ -1,6 +1,4 @@ -<%@ page language="java" %> - -<%! +<%@ page language="java" %><%! // authentication stuff - robert // ----------------------------- // create DocumentBean instance for all JSP requests @@ -15,10 +13,7 @@ System.out.println(e); } } -%> - - -<% +%><% // parsing the query // ----------------- @@ -27,146 +22,18 @@ // check if authentication is needed and redirect if necessary docBean.doAuthentication(dcRequest, response); -%> - - -<% - -// the different levels of presentation -// ------------------------------------ - - -// level 3 representation hack - lugi - // it would be much more interesting to check - // if the sidebar is actually installed and in - // the case it isn't - automatically do it. - // however this requires client-side tests and - // so slows down everything. - // we might want to talk about it for a future - // release - -if (dcRequest.getAsInt("lv") == 3) { - String userAgent = request.getHeader("User-Agent").toLowerCase(); - - if (userAgent.indexOf("mozilla/5.0") == 0) { - - // mozilla 5 that does not support xul-sidebars - if (userAgent.indexOf("opera") > -1) dcRequest.setValue("lv", 2); - if (userAgent.indexOf("chimera") > -1) dcRequest.setValue("lv", 2); - if (userAgent.indexOf("camino") > -1) dcRequest.setValue("lv", 2); - if (userAgent.indexOf("konqueror") > -1) dcRequest.setValue("lv", 2); - if (userAgent.indexOf("safari") > -1) dcRequest.setValue("lv", 2); - if (userAgent.indexOf("galeon") > -1) dcRequest.setValue("lv", 2); - if (userAgent.indexOf("skipstone") > -1) dcRequest.setValue("lv", 2); - if (userAgent.indexOf("k-meleon") > -1) dcRequest.setValue("lv", 2); - if (userAgent.indexOf("firefox") > -1) dcRequest.setValue("lv", 2); - - // the chance is quite big, that the browser supports xul-sidebars - dcRequest.setValue("lv", 1); - - } else { - - // redirect to level 2 because of definitive lack of sidebar support - dcRequest.setValue("lv", 2); - } -} - - - -switch (dcRequest.getAsInt("lv")) { - - // LEVEL 0 -------------------------------------------------------------- - - case 0: -%> - -<% - break; // level 0 - - - - - // LEVEL 1 -------------------------------------------------------------- - - case 1: - - // set number of pages - dcRequest.setValue("pt", docBean.getNumPages(dcRequest)); +// set number of pages +dcRequest.setValue("pt", docBean.getNumPages(dcRequest)); +String baseUrl = dcRequest.getAsString("base.url"); %> - - - - - - - - - - -
- -
- - - - -<% - break; // level 1 - - - - - // LEVEL 2 -------------------------------------------------------------- - - case 2: -%> - -<% - // retrieve request in new paramter format and redirect to level 1 - dcRequest.setValue("lv", 1); - String query = "digicat.jsp?" + dcRequest.getAsString(); -%> - - - -Digital Document Library - Alcatraz (Level 2) +Digital Document Library - Digicat - - + + - -<% - break; // level 2 - -} // end switch - -%>