version 1.7, 2005/11/08 18:10:10
|
version 1.10, 2011/02/14 16:33:43
|
Line 17 Foundation, Inc., 59 Temple Place - Suit
|
Line 17 Foundation, Inc., 59 Temple Place - Suit
|
Authors: |
Authors: |
Christian Luginbuehl, 01.05.2003 (first version) |
Christian Luginbuehl, 01.05.2003 (first version) |
DW 24.03.2004 (Changed for digiLib in Zope) |
DW 24.03.2004 (Changed for digiLib in Zope) |
Robert Casties, 8.11.2005 |
Robert Casties, 14.7.2006 |
|
|
! Requires baselib.js ! |
! Requires baselib.js ! |
|
|
Line 178 function bestPicSize(elem, inset) {
|
Line 178 function bestPicSize(elem, inset) {
|
inset = 25; |
inset = 25; |
} |
} |
var ws = getWinSize(); |
var ws = getWinSize(); |
|
var wsold = ws.copy(); |
var es = getElementPosition(elem); |
var es = getElementPosition(elem); |
if (es) { |
if (es) { |
|
if ((es.x > ws.width)||(es.y > ws.height)) { |
|
alert("es="+es+" is outside ws="+ws+" fixing..."); |
|
ws.width = ws.width - inset; |
|
ws.height = ws.height - inset; |
|
} else { |
ws.width = ws.width - es.x - inset; |
ws.width = ws.width - es.x - inset; |
ws.height = ws.height - es.y - inset; |
ws.height = ws.height - es.y - inset; |
} |
} |
|
} |
|
alert("ws="+wsold+" es="+es+" -> ws="+ws); |
|
//alert("ws="+ws+"("+typeof(ws)+") es="+es); |
return ws; |
return ws; |
} |
} |
|
|
Line 217 function dl_param_init() {
|
Line 226 function dl_param_init() {
|
if (!baseScriptVersion) { |
if (!baseScriptVersion) { |
base_init(); |
base_init(); |
} |
} |
dlScriptVersion = "1.2b"; |
dlScriptVersion = "1.3a"; |
dlArea = new Rectangle(0.0, 0.0, 1.0, 1.0); |
dlArea = new Rectangle(0.0, 0.0, 1.0, 1.0); |
dlMaxArea = new Rectangle(0.0, 0.0, 1.0, 1.0); |
dlMaxArea = new Rectangle(0.0, 0.0, 1.0, 1.0); |
dlTrafo = new Transform(); |
dlTrafo = new Transform(); |
Line 228 function dl_param_init() {
|
Line 237 function dl_param_init() {
|
ZOOMFACTOR = Math.sqrt(2); |
ZOOMFACTOR = Math.sqrt(2); |
|
|
// put the query parameters (sans "?") in the parameters array |
// put the query parameters (sans "?") in the parameters array |
parseParameters(location.search.slice(1)); |
// non-digilib parameters get detail level 32 |
|
parseParameters(location.search.slice(1),32); |
// treat special parameters |
// treat special parameters |
dlMarks = parseMarks(); |
dlMarks = parseMarks(); |
dlArea = parseArea(); |
dlArea = parseArea(); |
dlFlags = parseFlags(); |
dlFlags = parseFlags(); |
|
// mask for parameters when creating new URL |
|
dlUrlParamMask = 255; |
} |
} |
|
|
|
|
Line 258 function dl_init() {
|
Line 270 function dl_init() {
|
window.name = "digilib"; |
window.name = "digilib"; |
} |
} |
// put the query parameters (sans "?") in the parameters array |
// put the query parameters (sans "?") in the parameters array |
parseParameters(location.search.slice(1)); |
//parseParameters(location.search.slice(1),32); |
// treat special parameters |
// treat special parameters |
dlMarks = parseMarks(); |
dlMarks = parseMarks(); |
dlArea = parseArea(); |
dlArea = parseArea(); |
Line 276 function display(detail) {
|
Line 288 function display(detail) {
|
if (! detail) { |
if (! detail) { |
detail = 255; |
detail = 255; |
} |
} |
var queryString = getAllParameters(detail); |
var queryString = getAllParameters(detail & dlUrlParamMask); |
location.href = location.protocol + "//" + location.host + location.pathname + "?" + queryString; |
location.href = location.protocol + "//" + location.host + location.pathname + "?" + queryString; |
} |
} |
|
|
Line 503 function getRef() {
|
Line 515 function getRef() {
|
var baseUrl = location.protocol + "//" + location.host + location.pathname; |
var baseUrl = location.protocol + "//" + location.host + location.pathname; |
} |
} |
var hyperlinkRef = baseUrl; |
var hyperlinkRef = baseUrl; |
var par = getAllParameters(7+16); // all without ddpi, pt |
var par = getAllParameters((7+32+64) & dlUrlParamMask); // all without ddpi, pt |
if (par.length > 0) { |
if (par.length > 0) { |
hyperlinkRef += "?" + par; |
hyperlinkRef += "?" + par; |
} |
} |
Line 582 function gotoPage(gopage, keep) {
|
Line 594 function gotoPage(gopage, keep) {
|
} |
} |
} |
} |
if (keep) { |
if (keep) { |
display(15+32); // all, no mark |
display(63+128); // all, no mark |
} else { |
} else { |
display(3+32); // fn, pn, ws, mo + pt |
display(3+32+128); // fn, pn, ws, mo + pt |
} |
} |
} |
} |
|
|
Line 612 function showOptions(show) {
|
Line 624 function showOptions(show) {
|
var elem = getElement("dloptions"); |
var elem = getElement("dloptions"); |
showElement(elem, show); |
showElement(elem, show); |
} |
} |
|
|
|
|
|
function toggleOptions() { |
|
// toggle option div |
|
var elem = getElement("dloptions"); |
|
showOptions(! isElementVisible(elem)); |
|
} |