# HG changeset patch # User robcast # Date 1098995159 -7200 # Node ID 610c7ee770cba4dd036666769dba712cce4b15bc # Parent bf34a4d8f6b40c7e53c3778726eb8b9d50a25a2c 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 bf34a4d8f6b4 -r 610c7ee770cb client/digitallibrary/digilib.jsp --- a/client/digitallibrary/digilib.jsp Thu Oct 28 22:25:59 2004 +0200 +++ b/client/digitallibrary/digilib.jsp Thu Oct 28 22:25:59 2004 +0200 @@ -16,10 +16,6 @@ } } %> - - - - <% // parsing the query @@ -28,230 +24,20 @@ digilib.servlet.DigilibRequest dlRequest = new digilib.servlet.DigilibRequest(request); // check if authentication is needed and redirect if necessary docBean.doAuthentication(dlRequest, 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 (dlRequest.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) dlRequest.setValue("lv", 2); - if (userAgent.indexOf("chimera") > -1) dlRequest.setValue("lv", 2); - if (userAgent.indexOf("camino") > -1) dlRequest.setValue("lv", 2); - if (userAgent.indexOf("konqueror") > -1) dlRequest.setValue("lv", 2); - if (userAgent.indexOf("safari") > -1) dlRequest.setValue("lv", 2); - if (userAgent.indexOf("galeon") > -1) dlRequest.setValue("lv", 2); - if (userAgent.indexOf("skipstone") > -1) dlRequest.setValue("lv", 2); - if (userAgent.indexOf("k-meleon") > -1) dlRequest.setValue("lv", 2); - if (userAgent.indexOf("firebird") > -1) dlRequest.setValue("lv", 2); - - // the chance is quite big, that the browser supports xul-sidebars - dlRequest.setValue("lv", 1); - - } else { - - // redirect to level 2 because of definitive lack of sidebar support - dlRequest.setValue("lv", 2); - } -} - - - -switch (dlRequest.getAsInt("lv")) { - - // LEVEL 0 -------------------------------------------------------------- - - case 0: -%> - -<% - break; // level 0 - - - - - // LEVEL 1 -------------------------------------------------------------- - - case 1: -%> - -<% - // checking if the height and width of this client is already known - if ((dlRequest.getAsInt("dw") == 0) || (dlRequest.getAsInt("dh") == 0)) { -%> - - - - - - - - - -<% - } else { - - // add number of pages - dlRequest.setValue("pt", docBean.getNumPages(dlRequest)); - - String imageLocation = dlRequest.getAsString("base.url") + "/servlet/Scaler/?" + dlRequest.getAsString(); -%> - - - -Digital Document Library (L1) - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - -<% - } -%> - -<% - break; // level 1 - - - - - // LEVEL 2 -------------------------------------------------------------- - - case 2: -%> - -<% - // retrieve request in new paramter format and redirect to level 1 - dlRequest.setValue("lv", 1); - String query = "digilib.jsp?" + dlRequest.getAsString(); -%> - - +%> Digital Document Library (L2) - - + + - - + + - -<% - break; // level 2 - -} // end switch - -%> diff -r bf34a4d8f6b4 -r 610c7ee770cb client/digitallibrary/digimage.jsp --- a/client/digitallibrary/digimage.jsp Thu Oct 28 22:25:59 2004 +0200 +++ b/client/digitallibrary/digimage.jsp Thu Oct 28 22:25:59 2004 +0200 @@ -65,18 +65,18 @@ } %> - - - - - - - - - - - - + + + + + + + + + + + + diff -r bf34a4d8f6b4 -r 610c7ee770cb client/digitallibrary/digimage_tbl_inc.jsp --- a/client/digitallibrary/digimage_tbl_inc.jsp Thu Oct 28 22:25:59 2004 +0200 +++ b/client/digitallibrary/digimage_tbl_inc.jsp Thu Oct 28 22:25:59 2004 +0200 @@ -24,7 +24,7 @@ diff -r bf34a4d8f6b4 -r 610c7ee770cb client/digitallibrary/dllib.js --- a/client/digitallibrary/dllib.js Thu Oct 28 22:25:59 2004 +0200 +++ b/client/digitallibrary/dllib.js Thu Oct 28 22:25:59 2004 +0200 @@ -17,13 +17,21 @@ Authors: Christian Luginbuehl, 01.05.2003 (first version) DW 24.03.2004 (Changed for digiLib in Zope) - Robert Casties, 04.08.2004 + Robert Casties, 27.10.2004 ! Requires baselib.js ! */ -var dlScriptVersion = "1.0b2"; +var dlScriptVersion = "1.0b4"; + + +function identify() { + // used for identifying a digilib instance + // Relato uses that function - lugi + return "Digilib 0.6"; +} + /* * more parameter handling @@ -291,6 +299,7 @@ alert("Only 8 marks are possible at the moment!"); return; } + window.focus(); function markEvent(evt) { // event handler adding a new mark @@ -484,3 +493,11 @@ } return hyperlinkRef; } + +function getRefWin(type, msg) { + // shows an alert with a reference to the current digilib set + if (! msg) { + msg = "Link for HTML documents"; + } + prompt(msg, getRef()); +}