# HG changeset patch # User robcast # Date 1361814756 -3600 # Node ID de9c762ef86bd7b0845b9b090ddab007f9b28a33 # Parent 1246eb4e60e7d1090b41c4e70736c422197f9158 more cleanup. more license headers. diff -r 1246eb4e60e7 -r de9c762ef86b pom.xml --- a/pom.xml Mon Feb 25 15:21:48 2013 +0100 +++ b/pom.xml Mon Feb 25 18:52:36 2013 +0100 @@ -23,7 +23,7 @@ robcast Robert Casties robcast@berlios.de - Max Planck Institute for the History of Science + Max Planck Institute for the History of Science (MPIWG) http://www.mpiwg-berlin.mpg.de @@ -80,23 +80,6 @@ lgpl_v3 - diff -r 1246eb4e60e7 -r de9c762ef86b webapp/pom.xml --- a/webapp/pom.xml Mon Feb 25 15:21:48 2013 +0100 +++ b/webapp/pom.xml Mon Feb 25 18:52:36 2013 +0100 @@ -1,157 +1,167 @@ - 4.0.0 - - digilib - digilib - 2.1-SNAPSHOT - - digilib-webapp - digilib-webapp - The Digital Image Library - web application server and HTML and JS clients - http://digilib.berlios.de - war + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" + xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + 4.0.0 + + digilib + digilib + 2.1-SNAPSHOT + + digilib-webapp + digilib-webapp + The Digital Image Library - web application server and HTML and JS clients. + http://digilib.berlios.de + war - - UTF-8 - - - - - - - org.apache.maven.plugins - maven-war-plugin - 2.1.1 - - - - + + UTF-8 + - - - servlet2 - - true - - servletapi - 2 - - - - - digilib - digilib-servlet2 - jar - compile - - - - - - org.apache.maven.plugins - maven-war-plugin - - ${basedir}/src/main/webapp/WEB-INF/web-2.3.xml - srv2 - - - - - - - servlet3 - - - servletapi - 3 - - - - - digilib - digilib-servlet3 - jar - compile - - - - - - org.apache.maven.plugins - maven-war-plugin - - ${basedir}/src/main/webapp/WEB-INF/web-3.0.xml - srv3 - - - - org.apache.maven.plugins - maven-compiler-plugin - - 1.6 - 1.6 - - - - - - - pdf - - - digilib - digilib-pdf - jar - compile - - - - - text - - - digilib - digilib-text - jar - compile - - - - - codec-jai - - - digilib - digilib-common-jai - jar - compile - - - - - codec-imagej - - - digilib - digilib-common-imagej - jar - compile - - - - - codec-bioformats - - - digilib - digilib-common-bioformats - jar - compile - - - - + + + + + org.apache.maven.plugins + maven-war-plugin + 2.1.1 + + + org.codehaus.mojo + license-maven-plugin + 1.4 + + + **/*digilib*.js + **/*.jsp + + + + + + + + + servlet2 + + true + + servletapi + 2 + + + + + digilib + digilib-servlet2 + jar + compile + + + + + + org.apache.maven.plugins + maven-war-plugin + + ${basedir}/src/main/webapp/WEB-INF/web-2.3.xml + srv2 + + + + + + + servlet3 + + + servletapi + 3 + + + + + digilib + digilib-servlet3 + jar + compile + + + + + + org.apache.maven.plugins + maven-war-plugin + + ${basedir}/src/main/webapp/WEB-INF/web-3.0.xml + srv3 + + + + org.apache.maven.plugins + maven-compiler-plugin + + 1.6 + 1.6 + + + + + + + pdf + + + digilib + digilib-pdf + jar + compile + + + + + text + + + digilib + digilib-text + jar + compile + + + + + codec-jai + + + digilib + digilib-common-jai + jar + compile + + + + + codec-imagej + + + digilib + digilib-common-imagej + jar + compile + + + + + codec-bioformats + + + digilib + digilib-common-bioformats + jar + compile + + + + diff -r 1246eb4e60e7 -r de9c762ef86b webapp/src/main/webapp/ImgInfo-json.jsp --- a/webapp/src/main/webapp/ImgInfo-json.jsp Mon Feb 25 15:21:48 2013 +0100 +++ b/webapp/src/main/webapp/ImgInfo-json.jsp Mon Feb 25 18:52:36 2013 +0100 @@ -1,4 +1,25 @@ -<%@page language="java" +<%-- + #%L + digilib-webapp + %% + Copyright (C) 2003 - 2013 MPIWG Berlin + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Lesser Public License for more details. + + You should have received a copy of the GNU General Lesser Public + License along with this program. If not, see + . + #L% + Author: Robert Casties (robcast@berlios.de) + --%><%@page language="java" import="digilib.io.FileOps, digilib.io.ImageFileSet, digilib.io.ImageFile, digilib.util.ImageSize, digilib.servlet.DigilibConfiguration" contentType="application/json"%><%! // create DocumentBean instance for all JSP requests diff -r 1246eb4e60e7 -r de9c762ef86b webapp/src/main/webapp/api/ImgInfo-json.jsp --- a/webapp/src/main/webapp/api/ImgInfo-json.jsp Mon Feb 25 15:21:48 2013 +0100 +++ b/webapp/src/main/webapp/api/ImgInfo-json.jsp Mon Feb 25 18:52:36 2013 +0100 @@ -1,4 +1,25 @@ -<%@page language="java" +<%-- + #%L + digilib-webapp + %% + Copyright (C) 2003 - 2013 MPIWG Berlin + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Lesser Public License for more details. + + You should have received a copy of the GNU General Lesser Public + License along with this program. If not, see + . + #L% + Author: Robert Casties (robcast@berlios.de) + --%><%@page language="java" import="digilib.io.FileOps, digilib.io.ImageFileSet, digilib.io.ImageFile, digilib.util.ImageSize, digilib.servlet.DigilibConfiguration" contentType="application/json"%><%! // create DocumentBean instance for all JSP requests diff -r 1246eb4e60e7 -r de9c762ef86b webapp/src/main/webapp/api/dirInfo-xml.jsp --- a/webapp/src/main/webapp/api/dirInfo-xml.jsp Mon Feb 25 15:21:48 2013 +0100 +++ b/webapp/src/main/webapp/api/dirInfo-xml.jsp Mon Feb 25 18:52:36 2013 +0100 @@ -1,4 +1,25 @@ -<%@page import="digilib.io.FileOps"%><%@ page language="java" %><%! +<%-- + #%L + digilib-webapp + %% + Copyright (C) 2004 - 2013 MPIWG Berlin + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Lesser Public License for more details. + + You should have received a copy of the GNU General Lesser Public + License along with this program. If not, see + . + #L% + Author: Robert Casties (robcast@berlios.de) + --%><%@page import="digilib.io.FileOps"%><%@ page language="java" %><%! // create DocumentBean instance for all JSP requests digilib.servlet.DocumentBean docBean = new digilib.servlet.DocumentBean(); diff -r 1246eb4e60e7 -r de9c762ef86b webapp/src/main/webapp/api/dlContext-xml.jsp --- a/webapp/src/main/webapp/api/dlContext-xml.jsp Mon Feb 25 15:21:48 2013 +0100 +++ b/webapp/src/main/webapp/api/dlContext-xml.jsp Mon Feb 25 18:52:36 2013 +0100 @@ -1,4 +1,25 @@ -<%@ page language="java" %><%! +<%-- + #%L + digilib-webapp + %% + Copyright (C) 2004 - 2013 MPIWG Berlin + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Lesser Public License for more details. + + You should have received a copy of the GNU General Lesser Public + License along with this program. If not, see + . + #L% + Author: Robert Casties (robcast@berlios.de) + --%><%@ page language="java" %><%! // create DocumentBean instance for all JSP requests digilib.servlet.DocumentBean docBean = new digilib.servlet.DocumentBean(); diff -r 1246eb4e60e7 -r de9c762ef86b webapp/src/main/webapp/api/dlInfo-json.jsp --- a/webapp/src/main/webapp/api/dlInfo-json.jsp Mon Feb 25 15:21:48 2013 +0100 +++ b/webapp/src/main/webapp/api/dlInfo-json.jsp Mon Feb 25 18:52:36 2013 +0100 @@ -1,5 +1,25 @@ -<%@ page language="java" %> -<%! +<%-- + #%L + digilib-webapp + %% + Copyright (C) 2004 - 2013 MPIWG Berlin + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Lesser Public License for more details. + + You should have received a copy of the GNU General Lesser Public + License along with this program. If not, see + . + #L% + Author: Robert Casties (robcast@berlios.de) + --%><%@ page language="java" %><%! // create DocumentBean instance for all JSP requests digilib.servlet.DocumentBean docBean = new digilib.servlet.DocumentBean(); diff -r 1246eb4e60e7 -r de9c762ef86b webapp/src/main/webapp/api/dlInfo-xml.jsp --- a/webapp/src/main/webapp/api/dlInfo-xml.jsp Mon Feb 25 15:21:48 2013 +0100 +++ b/webapp/src/main/webapp/api/dlInfo-xml.jsp Mon Feb 25 18:52:36 2013 +0100 @@ -1,4 +1,25 @@ -<%@ page language="java" %><%! +<%-- + #%L + digilib-webapp + %% + Copyright (C) 2004 - 2013 MPIWG Berlin + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Lesser Public License for more details. + + You should have received a copy of the GNU General Lesser Public + License along with this program. If not, see + . + #L% + Author: Robert Casties (robcast@berlios.de) + --%><%@ page language="java" %><%! // create DocumentBean instance for all JSP requests digilib.servlet.DocumentBean docBean = new digilib.servlet.DocumentBean(); diff -r 1246eb4e60e7 -r de9c762ef86b webapp/src/main/webapp/digilib.jsp --- a/webapp/src/main/webapp/digilib.jsp Mon Feb 25 15:21:48 2013 +0100 +++ b/webapp/src/main/webapp/digilib.jsp Mon Feb 25 18:52:36 2013 +0100 @@ -1,4 +1,25 @@ - +<%-- + #%L + digilib-webapp + %% + Copyright (C) 2013 MPIWG Berlin + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Lesser Public License for more details. + + You should have received a copy of the GNU General Lesser Public + License along with this program. If not, see + . + #L% + Author: Robert Casties (robcast@berlios.de) + --%> Digital Library Redirect diff -r 1246eb4e60e7 -r de9c762ef86b webapp/src/main/webapp/dirInfo-xml.jsp --- a/webapp/src/main/webapp/dirInfo-xml.jsp Mon Feb 25 15:21:48 2013 +0100 +++ b/webapp/src/main/webapp/dirInfo-xml.jsp Mon Feb 25 18:52:36 2013 +0100 @@ -1,4 +1,25 @@ -<%@page import="digilib.io.FileOps"%><%@ page language="java" %><%! +<%-- + #%L + digilib-webapp + %% + Copyright (C) 2004 - 2013 MPIWG Berlin + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Lesser Public License for more details. + + You should have received a copy of the GNU General Lesser Public + License along with this program. If not, see + . + #L% + Author: Robert Casties (robcast@berlios.de) + --%><%@page import="digilib.io.FileOps"%><%@ page language="java" %><%! // create DocumentBean instance for all JSP requests digilib.servlet.DocumentBean docBean = new digilib.servlet.DocumentBean(); diff -r 1246eb4e60e7 -r de9c762ef86b webapp/src/main/webapp/dlContext-xml.jsp --- a/webapp/src/main/webapp/dlContext-xml.jsp Mon Feb 25 15:21:48 2013 +0100 +++ b/webapp/src/main/webapp/dlContext-xml.jsp Mon Feb 25 18:52:36 2013 +0100 @@ -1,4 +1,25 @@ -<%@ page language="java" %><%! +<%-- + #%L + digilib-webapp + %% + Copyright (C) 2004 - 2013 MPIWG Berlin + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Lesser Public License for more details. + + You should have received a copy of the GNU General Lesser Public + License along with this program. If not, see + . + #L% + Author: Robert Casties (robcast@berlios.de) + --%><%@ page language="java" %><%! // create DocumentBean instance for all JSP requests digilib.servlet.DocumentBean docBean = new digilib.servlet.DocumentBean(); diff -r 1246eb4e60e7 -r de9c762ef86b webapp/src/main/webapp/dlInfo-json.jsp --- a/webapp/src/main/webapp/dlInfo-json.jsp Mon Feb 25 15:21:48 2013 +0100 +++ b/webapp/src/main/webapp/dlInfo-json.jsp Mon Feb 25 18:52:36 2013 +0100 @@ -1,5 +1,25 @@ -<%@ page language="java" %> -<%! +<%-- + #%L + digilib-webapp + %% + Copyright (C) 2004 - 2013 MPIWG Berlin + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Lesser Public License for more details. + + You should have received a copy of the GNU General Lesser Public + License along with this program. If not, see + . + #L% + Author: Robert Casties (robcast@berlios.de) + --%><%@ page language="java" %><%! // create DocumentBean instance for all JSP requests digilib.servlet.DocumentBean docBean = new digilib.servlet.DocumentBean(); diff -r 1246eb4e60e7 -r de9c762ef86b webapp/src/main/webapp/dlInfo-xml.jsp --- a/webapp/src/main/webapp/dlInfo-xml.jsp Mon Feb 25 15:21:48 2013 +0100 +++ b/webapp/src/main/webapp/dlInfo-xml.jsp Mon Feb 25 18:52:36 2013 +0100 @@ -1,4 +1,25 @@ -<%@ page language="java" %><%! +<%-- + #%L + digilib-webapp + %% + Copyright (C) 2004 - 2013 MPIWG Berlin + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Lesser Public License for more details. + + You should have received a copy of the GNU General Lesser Public + License along with this program. If not, see + . + #L% + Author: Robert Casties (robcast@berlios.de) + --%><%@ page language="java" %><%! // create DocumentBean instance for all JSP requests digilib.servlet.DocumentBean docBean = new digilib.servlet.DocumentBean(); diff -r 1246eb4e60e7 -r de9c762ef86b webapp/src/main/webapp/greyskin/baselib.js --- a/webapp/src/main/webapp/greyskin/baselib.js Mon Feb 25 15:21:48 2013 +0100 +++ b/webapp/src/main/webapp/greyskin/baselib.js Mon Feb 25 18:52:36 2013 +0100 @@ -1,25 +1,29 @@ -/* Copyright (C) 2003-2006 IT-Group MPIWG, WTWG Uni Bern and others - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - -Authors: - Christian Luginbuehl, 01.05.2003 (first version) - DW 24.03.2004 (Changed for digiLib in Zope) - Robert Casties, 2.11.2004 (almost complete rewrite) - Martin Raspe, 12.12.2005 (changes for Digilib NG) - Robert Casties, 3.9.2009 +/* + * #%L + * digilib-webapp + * %% + * Copyright (C) 2003 - 2013 IT-Group MPIWG, WTWG Uni Bern and others + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * . + * #L% + * Authors: + * Christian Luginbuehl, 01.05.2003 (first version) + * DW 24.03.2004 (Changed for digiLib in Zope) + * Robert Casties, 2.11.2004 (almost complete rewrite) + * Martin Raspe, 12.12.2005 (changes for Digilib NG) + * Robert Casties, 3.9.2009 */ // was: function base_init() { diff -r 1246eb4e60e7 -r de9c762ef86b webapp/src/main/webapp/greyskin/diginew.jsp --- a/webapp/src/main/webapp/greyskin/diginew.jsp Mon Feb 25 15:21:48 2013 +0100 +++ b/webapp/src/main/webapp/greyskin/diginew.jsp Mon Feb 25 18:52:36 2013 +0100 @@ -1,4 +1,24 @@ -. + #L% + --%> <%@ page language="java" pageEncoding="UTF-8"%><%! // -- JSP init ------------- diff -r 1246eb4e60e7 -r de9c762ef86b webapp/src/main/webapp/greyskin/dllib.js --- a/webapp/src/main/webapp/greyskin/dllib.js Mon Feb 25 15:21:48 2013 +0100 +++ b/webapp/src/main/webapp/greyskin/dllib.js Mon Feb 25 18:52:36 2013 +0100 @@ -1,27 +1,31 @@ -/* Copyright (C) 2003,2004 IT-Group MPIWG, WTWG Uni Bern and others - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - -Authors: - Christian Luginbuehl, 01.05.2003 (first version) - DW 24.03.2004 (Changed for digiLib in Zope) - Robert Casties, 8.11.2005 - Martin Raspe , 12.12.2005 - Robert Casties, 4.9.2009 - - ! Requires baselib.js ! +/* + * #%L + * digilib-webapp + * %% + * Copyright (C) 2003 - 2013 IT-Group MPIWG, WTWG Uni Bern and others + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * . + * #L% + * Authors: + * Christian Luginbuehl, 01.05.2003 (first version) + * DW 24.03.2004 (Changed for digiLib in Zope) + * Robert Casties, 8.11.2005 + * Martin Raspe , 12.12.2005 + * Robert Casties, 4.9.2009 + * + * ! Requires baselib.js ! */ digilibVersion = "Digilib NG"; dllibVersion = "2.042"; diff -r 1246eb4e60e7 -r de9c762ef86b webapp/src/main/webapp/jquery/combiner-0.0.1.jar Binary file webapp/src/main/webapp/jquery/combiner-0.0.1.jar has changed diff -r 1246eb4e60e7 -r de9c762ef86b webapp/src/main/webapp/jquery/dlGeometry.js --- a/webapp/src/main/webapp/jquery/dlGeometry.js Mon Feb 25 15:21:48 2013 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,486 +0,0 @@ -/* digilib geometry classes - * should be integrated into jquery.digilib.js - */ - -var dlGeometry = function() { - /* - * Size class - */ - var size = function(w, h) { - var that; - if (typeof w === "object") { - // assume its size - that = { - width : w.width, - height : w.height - }; - } else { - that = { - width : parseFloat(w), - height : parseFloat(h) - }; - } - that.equals = function(other) { - return (this.width === other.width && this.height === other.height); - }; - that.toString = function() { - return (this.width + "x" + this.height); - }; - return that; - }; - - /* - * Position class - */ - var position = function(x, y) { - var that; - if (typeof x === "object") { - if (x instanceof jQuery) { - // jQuery object - var pos = x.offset(); - that = { - x : pos.left, - y : pos.top - }; - } else { - if (x.x != null) { - // position object - that = { - x : x.x, - y : x.y - }; - } - if (x.pageX != null) { - // event object - that = { - x : x.pageX, - y : x.pageY - }; - } - } - } else { - that = { - x : parseFloat(x), - y : parseFloat(y) - }; - } - that.equals = function(other) { - return (this.x === other.x && this.y === other.y); - }; - // add position other to this - that.add = function(other) { - this.x += other.x; - this.y += other.y; - return this; - }; - // returns negative position - that.neg = function() { - return position({ - x : -this.x, - y : -this.y - }); - }; - // returns new position that is the difference between this and other - that.delta = function(other) { - return position({ - x : other.x - this.x, - y : other.y - this.y - }); - }; - // adjusts position $elem to this position - that.adjustDiv = function($elem) { - $elem.offset({ - left : this.x, - top : this.y - }); - }; - // returns distance of this position to pos (length if pos == null) - that.distance = function(pos) { - if (pos == null) { - pos = { - x : 0, - y : 0 - }; - } - var dx = pos.x - this.x; - var dy = pos.y - this.y; - return Math.sqrt(dx * dx + dy * dy); - }; - that.toString = function() { - return (this.x + "," + this.y); - }; - return that; - }; - /* - * Rectangle class - */ - var rectangle = function(x, y, w, h) { - var that = {}; - if (typeof x === "object") { - if (x instanceof jQuery) { - // jQuery object - var pos = x.offset(); - that = { - x : pos.left, - y : pos.top, - width : x.width(), - height : x.height() - }; - } else if (y == null) { - // assume x is rectangle - that = { - x : x.x, - y : x.y, - width : x.width, - height : x.height - }; - } else { - // assume x and y are Position - that = { - x : Math.min(x.x, y.x), - y : Math.min(x.y, y.y), - width : Math.abs(y.x - x.x), - height : Math.abs(y.y - x.y) - }; - } - } else { - that = { - x : parseFloat(x), - y : parseFloat(y), - width : parseFloat(w), - height : parseFloat(h) - }; - } - // returns a copy of this Rectangle - that.copy = function() { - return rectangle(this); - }; - // returns the position of this Rectangle - that.getPosition = function() { - return position(this); - }; - // returns the size of this Rectangle - that.getSize = function() { - return size(this); - }; - // returns the upper left corner position - that.getPt1 = that.getPosition; - // returns the lower right corner position of this Rectangle - that.getPt2 = function() { - return position({ - x : this.x + this.width, - y : this.y + this.height - }); - }; - // sets the upper left corner position to pos - that.setPosition = function(pos) { - this.x = pos.x; - this.y = pos.y; - return this; - }; - that.setPt1 = that.setPosition; // TODO: not really the same - // adds pos to the position - that.addPosition = function(pos) { - this.x += pos.x; - this.y += pos.y; - return this; - }; - // sets the lower right corner to position pos - that.setPt2 = function(pos) { - this.width = pos.x - this.x; - this.height = pos.y - this.y; - return this; - }; - // returns the center position of this Rectangle - that.getCenter = function() { - return position({ - x : this.x + this.width / 2, - y : this.y + this.height / 2 - }); - }; - // moves this Rectangle's center to position pos - that.setCenter = function(pos) { - this.x = pos.x - this.width / 2; - this.y = pos.y - this.height / 2; - return this; - }; - that.equals = function(other) { - // equal props - var eq = (this.x === other.x && this.y === other.y && this.width === other.width); - return eq; - }; - // returns the area of this Rectangle - that.getArea = function() { - return (this.width * this.height); - }; - // eliminates negative width and height - that.normalize = function() { - var p = this.getPt2(); - this.x = Math.min(this.x, p.x); - this.y = Math.min(this.y, p.y); - this.width = Math.abs(this.width); - this.height = Math.abs(this.height); - return this; - }; - // returns if Position "pos" lies inside of this rectangle - that.containsPosition = function(pos) { - var ct = ((pos.x >= this.x) && (pos.y >= this.y) - && (pos.x <= this.x + this.width) && (pos.y <= this.y - + this.height)); - return ct; - }; - // returns if rectangle "rect" is contained in this rectangle - that.containsRect = function(rect) { - return (this.containsPosition(rect.getPt1()) && this - .containsPosition(rect.getPt2())); - }; - // changes this rectangle's x/y values so it stays inside of rectangle - // rect - // keeping the proportions - that.stayInside = function(rect) { - if (this.x < rect.x) { - this.x = rect.x; - } - if (this.y < rect.y) { - this.y = rect.y; - } - if (this.x + this.width > rect.x + rect.width) { - this.x = rect.x + rect.width - this.width; - } - if (this.y + this.height > rect.y + rect.height) { - this.y = rect.y + rect.height - this.height; - } - return this; - }; - // clips this rectangle so it stays inside of rectangle rect - that.clipTo = function(rect) { - var p1 = rect.getPt1(); - var p2 = rect.getPt2(); - var this2 = this.getPt2(); - this.setPosition(position(Math.max(this.x, p1.x), Math.max(this.y, p1.y))); - this.setPt2(position(Math.min(this2.x, p2.x), Math.min(this2.y, p2.y))); - return this; - }; - // returns the intersection of the given Rectangle and this one - that.intersect = function(rect) { - // FIX ME: not really, it should return null if there is no overlap - var sec = rect.copy(); - if (sec.x < this.x) { - sec.width = sec.width - (this.x - sec.x); - sec.x = this.x; - } - if (sec.y < this.y) { - sec.height = sec.height - (this.y - sec.y); - sec.y = this.y; - } - if (sec.x + sec.width > this.x + this.width) { - sec.width = (this.x + this.width) - sec.x; - } - if (sec.y + sec.height > this.y + this.height) { - sec.height = (this.y + this.height) - sec.y; - } - return sec; - }; - // returns a Rectangle that fits into this one (by moving first) - that.fit = function(rect) { - var sec = rect.copy(); - sec.x = Math.max(sec.x, this.x); - sec.y = Math.max(sec.y, this.x); - if (sec.x + sec.width > this.x + this.width) { - sec.x = this.x + this.width - sec.width; - } - if (sec.y + sec.height > this.y + this.height) { - sec.y = this.y + this.height - sec.height; - } - return sec.intersect(this); - }; - // adjusts position and size of $elem to this rectangle - that.adjustDiv = function($elem) { - $elem.offset({ - left : this.x, - top : this.y - }); - $elem.width(this.width).height(this.height); - }; - // returns size and position in css-compatible format - that.getAsCss = function() { - return { - left : this.x, - top : this.y, - width : this.width, - height : this.height - }; - }; - that.toString = function() { - return this.width + "x" + this.height + "@" + this.x + "," + this.y; - }; - return that; - }; - - /* - * Transform class - * - * defines a class of affine transformations - */ - var transform = function(spec) { - var that = { - m00 : 1.0, - m01 : 0.0, - m02 : 0.0, - m10 : 0.0, - m11 : 1.0, - m12 : 0.0, - m20 : 0.0, - m21 : 0.0, - m22 : 1.0 - }; - if (spec) { - jQuery.extend(that, spec); - } - ; - that.concat = function(trafA) { - // add Transform trafA to this Transform (i.e. this = trafC = trafA - // * this) - var trafC = {}; - for ( var i = 0; i < 3; i++) { - for ( var j = 0; j < 3; j++) { - var c = 0.0; - for ( var k = 0; k < 3; k++) { - c += trafA["m" + i + k] * this["m" + k + j]; - } - trafC["m" + i + j] = c; - } - } - jQuery.extend(this, trafC); - return this; - }; - that.transform = function(rect) { - // returns transformed Rectangle or Position with this Transform - // applied - var x = this.m00 * rect.x + this.m01 * rect.y + this.m02; - var y = this.m10 * rect.x + this.m11 * rect.y + this.m12; - var pt = position(x, y); - if (rect.width) { - // transform the other corner point - var pt2 = this.transform(rect.getPt2()); - return rectangle(pt, pt2); - } - return pt; - }; - that.invtransform = function(rect) { - // returns transformed Rectangle or Position with the inverse of - // this Transform applied - var det = this.m00 * this.m11 - this.m01 * this.m10; - var x = (this.m11 * rect.x - this.m01 * rect.y - this.m11 - * this.m02 + this.m01 * this.m12) - / det; - var y = (-this.m10 * rect.x + this.m00 * rect.y + this.m10 - * this.m02 - this.m00 * this.m12) - / det; - var pt = position(x, y); - if (rect.width) { - // transform the other corner point - var pt2 = this.invtransform(rect.getPt2()); - return rectangle(pt, pt2); - } - return pt; - }; - that.toString = function(pretty) { - var s = '['; - if (pretty) - s += '\n'; - for ( var i = 0; i < 3; ++i) { - s += '['; - for ( var j = 0; j < 3; ++j) { - if (j) - s += ','; - s += this['m' + i + j]; - } - s += ']'; - if (pretty) - s += '\n'; - } - s += ']'; - if (pretty) - s += '\n'; - return s; - }; - // add class methods to instance - that.getRotation = transform.getRotation; - that.getRotationAround = transform.getRotationAround; - that.getTranslation = transform.getTranslation; - that.getMirror = transform.getMirror; - that.getScale = transform.getScale; - - return that; - }; - - transform.getRotation = function(angle) { - // returns a Transform that is a rotation by angle degrees around [0,0] - if (angle !== 0) { - var t = Math.PI * parseFloat(angle) / 180.0; - var cost = Math.cos(t); - var sint = Math.sin(t); - var traf = { - m00 : cost, - m01 : -sint, - m10 : sint, - m11 : cost - }; - return transform(traf); - } - return transform(); - }; - - transform.getRotationAround = function(angle, pos) { - // returns a Transform that is a rotation by angle degrees around pos - var traf = transform.getTranslation(pos.neg()); - traf.concat(transform.getRotation(angle)); - traf.concat(transform.getTranslation(pos)); - return traf; - }; - - transform.getTranslation = function(pos) { - // returns a Transform that is a translation by [pos.x, pos,y] - var traf = { - m02 : pos.x, - m12 : pos.y - }; - return transform(traf); - }; - - transform.getMirror = function(type) { - // returns a Transform that is a mirror about the axis type - if (type === 'x') { - var traf = { - m00 : 1, - m11 : -1 - }; - } else { - var traf = { - m00 : -1, - m11 : 1 - }; - } - return transform(traf); - }; - - transform.getScale = function(size) { - // returns a Transform that is a scale by [size.width, size.height] - var traf = { - m00 : size.width, - m11 : size.height - }; - return transform(traf); - }; - - // export functions - var that = { - size : size, - position : position, - rectangle : rectangle, - transform : transform - }; - - return that; -}; diff -r 1246eb4e60e7 -r de9c762ef86b webapp/src/main/webapp/jquery/jquery.digilib.annotator.js --- a/webapp/src/main/webapp/jquery/jquery.digilib.annotator.js Mon Feb 25 15:21:48 2013 +0100 +++ b/webapp/src/main/webapp/jquery/jquery.digilib.annotator.js Mon Feb 25 18:52:36 2013 +0100 @@ -1,3 +1,25 @@ +/* + * #%L + * digilib plugin for annotations. + * %% + * Copyright (C) 2012 - 2013 MPIWG Berlin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * . + * #L% + * Authors: Robert Casties + */ /** digilib plugin for annotations. diff -r 1246eb4e60e7 -r de9c762ef86b webapp/src/main/webapp/jquery/jquery.digilib.arrows.js --- a/webapp/src/main/webapp/jquery/jquery.digilib.arrows.js Mon Feb 25 15:21:48 2013 +0100 +++ b/webapp/src/main/webapp/jquery/jquery.digilib.arrows.js Mon Feb 25 18:52:36 2013 +0100 @@ -1,3 +1,25 @@ +/* + * #%L + * digilib-webapp + * %% + * Copyright (C) 2011 - 2013 MPIWG Berlin, Bibliotheca Hertziana + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * . + * #L% + * Authors: Robert Casties, Martin Raspe + */ /** * digilib pan arrows for scrolling the zoomed area. */ diff -r 1246eb4e60e7 -r de9c762ef86b webapp/src/main/webapp/jquery/jquery.digilib.birdseye.js --- a/webapp/src/main/webapp/jquery/jquery.digilib.birdseye.js Mon Feb 25 15:21:48 2013 +0100 +++ b/webapp/src/main/webapp/jquery/jquery.digilib.birdseye.js Mon Feb 25 18:52:36 2013 +0100 @@ -1,3 +1,25 @@ +/* + * #%L + * digilib bird's eye view plugin + * %% + * Copyright (C) 2011 - 2013 Bibliotheca Hertziana, MPIWG Berlin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * . + * #L% + * Authors: Martin Raspe, Robert Casties + */ /** digilib bird's eye view plugin */ diff -r 1246eb4e60e7 -r de9c762ef86b webapp/src/main/webapp/jquery/jquery.digilib.buttons.js --- a/webapp/src/main/webapp/jquery/jquery.digilib.buttons.js Mon Feb 25 15:21:48 2013 +0100 +++ b/webapp/src/main/webapp/jquery/jquery.digilib.buttons.js Mon Feb 25 18:52:36 2013 +0100 @@ -1,3 +1,25 @@ +/* + * #%L + * digilib buttons plugin + * %% + * Copyright (C) 2011 - 2013 Bibliotheca Hertziana, MPIWG Berlin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * . + * #L% + * Authors: Martin Raspe, Robert Casties + */ /** digilib buttons plugin */ diff -r 1246eb4e60e7 -r de9c762ef86b webapp/src/main/webapp/jquery/jquery.digilib.dialogs.js --- a/webapp/src/main/webapp/jquery/jquery.digilib.dialogs.js Mon Feb 25 15:21:48 2013 +0100 +++ b/webapp/src/main/webapp/jquery/jquery.digilib.dialogs.js Mon Feb 25 18:52:36 2013 +0100 @@ -1,3 +1,25 @@ +/* + * #%L + * digilib dialogs plugin + * %% + * Copyright (C) 2011 - 2013 Bibliotheca Hertziana, MPIWG Berlin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * . + * #L% + * Authors: Martin Raspe, Robert Casties + */ /** digilib dialogs plugin */ diff -r 1246eb4e60e7 -r de9c762ef86b webapp/src/main/webapp/jquery/jquery.digilib.geometry.js --- a/webapp/src/main/webapp/jquery/jquery.digilib.geometry.js Mon Feb 25 15:21:48 2013 +0100 +++ b/webapp/src/main/webapp/jquery/jquery.digilib.geometry.js Mon Feb 25 18:52:36 2013 +0100 @@ -1,3 +1,25 @@ +/* + * #%L + * required digilib geometry plugin + * %% + * Copyright (C) 2011 - 2013 MPIWG Berlin, Bibliotheca Hertziana + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * . + * #L% + * Authors: Robert Casties, Martin Raspe + */ /** required digilib geometry plugin */ diff -r 1246eb4e60e7 -r de9c762ef86b webapp/src/main/webapp/jquery/jquery.digilib.js --- a/webapp/src/main/webapp/jquery/jquery.digilib.js Mon Feb 25 15:21:48 2013 +0100 +++ b/webapp/src/main/webapp/jquery/jquery.digilib.js Mon Feb 25 18:52:36 2013 +0100 @@ -1,21 +1,25 @@ -/* Copyright (c) 2011 Martin Raspe, Robert Casties - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with this program. If not, see . - -Authors: - Martin Raspe, Robert Casties, 11.1.2011 -*/ +/* + * #%L + * digilib-webapp + * %% + * Copyright (C) 2011 - 2013 MPIWG Berlin, Bibliotheca Hertziana + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * . + * #L% + * Authors: Martin Raspe, Robert Casties, 11.1.2011 + */ /** * digilib jQuery plugin diff -r 1246eb4e60e7 -r de9c762ef86b webapp/src/main/webapp/jquery/jquery.digilib.marks.js --- a/webapp/src/main/webapp/jquery/jquery.digilib.marks.js Mon Feb 25 15:21:48 2013 +0100 +++ b/webapp/src/main/webapp/jquery/jquery.digilib.marks.js Mon Feb 25 18:52:36 2013 +0100 @@ -1,3 +1,25 @@ +/* + * #%L + * digilib marks plugin + * %% + * Copyright (C) 2011 - 2013 MPIWG Berlin, Bibliotheca Hertziana + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * . + * #L% + * Authors: Robert Casties, Martin Raspe + */ /** * digilib marks plugin */ diff -r 1246eb4e60e7 -r de9c762ef86b webapp/src/main/webapp/jquery/jquery.digilib.pluginstub.js --- a/webapp/src/main/webapp/jquery/jquery.digilib.pluginstub.js Mon Feb 25 15:21:48 2013 +0100 +++ b/webapp/src/main/webapp/jquery/jquery.digilib.pluginstub.js Mon Feb 25 18:52:36 2013 +0100 @@ -1,3 +1,25 @@ +/* + * #%L + * digilib plugin stub + * %% + * Copyright (C) 2011 - 2013 Bibliotheca Hertziana, MPIWG Berlin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * . + * #L% + * Authors: Robert Casties, Martin Raspe + */ /** digilib plugin stub */ diff -r 1246eb4e60e7 -r de9c762ef86b webapp/src/main/webapp/jquery/jquery.digilib.regions.js --- a/webapp/src/main/webapp/jquery/jquery.digilib.regions.js Mon Feb 25 15:21:48 2013 +0100 +++ b/webapp/src/main/webapp/jquery/jquery.digilib.regions.js Mon Feb 25 18:52:36 2013 +0100 @@ -1,3 +1,25 @@ +/* + * #%L + * optional digilib regions plugin + * %% + * Copyright (C) 2011 - 2013 Bibliotheca Hertziana, MPIWG Berlin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * . + * #L% + * Authors: Martin Raspe, Robert Casties + */ /** optional digilib regions plugin Mark up a digilib image with rectangular regions. diff -r 1246eb4e60e7 -r de9c762ef86b webapp/src/main/webapp/jquery/jquery.digilib.sliders.js --- a/webapp/src/main/webapp/jquery/jquery.digilib.sliders.js Mon Feb 25 15:21:48 2013 +0100 +++ b/webapp/src/main/webapp/jquery/jquery.digilib.sliders.js Mon Feb 25 18:52:36 2013 +0100 @@ -1,3 +1,25 @@ +/* + * #%L + * digilib sliders plugin + * %% + * Copyright (C) 2011 - 2013 Bibliotheca Hertziana, MPIWG Berlin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * . + * #L% + * Authors: Martin Raspe, Robert Casties + */ /** digilib sliders plugin */ diff -r 1246eb4e60e7 -r de9c762ef86b webapp/src/main/webapp/jquery/jquery.digilib.svg.js --- a/webapp/src/main/webapp/jquery/jquery.digilib.svg.js Mon Feb 25 15:21:48 2013 +0100 +++ b/webapp/src/main/webapp/jquery/jquery.digilib.svg.js Mon Feb 25 18:52:36 2013 +0100 @@ -1,22 +1,25 @@ -/* Copyright (c) 2011 Martin Raspe, Robert Casties - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with this program. If not, see . - -Authors: - Martin Raspe, Robert Casties, 26.3.2012 -*/ - +/* + * #%L + * digilib SVG plugin + * %% + * Copyright (C) 2012 - 2013 Bibliotheca Hertziana, MPIWG Berlin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * . + * #L% + * Authors: Martin Raspe, Robert Casties, 26.3.2012 + */ /** * digilib SVG plugin (display a SVG on top if scaler image and zoom/rotate/mirror etc.) **/ diff -r 1246eb4e60e7 -r de9c762ef86b webapp/src/main/webapp/jquery/ui/images/ui-bg_flat_0_aaaaaa_40x100.png Binary file webapp/src/main/webapp/jquery/ui/images/ui-bg_flat_0_aaaaaa_40x100.png has changed diff -r 1246eb4e60e7 -r de9c762ef86b webapp/src/main/webapp/jquery/ui/images/ui-bg_flat_75_ffffff_40x100.png Binary file webapp/src/main/webapp/jquery/ui/images/ui-bg_flat_75_ffffff_40x100.png has changed diff -r 1246eb4e60e7 -r de9c762ef86b webapp/src/main/webapp/jquery/ui/images/ui-bg_glass_55_fbf9ee_1x400.png Binary file webapp/src/main/webapp/jquery/ui/images/ui-bg_glass_55_fbf9ee_1x400.png has changed diff -r 1246eb4e60e7 -r de9c762ef86b webapp/src/main/webapp/jquery/ui/images/ui-bg_glass_65_ffffff_1x400.png Binary file webapp/src/main/webapp/jquery/ui/images/ui-bg_glass_65_ffffff_1x400.png has changed diff -r 1246eb4e60e7 -r de9c762ef86b webapp/src/main/webapp/jquery/ui/images/ui-bg_glass_75_dadada_1x400.png Binary file webapp/src/main/webapp/jquery/ui/images/ui-bg_glass_75_dadada_1x400.png has changed diff -r 1246eb4e60e7 -r de9c762ef86b webapp/src/main/webapp/jquery/ui/images/ui-bg_glass_75_e6e6e6_1x400.png Binary file webapp/src/main/webapp/jquery/ui/images/ui-bg_glass_75_e6e6e6_1x400.png has changed diff -r 1246eb4e60e7 -r de9c762ef86b webapp/src/main/webapp/jquery/ui/images/ui-bg_glass_95_fef1ec_1x400.png Binary file webapp/src/main/webapp/jquery/ui/images/ui-bg_glass_95_fef1ec_1x400.png has changed diff -r 1246eb4e60e7 -r de9c762ef86b webapp/src/main/webapp/jquery/ui/images/ui-bg_highlight-soft_75_cccccc_1x100.png Binary file webapp/src/main/webapp/jquery/ui/images/ui-bg_highlight-soft_75_cccccc_1x100.png has changed diff -r 1246eb4e60e7 -r de9c762ef86b webapp/src/main/webapp/jquery/ui/images/ui-icons_222222_256x240.png Binary file webapp/src/main/webapp/jquery/ui/images/ui-icons_222222_256x240.png has changed diff -r 1246eb4e60e7 -r de9c762ef86b webapp/src/main/webapp/jquery/ui/images/ui-icons_2e83ff_256x240.png Binary file webapp/src/main/webapp/jquery/ui/images/ui-icons_2e83ff_256x240.png has changed diff -r 1246eb4e60e7 -r de9c762ef86b webapp/src/main/webapp/jquery/ui/images/ui-icons_454545_256x240.png Binary file webapp/src/main/webapp/jquery/ui/images/ui-icons_454545_256x240.png has changed diff -r 1246eb4e60e7 -r de9c762ef86b webapp/src/main/webapp/jquery/ui/images/ui-icons_888888_256x240.png Binary file webapp/src/main/webapp/jquery/ui/images/ui-icons_888888_256x240.png has changed diff -r 1246eb4e60e7 -r de9c762ef86b webapp/src/main/webapp/jquery/ui/images/ui-icons_cd0a0a_256x240.png Binary file webapp/src/main/webapp/jquery/ui/images/ui-icons_cd0a0a_256x240.png has changed diff -r 1246eb4e60e7 -r de9c762ef86b webapp/src/main/webapp/jquery/ui/jquery-test-embedded.SLIDER.html --- a/webapp/src/main/webapp/jquery/ui/jquery-test-embedded.SLIDER.html Mon Feb 25 15:21:48 2013 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,117 +0,0 @@ - - - - Digilib jQuery Test: embedded - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
DEBUG
-
- - -
- - - diff -r 1246eb4e60e7 -r de9c762ef86b webapp/src/main/webapp/jquery/ui/jquery-test-full.SLIDER.html --- a/webapp/src/main/webapp/jquery/ui/jquery-test-full.SLIDER.html Mon Feb 25 15:21:48 2013 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,51 +0,0 @@ - - - - - Digilib jQuery Test: fullscreen - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- - - diff -r 1246eb4e60e7 -r de9c762ef86b webapp/src/main/webapp/jquery/ui/jquery-ui-1.8.9.custom.css --- a/webapp/src/main/webapp/jquery/ui/jquery-ui-1.8.9.custom.css Mon Feb 25 15:21:48 2013 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,573 +0,0 @@ -/* - * jQuery UI CSS Framework 1.8.9 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Theming/API - */ - -/* Layout helpers -----------------------------------*/ -.ui-helper-hidden { display: none; } -.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); } -.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; } -.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } -.ui-helper-clearfix { display: inline-block; } -/* required comment for clearfix to work in Opera \*/ -* html .ui-helper-clearfix { height:1%; } -.ui-helper-clearfix { display:block; } -/* end clearfix */ -.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); } - - -/* Interaction Cues -----------------------------------*/ -.ui-state-disabled { cursor: default !important; } - - -/* Icons -----------------------------------*/ - -/* states and images */ -.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; } - - -/* Misc visuals -----------------------------------*/ - -/* Overlays */ -.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } - - -/* - * jQuery UI CSS Framework 1.8.9 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Theming/API - * - * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana,Arial,sans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=03_highlight_soft.png&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=01_flat.png&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=02_glass.png&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=02_glass.png&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=02_glass.png&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=02_glass.png&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=02_glass.png&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=01_flat.png&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=01_flat.png&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px - */ - - -/* Component containers -----------------------------------*/ -.ui-widget { font-family: Verdana,Arial,sans-serif; font-size: 1.1em; } -.ui-widget .ui-widget { font-size: 1em; } -.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Verdana,Arial,sans-serif; font-size: 1em; } -.ui-widget-content { border: 1px solid #aaaaaa; background: #ffffff url(images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x; color: #222222; } -.ui-widget-content a { color: #222222; } -.ui-widget-header { border: 1px solid #aaaaaa; background: #cccccc url(images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x; color: #222222; font-weight: bold; } -.ui-widget-header a { color: #222222; } - -/* Interaction states -----------------------------------*/ -.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #d3d3d3; background: #e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #555555; } -.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #555555; text-decoration: none; } -.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #999999; background: #dadada url(images/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; } -.ui-state-hover a, .ui-state-hover a:hover { color: #212121; text-decoration: none; } -.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #aaaaaa; background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; } -.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #212121; text-decoration: none; } -.ui-widget :active { outline: none; } - -/* Interaction Cues -----------------------------------*/ -.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fcefa1; background: #fbf9ee url(images/ui-bg_glass_55_fbf9ee_1x400.png) 50% 50% repeat-x; color: #363636; } -.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; } -.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #fef1ec url(images/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x; color: #cd0a0a; } -.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a; } -.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a; } -.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; } -.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; } -.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; } - -/* Icons -----------------------------------*/ - -/* states and images */ -.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png); } -.ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); } -.ui-widget-header .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); } -.ui-state-default .ui-icon { background-image: url(images/ui-icons_888888_256x240.png); } -.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); } -.ui-state-active .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); } -.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_2e83ff_256x240.png); } -.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_cd0a0a_256x240.png); } - -/* positioning */ -.ui-icon-carat-1-n { background-position: 0 0; } -.ui-icon-carat-1-ne { background-position: -16px 0; } -.ui-icon-carat-1-e { background-position: -32px 0; } -.ui-icon-carat-1-se { background-position: -48px 0; } -.ui-icon-carat-1-s { background-position: -64px 0; } -.ui-icon-carat-1-sw { background-position: -80px 0; } -.ui-icon-carat-1-w { background-position: -96px 0; } -.ui-icon-carat-1-nw { background-position: -112px 0; } -.ui-icon-carat-2-n-s { background-position: -128px 0; } -.ui-icon-carat-2-e-w { background-position: -144px 0; } -.ui-icon-triangle-1-n { background-position: 0 -16px; } -.ui-icon-triangle-1-ne { background-position: -16px -16px; } -.ui-icon-triangle-1-e { background-position: -32px -16px; } -.ui-icon-triangle-1-se { background-position: -48px -16px; } -.ui-icon-triangle-1-s { background-position: -64px -16px; } -.ui-icon-triangle-1-sw { background-position: -80px -16px; } -.ui-icon-triangle-1-w { background-position: -96px -16px; } -.ui-icon-triangle-1-nw { background-position: -112px -16px; } -.ui-icon-triangle-2-n-s { background-position: -128px -16px; } -.ui-icon-triangle-2-e-w { background-position: -144px -16px; } -.ui-icon-arrow-1-n { background-position: 0 -32px; } -.ui-icon-arrow-1-ne { background-position: -16px -32px; } -.ui-icon-arrow-1-e { background-position: -32px -32px; } -.ui-icon-arrow-1-se { background-position: -48px -32px; } -.ui-icon-arrow-1-s { background-position: -64px -32px; } -.ui-icon-arrow-1-sw { background-position: -80px -32px; } -.ui-icon-arrow-1-w { background-position: -96px -32px; } -.ui-icon-arrow-1-nw { background-position: -112px -32px; } -.ui-icon-arrow-2-n-s { background-position: -128px -32px; } -.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } -.ui-icon-arrow-2-e-w { background-position: -160px -32px; } -.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } -.ui-icon-arrowstop-1-n { background-position: -192px -32px; } -.ui-icon-arrowstop-1-e { background-position: -208px -32px; } -.ui-icon-arrowstop-1-s { background-position: -224px -32px; } -.ui-icon-arrowstop-1-w { background-position: -240px -32px; } -.ui-icon-arrowthick-1-n { background-position: 0 -48px; } -.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } -.ui-icon-arrowthick-1-e { background-position: -32px -48px; } -.ui-icon-arrowthick-1-se { background-position: -48px -48px; } -.ui-icon-arrowthick-1-s { background-position: -64px -48px; } -.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } -.ui-icon-arrowthick-1-w { background-position: -96px -48px; } -.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } -.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } -.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } -.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } -.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } -.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } -.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } -.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } -.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } -.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } -.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } -.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } -.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } -.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } -.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } -.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } -.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } -.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } -.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } -.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } -.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } -.ui-icon-arrow-4 { background-position: 0 -80px; } -.ui-icon-arrow-4-diag { background-position: -16px -80px; } -.ui-icon-extlink { background-position: -32px -80px; } -.ui-icon-newwin { background-position: -48px -80px; } -.ui-icon-refresh { background-position: -64px -80px; } -.ui-icon-shuffle { background-position: -80px -80px; } -.ui-icon-transfer-e-w { background-position: -96px -80px; } -.ui-icon-transferthick-e-w { background-position: -112px -80px; } -.ui-icon-folder-collapsed { background-position: 0 -96px; } -.ui-icon-folder-open { background-position: -16px -96px; } -.ui-icon-document { background-position: -32px -96px; } -.ui-icon-document-b { background-position: -48px -96px; } -.ui-icon-note { background-position: -64px -96px; } -.ui-icon-mail-closed { background-position: -80px -96px; } -.ui-icon-mail-open { background-position: -96px -96px; } -.ui-icon-suitcase { background-position: -112px -96px; } -.ui-icon-comment { background-position: -128px -96px; } -.ui-icon-person { background-position: -144px -96px; } -.ui-icon-print { background-position: -160px -96px; } -.ui-icon-trash { background-position: -176px -96px; } -.ui-icon-locked { background-position: -192px -96px; } -.ui-icon-unlocked { background-position: -208px -96px; } -.ui-icon-bookmark { background-position: -224px -96px; } -.ui-icon-tag { background-position: -240px -96px; } -.ui-icon-home { background-position: 0 -112px; } -.ui-icon-flag { background-position: -16px -112px; } -.ui-icon-calendar { background-position: -32px -112px; } -.ui-icon-cart { background-position: -48px -112px; } -.ui-icon-pencil { background-position: -64px -112px; } -.ui-icon-clock { background-position: -80px -112px; } -.ui-icon-disk { background-position: -96px -112px; } -.ui-icon-calculator { background-position: -112px -112px; } -.ui-icon-zoomin { background-position: -128px -112px; } -.ui-icon-zoomout { background-position: -144px -112px; } -.ui-icon-search { background-position: -160px -112px; } -.ui-icon-wrench { background-position: -176px -112px; } -.ui-icon-gear { background-position: -192px -112px; } -.ui-icon-heart { background-position: -208px -112px; } -.ui-icon-star { background-position: -224px -112px; } -.ui-icon-link { background-position: -240px -112px; } -.ui-icon-cancel { background-position: 0 -128px; } -.ui-icon-plus { background-position: -16px -128px; } -.ui-icon-plusthick { background-position: -32px -128px; } -.ui-icon-minus { background-position: -48px -128px; } -.ui-icon-minusthick { background-position: -64px -128px; } -.ui-icon-close { background-position: -80px -128px; } -.ui-icon-closethick { background-position: -96px -128px; } -.ui-icon-key { background-position: -112px -128px; } -.ui-icon-lightbulb { background-position: -128px -128px; } -.ui-icon-scissors { background-position: -144px -128px; } -.ui-icon-clipboard { background-position: -160px -128px; } -.ui-icon-copy { background-position: -176px -128px; } -.ui-icon-contact { background-position: -192px -128px; } -.ui-icon-image { background-position: -208px -128px; } -.ui-icon-video { background-position: -224px -128px; } -.ui-icon-script { background-position: -240px -128px; } -.ui-icon-alert { background-position: 0 -144px; } -.ui-icon-info { background-position: -16px -144px; } -.ui-icon-notice { background-position: -32px -144px; } -.ui-icon-help { background-position: -48px -144px; } -.ui-icon-check { background-position: -64px -144px; } -.ui-icon-bullet { background-position: -80px -144px; } -.ui-icon-radio-off { background-position: -96px -144px; } -.ui-icon-radio-on { background-position: -112px -144px; } -.ui-icon-pin-w { background-position: -128px -144px; } -.ui-icon-pin-s { background-position: -144px -144px; } -.ui-icon-play { background-position: 0 -160px; } -.ui-icon-pause { background-position: -16px -160px; } -.ui-icon-seek-next { background-position: -32px -160px; } -.ui-icon-seek-prev { background-position: -48px -160px; } -.ui-icon-seek-end { background-position: -64px -160px; } -.ui-icon-seek-start { background-position: -80px -160px; } -/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ -.ui-icon-seek-first { background-position: -80px -160px; } -.ui-icon-stop { background-position: -96px -160px; } -.ui-icon-eject { background-position: -112px -160px; } -.ui-icon-volume-off { background-position: -128px -160px; } -.ui-icon-volume-on { background-position: -144px -160px; } -.ui-icon-power { background-position: 0 -176px; } -.ui-icon-signal-diag { background-position: -16px -176px; } -.ui-icon-signal { background-position: -32px -176px; } -.ui-icon-battery-0 { background-position: -48px -176px; } -.ui-icon-battery-1 { background-position: -64px -176px; } -.ui-icon-battery-2 { background-position: -80px -176px; } -.ui-icon-battery-3 { background-position: -96px -176px; } -.ui-icon-circle-plus { background-position: 0 -192px; } -.ui-icon-circle-minus { background-position: -16px -192px; } -.ui-icon-circle-close { background-position: -32px -192px; } -.ui-icon-circle-triangle-e { background-position: -48px -192px; } -.ui-icon-circle-triangle-s { background-position: -64px -192px; } -.ui-icon-circle-triangle-w { background-position: -80px -192px; } -.ui-icon-circle-triangle-n { background-position: -96px -192px; } -.ui-icon-circle-arrow-e { background-position: -112px -192px; } -.ui-icon-circle-arrow-s { background-position: -128px -192px; } -.ui-icon-circle-arrow-w { background-position: -144px -192px; } -.ui-icon-circle-arrow-n { background-position: -160px -192px; } -.ui-icon-circle-zoomin { background-position: -176px -192px; } -.ui-icon-circle-zoomout { background-position: -192px -192px; } -.ui-icon-circle-check { background-position: -208px -192px; } -.ui-icon-circlesmall-plus { background-position: 0 -208px; } -.ui-icon-circlesmall-minus { background-position: -16px -208px; } -.ui-icon-circlesmall-close { background-position: -32px -208px; } -.ui-icon-squaresmall-plus { background-position: -48px -208px; } -.ui-icon-squaresmall-minus { background-position: -64px -208px; } -.ui-icon-squaresmall-close { background-position: -80px -208px; } -.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } -.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } -.ui-icon-grip-solid-vertical { background-position: -32px -224px; } -.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } -.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } -.ui-icon-grip-diagonal-se { background-position: -80px -224px; } - - -/* Misc visuals -----------------------------------*/ - -/* Corner radius */ -.ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; } -.ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; } -.ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; } -.ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; } -.ui-corner-top { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; } -.ui-corner-bottom { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; } -.ui-corner-right { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; } -.ui-corner-left { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; } -.ui-corner-all { -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; } - -/* Overlays */ -.ui-widget-overlay { background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); } -.ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }/* - * jQuery UI Resizable 1.8.9 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Resizable#theming - */ -.ui-resizable { position: relative;} -.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block;} -.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; } -.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; } -.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; } -.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; } -.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; } -.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; } -.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; } -.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; } -.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/* - * jQuery UI Selectable 1.8.9 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Selectable#theming - */ -.ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; } -/* - * jQuery UI Accordion 1.8.9 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Accordion#theming - */ -/* IE/Win - Fix animation bug - #4615 */ -.ui-accordion { width: 100%; } -.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; } -.ui-accordion .ui-accordion-li-fix { display: inline; } -.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; } -.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; } -.ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; } -.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; } -.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; } -.ui-accordion .ui-accordion-content-active { display: block; } -/* - * jQuery UI Autocomplete 1.8.9 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Autocomplete#theming - */ -.ui-autocomplete { position: absolute; cursor: default; } - -/* workarounds */ -* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */ - -/* - * jQuery UI Menu 1.8.9 - * - * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Menu#theming - */ -.ui-menu { - list-style:none; - padding: 2px; - margin: 0; - display:block; - float: left; -} -.ui-menu .ui-menu { - margin-top: -3px; -} -.ui-menu .ui-menu-item { - margin:0; - padding: 0; - zoom: 1; - float: left; - clear: left; - width: 100%; -} -.ui-menu .ui-menu-item a { - text-decoration:none; - display:block; - padding:.2em .4em; - line-height:1.5; - zoom:1; -} -.ui-menu .ui-menu-item a.ui-state-hover, -.ui-menu .ui-menu-item a.ui-state-active { - font-weight: normal; - margin: -1px; -} -/* - * jQuery UI Button 1.8.9 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Button#theming - */ -.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */ -.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */ -button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */ -.ui-button-icons-only { width: 3.4em; } -button.ui-button-icons-only { width: 3.7em; } - -/*button text element */ -.ui-button .ui-button-text { display: block; line-height: 1.4; } -.ui-button-text-only .ui-button-text { padding: .4em 1em; } -.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; } -.ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; } -.ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; } -.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; } -/* no icon support for input elements, provide padding by default */ -input.ui-button { padding: .4em 1em; } - -/*button icon element(s) */ -.ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; } -.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; } -.ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; } -.ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; } -.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; } - -/*button sets*/ -.ui-buttonset { margin-right: 7px; } -.ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; } - -/* workarounds */ -button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */ -/* - * jQuery UI Dialog 1.8.9 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Dialog#theming - */ -.ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; } -.ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; } -.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; } -.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; } -.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; } -.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; } -.ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; } -.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; } -.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; } -.ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; } -.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; } -.ui-draggable .ui-dialog-titlebar { cursor: move; } -/* - * jQuery UI Slider 1.8.9 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Slider#theming - */ -.ui-slider { position: relative; text-align: left; } -.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; } -.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; } - -.ui-slider-horizontal { height: .8em; } -.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; } -.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; } -.ui-slider-horizontal .ui-slider-range-min { left: 0; } -.ui-slider-horizontal .ui-slider-range-max { right: 0; } - -.ui-slider-vertical { width: .8em; height: 100px; } -.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; } -.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; } -.ui-slider-vertical .ui-slider-range-min { bottom: 0; } -.ui-slider-vertical .ui-slider-range-max { top: 0; }/* - * jQuery UI Tabs 1.8.9 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Tabs#theming - */ -.ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ -.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; } -.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; } -.ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; } -.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; } -.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; } -.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */ -.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; } -.ui-tabs .ui-tabs-hide { display: none !important; } -/* - * jQuery UI Datepicker 1.8.9 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Datepicker#theming - */ -.ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; } -.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; } -.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; } -.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; } -.ui-datepicker .ui-datepicker-prev { left:2px; } -.ui-datepicker .ui-datepicker-next { right:2px; } -.ui-datepicker .ui-datepicker-prev-hover { left:1px; } -.ui-datepicker .ui-datepicker-next-hover { right:1px; } -.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; } -.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; } -.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; } -.ui-datepicker select.ui-datepicker-month-year {width: 100%;} -.ui-datepicker select.ui-datepicker-month, -.ui-datepicker select.ui-datepicker-year { width: 49%;} -.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; } -.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; } -.ui-datepicker td { border: 0; padding: 1px; } -.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; } -.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; } -.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; } -.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; } - -/* with multiple calendars */ -.ui-datepicker.ui-datepicker-multi { width:auto; } -.ui-datepicker-multi .ui-datepicker-group { float:left; } -.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; } -.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; } -.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; } -.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; } -.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; } -.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; } -.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; } -.ui-datepicker-row-break { clear:both; width:100%; } - -/* RTL support */ -.ui-datepicker-rtl { direction: rtl; } -.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; } -.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; } -.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; } -.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; } -.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; } -.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; } -.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; } -.ui-datepicker-rtl .ui-datepicker-group { float:right; } -.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; } -.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; } - -/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */ -.ui-datepicker-cover { - display: none; /*sorry for IE5*/ - display/**/: block; /*sorry for IE5*/ - position: absolute; /*must have*/ - z-index: -1; /*must have*/ - filter: mask(); /*must have*/ - top: -4px; /*must have*/ - left: -4px; /*must have*/ - width: 200px; /*must have*/ - height: 200px; /*must have*/ -}/* - * jQuery UI Progressbar 1.8.9 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Progressbar#theming - */ -.ui-progressbar { height:2em; text-align: left; } -.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; } \ No newline at end of file diff -r 1246eb4e60e7 -r de9c762ef86b webapp/src/main/webapp/jquery/ui/jquery.digilib.SLIDER.js --- a/webapp/src/main/webapp/jquery/ui/jquery.digilib.SLIDER.js Mon Feb 25 15:21:48 2013 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1613 +0,0 @@ -/* Copyright (c) 2011 Martin Raspe, Robert Casties - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with this program. If not, see . - -Authors: - Martin Raspe, Robert Casties, 11.1.2011 -*/ - -/** - * digilib jQuery plugin -**/ - - -/* jslint browser: true, debug: true, forin: true -*/ - -// fallback for console.log calls -if (typeof(console) === 'undefined') { - var console = { - log : function(){}, - debug : function(){}, - error : function(){} - }; - var customConsole = true; -} - -(function($) { - var buttons = { - reference : { - onclick : "reference", - tooltip : "get a reference URL", - img : "reference.png" - }, - zoomin : { - onclick : ["zoomBy", 1.4], - tooltip : "zoom in", - img : "zoom-in.png" - }, - zoomout : { - onclick : ["zoomBy", 0.7], - tooltip : "zoom out", - img : "zoom-out.png" - }, - zoomarea : { - onclick : "zoomArea", - tooltip : "zoom area", - img : "zoom-area.png" - }, - zoomfull : { - onclick : "zoomFull", - tooltip : "view the whole image", - img : "zoom-full.png" - }, - pagewidth : { - onclick : ["zoomFull", "width"], - tooltip : "page width", - img : "pagewidth.png" - }, - back : { - onclick : ["gotoPage", "-1"], - tooltip : "goto previous image", - img : "back.png" - }, - fwd : { - onclick : ["gotoPage", "+1"], - tooltip : "goto next image", - img : "fwd.png" - }, - page : { - onclick : "gotoPage", - tooltip : "goto image number", - img : "page.png" - }, - bird : { - onclick : "showBirdDiv", - tooltip : "show bird's eye view", - img : "birds-eye.png" - }, - help : { - onclick : "showAboutDiv", - tooltip : "about Digilib", - img : "help.png" - }, - reset : { - onclick : "reset", - tooltip : "reset image", - img : "reset.png" - }, - mark : { - onclick : "setMark", - tooltip : "set a mark", - img : "mark.png" - }, - delmark : { - onclick : "removeMark", - tooltip : "delete the last mark", - img : "delmark.png" - }, - hmir : { - onclick : ["mirror", "h"], - tooltip : "mirror horizontally", - img : "mirror-horizontal.png" - }, - vmir : { - onclick : ["mirror", "v"], - tooltip : "mirror vertically", - img : "mirror-vertical.png" - }, - rot : { - onclick : "rotate", - tooltip : "rotate image", - img : "rotate.png" - }, - brgt : { - onclick : "brightness", - tooltip : "set brightness", - img : "brightness.png" - }, - cont : { - onclick : "contrast", - tooltip : "set contrast", - img : "contrast.png" - }, - rgb : { - onclick : "javascript:setParamWin('rgb', '...')", - tooltip : "set rgb values", - img : "rgb.png" - }, - quality : { - onclick : "setQuality", - tooltip : "set image quality", - img : "quality.png" - }, - size : { - onclick : "javascript:toggleSizeMenu()", - tooltip : "set page size", - img : "size.png" - }, - calibrationx : { - onclick : "javascript:calibrate('x')", - tooltip : "calibrate screen x-ratio", - img : "calibration-x.png" - }, - scale : { - onclick : "javascript:toggleScaleMenu()", - tooltip : "change image scale", - img : "original-size.png" - }, - toggleoptions : { - onclick : "moreButtons", - tooltip : "more options", - img : "options.png" - }, - moreoptions : { - onclick : ["moreButtons", "+1"], - tooltip : "more options", - img : "options.png" - }, - lessoptions : { - onclick : ["moreButtons", "-1"], - tooltip : "less options", - img : "options.png" - }, - SEP : { - img : "sep.png" - } - }; - - var defaults = { - // version of this script - 'version' : 'jquery.digilib.js 0.9', - // logo url - 'logoUrl' : '../img/digilib-logo-text1.png', - // homepage url (behind logo) - 'homeUrl' : 'http://digilib.berlios.de', - // base URL to digilib viewer (for reference URLs) - 'digilibBaseUrl' : null, - // base URL to Scaler servlet - 'scalerBaseUrl' : null, - // list of Scaler parameters - 'scalerParamNames' : ['fn','pn','dw','dh','ww','wh','wx','wy','ws','mo', - 'rot','cont','brgt','rgbm','rgba','ddpi','ddpix','ddpiy'], - // Scaler parameter defaults - 'pn' : 1, - 'ww' : 1.0, - 'wh' : 1.0, - 'wx' : 0.0, - 'wy' : 0.0, - 'ws' : 1.0, - 'mo' : '', - 'rot' : 0, - 'cont' : 0, - 'brgt' : 0, - 'rgbm' : '0/0/0', - 'rgba' : '0/0/0', - 'ddpi' : null, - 'ddpix' : null, - 'ddpiy' : null, - // list of digilib parameters - 'digilibParamNames' : ['fn','pn','ww','wh','wx','wy','ws','mo','rot','cont','brgt','rgbm','rgba','mk','clop'], - // digilib parameter defaults - 'mk' : '', - 'clop' : '', - // mode of operation: - // fullscreen = take parameters from page URL, keep state in page URL - // embedded = take parameters from Javascript options, keep state inside object - 'interactionMode' : 'fullscreen', - // buttons - 'buttons' : buttons, - // defaults for digilib buttons - 'buttonSettings' : { - 'fullscreen' : { - // path to button images (must end with a slash) - 'imagePath' : 'img/fullscreen/', - 'standardSet' : ["reference","zoomin","zoomout","zoomarea","zoomfull","pagewidth","back","fwd","page","bird","help","reset","toggleoptions"], - 'specialSet' : ["mark","delmark","hmir","vmir","rot","brgt","cont","rgb","quality","size","calibrationx","scale","toggleoptions"], - 'buttonSets' : ['standardSet', 'specialSet'] - }, - 'embedded' : { - 'imagePath' : 'img/embedded/16/', - 'standardSet' : ["reference","zoomin","zoomout","zoomarea","zoomfull","bird","help","reset","toggleoptions"], - 'specialSet' : ["mark","delmark","hmir","vmir","rot","brgt","cont","rgb","quality","toggleoptions"], - 'buttonSets' : ['standardSet', 'specialSet'] - } - }, - // number of visible button groups - 'visibleButtonSets' : 1, - // is birdView shown? - 'isBirdDivVisible' : false, - // dimensions of bird's eye div - 'birdDivWidth' : 200, - 'birdDivHeight' : 200, - // parameters used by bird's eye div - 'birdDivParams' : ['fn','pn','dw','dh'], - // style of the zoom area indicator in the bird's eye div - 'birdIndicatorStyle' : {'border' : '2px solid #ff0000' }, - // style of zoom area "rubber band" - 'zoomrectStyle' : {'border' : '2px solid #ff0000' }, - // is the "about" window shown? - 'isAboutDivVisible' : false, - // maximum width of background image for drag-scroll - 'maxBgSize' : 10000 - - }; - - // affine geometry classes - var geom = dlGeometry(); - - var FULL_AREA = geom.rectangle(0, 0, 1, 1); - - var actions = { - // init: digilib initialization - init : function(options) { - // settings for this digilib instance are merged from defaults and options - var settings = $.extend({}, defaults, options); - var isFullscreen = settings.interactionMode === 'fullscreen'; - var queryParams = {}; - if (isFullscreen) { - queryParams = parseQueryParams(); - // check scalerBaseUrl - if (settings.scalerBaseUrl == null) { - // try the host this came from - var h = window.location.host; - if (window.location.host) { - var url = window.location.href; - // assume the page lives in [webapp]/jquery/ - var pos = url.indexOf('jquery/'); - if (pos > 0) { - settings.scalerBaseUrl = url.substring(0, pos) + 'servlet/Scaler'; - } - } - } - } - return this.each(function() { - var $elem = $(this); - var data = $elem.data('digilib'); - var params, elemSettings; - // if the plugin hasn't been initialized yet - if (!data) { - // merge query parameters - if (isFullscreen) { - params = queryParams; - } else { - params = parseImgParams($elem); - if (jQuery.cookie) { - // retrieve params from cookie - var ck = "digilib-embed:fn:" + escape(params.fn) + ":pn:" + (params.pn || '1'); - var cs = jQuery.cookie(ck); - console.debug("get cookie=", ck, " value=", cs); - if (cs) { - var cp = parseQueryString(cs); - // ignore fn and pn from cookie TODO: should we keep pn? - delete cp.fn; - delete cp.pn; - jQuery.extend(params, cp); - } - } - } - // store $(this) element in the settings - elemSettings = jQuery.extend({}, settings, params); - data = { - $elem : $elem, - settings : elemSettings, - queryParams : params - }; - // store in data element - $elem.data('digilib', data); - } - unpackParams(data); - // check if browser knows *background-size - for (var bs in {'':1, '-moz-':1, '-webkit-':1, '-o-':1}) { - if ($elem.css(bs+'background-size')) { - data.hasBgSize = true; - data.bgSizeName = bs+'background-size'; - break; - } - } - // check digilib base URL - if (elemSettings.digilibBaseUrl == null) { - if (isFullscreen) { - // take current host - var url = window.location.toString(); - var pos = url.indexOf('?'); - elemSettings.digilibBaseUrl = url.substring(0, pos); - } else { - var url = elemSettings.scalerBaseUrl; - if (url) { - // build it from scaler URL - var bp = url.indexOf('/servlet/Scaler'); - elemSettings.digilibBaseUrl = url.substring(0, bp) + '/digilib.jsp'; - } - } - } - // create HTML structure for scaler - setupScalerDiv(data); - // add buttons - for (var i = 0; i < elemSettings.visibleButtonSets; ++i) { - showButtons(data, true, i); - } - // bird's eye view creation - if (elemSettings.isBirdDivVisible) { - setupBirdDiv(data); - data.$birdDiv.show(); - } - // about window creation - TODO: could be deferred? restrict to only one item? - setupAboutDiv(data); - // drag zoom area around in scaler div - setupZoomDrag(data); - // dialog for brightness, rotate etc. - setupDialogDiv(data); - }); - }, - - // destroy: clean up digilib - destroy : function(data) { - return this.each(function(){ - var $elem = $(this); - $(window).unbind('.digilib'); // unbind all digilibs(?) - data.digilib.remove(); - $elem.removeData('digilib'); - }); - }, - - // show or hide the 'about' window - showAboutDiv : function(data, show) { - data.settings.isAboutDivVisible = showDiv(data.settings.isAboutDivVisible, data.$aboutDiv, show); - }, - - // event handler: toggles the visibility of the bird's eye window - showBirdDiv : function (data, show) { - var settings = data.settings; - if (data.$birdDiv == null) { - // no bird div -> create - setupBirdDiv(data); - } - settings.isBirdDivVisible = showDiv(settings.isBirdDivVisible, data.$birdDiv, show); - updateBirdDiv(data); - storeOptions(data); - // data.$birdImg.triggerHandler('load'); // TODO: we shouldn't do that - }, - - // goto given page nr (+/-: relative) - gotoPage : function (data, pageNr) { - var settings = data.settings; - var oldpn = settings.pn; - if (pageNr == null) { - pageNr = window.prompt("Goto page number", oldpn); - } - var pn = setNumValue(settings, "pn", pageNr); - if (pn == null) return false; // nothing happened - if (pn < 1) { - alert("no such page (page number too low)"); - settings.pn = oldpn; - return false; - } - if (settings.pt) { - if (pn > settings.pt) { - alert("no such page (page number too high)"); - settings.pn = oldpn; - return false; - } - } - // reset mk and others(?) - data.marks = []; - data.zoomArea = FULL_AREA; - // then reload - redisplay(data); - }, - - // zoom by a given factor - zoomBy : function (data, factor) { - zoomBy(data, factor); - }, - - // zoom interactively - zoomArea : function (data) { - zoomArea(data); - }, - - // zoom out to full page - zoomFull : function (data, mode) { - data.zoomArea = FULL_AREA; - if (mode === 'width') { - data.dlOpts.fitwidth = 1; - delete data.dlOpts.fitheight; - } else if (mode === 'height') { - data.dlOpts.fitheight = 1; - delete data.dlOpts.fitwidth; - } else { - delete data.dlOpts.fitwidth; - delete data.dlOpts.fitheight; - } - redisplay(data); - }, - - // set a mark by clicking (or giving a position) - setMark : function (data, mpos) { - if (mpos == null) { - // interactive - setMark(data); - } else { - // use position - data.marks.push(pos); - redisplay(data); - } - }, - - // remove the last mark - removeMark : function (data) { - data.marks.pop(); - redisplay(data); - }, - - // mirror the image - mirror : function (data, mode) { - var flags = data.scalerFlags; - if (mode === 'h') { - if (flags.hmir) { - delete flags.hmir; - } else { - flags.hmir = 1; - } - } else { - if (flags.vmir) { - delete flags.vmir; - } else { - flags.vmir = 1; - } - } - redisplay(data); - }, - - // rotate the image - rotate : function (data, angle) { - var rot = data.settings.rot; - if (angle == null) { - // angle = window.prompt("Rotation angle:", rot); - var $slider = data.$slider; - $slider.slider('enable'); - var $dialog = data.$dialog; - $dialog.text('Set the slider'); - $dialog.dialog('option', { - 'title' : 'set rotation angle', - }); - $dialog.dialog('open'); - } - //data.settings.rot = angle; - //redisplay(data); - }, - - // change brightness - brightness : function (data, factor) { - var brgt = data.settings.brgt; - if (factor == null) { - factor = window.prompt("Brightness (-255..255)", brgt); - } - data.settings.brgt = factor; - redisplay(data); - }, - - // change contrast - contrast : function (data, factor) { - var cont = data.settings.cont; - if (factor == null) { - factor = window.prompt("Contrast (-8, 8)", cont); - } - data.settings.cont = factor; - redisplay(data); - }, - - // display more (or less) button sets - moreButtons : function (data, more) { - var settings = data.settings; - if (more == null) { - // toggle more or less (only works for 2 sets) - var maxbtns = settings.buttonSettings[settings.interactionMode].buttonSets.length; - if (settings.visibleButtonSets >= maxbtns) { - more = '-1'; - } else { - more = '+1'; - } - } - if (more === '-1') { - // remove set - var setIdx = settings.visibleButtonSets - 1; - if (showButtons(data, false, setIdx, true)) { - settings.visibleButtonSets--; - } - } else { - // add set - var setIdx = settings.visibleButtonSets; - if (showButtons(data, true, setIdx, true)) { - settings.visibleButtonSets++; - } - } - // persist setting - storeOptions(data); - }, - - // reset image parameters to defaults - reset : function (data) { - var settings = data.settings; - var paramNames = settings.digilibParamNames; - var params = data.queryParams; - // delete all digilib parameters - for (var i = 0; i < paramNames.length; i++) { - var paramName = paramNames[i]; - delete settings[paramName]; - } - settings.fn = params.fn || ''; // no default defined - settings.pn = params.pn || defaults.pn; - settings.dw = params.dw; - settings.dh = params.dh; - settings.isBirdDivVisible = false; - settings.visibleButtonSets = 1; - // resets zoomArea, marks, scalerflags - data.zoomArea = FULL_AREA; - data.marks = []; - data.scalerFlags = {}; - delete data.dlOpts.fitwidth; - delete data.dlOpts.fitheight; - redisplay(data); - }, - - // presents a reference url (returns value if noprompt) - reference : function (data, noprompt) { - var settings = data.settings; - var url = getDigilibUrl(data); - if (noprompt == null) { - window.prompt("URL reference to the current view", url); - } - return url; - }, - - // set image quality - setQuality : function (data, qual) { - var oldq = getQuality(data); - if (qual == null) { - qual = window.prompt("Image quality (0..2)", oldq); - } - qual = parseInt(qual, 10); - if (qual >= 0 && qual <= 2) { - setQuality(data, qual); - redisplay(data); - } - } - }; - - // returns parameters from page url - var parseQueryParams = function() { - return parseQueryString(window.location.search.slice(1)); - }; - - // returns parameters from embedded img-element - var parseImgParams = function($elem) { - var src = $elem.find('img').first().attr('src'); - if (!src) return null; - var pos = src.indexOf('?'); - var query = (pos < 0) ? '' : src.substring(pos + 1); - var scalerUrl = src.substring(0, pos); - var params = parseQueryString(query); - params.scalerBaseUrl = scalerUrl; - return params; - }; - - // parses query parameter string into parameter object - var parseQueryString = function(query) { - var params = {}; - if (query == null) return params; - var pairs = query.split("&"); - //var keys = []; - for (var i = 0; i < pairs.length; i++) { - var pair = pairs[i].split("="); - if (pair.length === 2) { - params[pair[0]] = pair[1]; - //keys.push(pair[0]); - } - } - return params; - }; - - // returns a query string from key names from a parameter hash (ignoring if the same value is in defaults) - var getParamString = function (settings, keys, defaults) { - var paramString = ''; - var nx = false; - for (i = 0; i < keys.length; ++i) { - var key = keys[i]; - if ((settings[key] != null) && ((defaults == null) || (settings[key] != defaults[key]))) { - // first param gets no '&' - if (nx) { - paramString += '&'; - } else { - nx = true; - } - // add parm=val - paramString += key + '=' + settings[key]; - } - } - return paramString; - }; - - // returns URL and query string for Scaler - var getScalerUrl = function (data) { - packParams(data); - var settings = data.settings; - if (settings.scalerBaseUrl == null) { - alert("ERROR: URL of digilib Scaler servlet missing!"); - } - var keys = settings.scalerParamNames; - var queryString = getParamString(settings, keys, defaults); - var url = settings.scalerBaseUrl + '?' + queryString; - return url; - }; - - // returns URL for bird's eye view image - var getBirdImgUrl = function (data, moreParams) { - var settings = data.settings; - var birdDivOptions = { - dw : settings.birdDivWidth, - dh : settings.birdDivHeight - }; - var birdSettings = jQuery.extend({}, settings, birdDivOptions); - // use only the relevant parameters - if (moreParams == null) { - var params = getParamString(birdSettings, settings.birdDivParams, defaults); - } else { - var params = getParamString(birdSettings, - settings.birdDivParams.concat(moreParams), defaults); - } - var url = settings.scalerBaseUrl + '?' + params; - return url; - }; - - // returns URL and query string for current digilib - var getDigilibUrl = function (data) { - packParams(data); - var settings = data.settings; - var queryString = getParamString(settings, settings.digilibParamNames, defaults); - return settings.digilibBaseUrl + '?' + queryString; - }; - - // processes some parameters into objects and stuff - var unpackParams = function (data) { - var settings = data.settings; - // zoom area - var zoomArea = geom.rectangle(settings.wx, settings.wy, settings.ww, settings.wh); - data.zoomArea = zoomArea; - // marks - var marks = []; - if (settings.mk) { - var mk = settings.mk; - if (mk.indexOf(";") >= 0) { - var pa = mk.split(";"); // old format with ";" - } else { - var pa = mk.split(","); // new format - } - for (var i = 0; i < pa.length ; i++) { - var pos = pa[i].split("/"); - if (pos.length > 1) { - marks.push(geom.position(pos[0], pos[1])); - } - } - } - data.marks = marks; - // mo (Scaler flags) - var flags = {}; - if (settings.mo) { - var pa = settings.mo.split(","); - for (var i = 0; i < pa.length ; i++) { - flags[pa[i]] = pa[i]; - } - } - data.scalerFlags = flags; - retrieveOptions(data); - }; - - // put objects back into parameters - var packParams = function (data) { - var settings = data.settings; - // zoom area - if (data.zoomArea) { - settings.wx = cropFloat(data.zoomArea.x); - settings.wy = cropFloat(data.zoomArea.y); - settings.ww = cropFloat(data.zoomArea.width); - settings.wh = cropFloat(data.zoomArea.height); - } - // marks - if (data.marks) { - settings.mk = ''; - for (var i = 0; i < data.marks.length; i++) { - if (i) { - settings.mk += ','; - } - settings.mk += cropFloat(data.marks[i].x).toString() + - '/' + cropFloat(data.marks[i].y).toString(); - } - } - // Scaler flags - if (data.scalerFlags) { - var mo = ''; - for (var f in data.scalerFlags) { - if (mo) { - mo += ','; - } - mo += f; - } - settings.mo = mo; - } - // user interface options - storeOptions(data); - }; - - var storeOptions = function (data) { - // save digilib options in cookie - var settings = data.settings; - if (data.dlOpts) { - // save digilib settings in options - data.dlOpts.birdview = settings.isBirdDivVisible ? 1 : 0; - data.dlOpts.buttons = settings.visibleButtonSets; - var clop = ''; - for (var o in data.dlOpts) { - if (clop) { - clop += '&'; - } - clop += o + '=' + data.dlOpts[o]; - } - if (jQuery.cookie) { - var ck = "digilib:fn:" + escape(settings.fn) + ":pn:" + settings.pn; - console.debug("set cookie=", ck, " value=", clop); - jQuery.cookie(ck, clop); - } - } - if (settings.interactionMode !== 'fullscreen' && jQuery.cookie) { - // store normal parameters in cookie for embedded mode - var qs = getParamString(settings, settings.digilibParamNames, defaults); - var ck = "digilib-embed:fn:" + escape(settings.fn) + ":pn:" + settings.pn; - console.debug("set cookie=", ck, " value=", qs); - jQuery.cookie(ck, qs); - } - }; - - var retrieveOptions = function (data) { - // clop (digilib options) - var opts = {}; - var settings = data.settings; - if (jQuery.cookie) { - // read from cookie - var ck = "digilib:fn:" + escape(settings.fn) + ":pn:" + settings.pn; - var cp = jQuery.cookie(ck); - console.debug("get cookie=", ck, " value=", cp); - // in query string format - opts = parseQueryString(cp); - } - data.dlOpts = opts; - // birdview option - if (opts.birdview != null) { - settings.isBirdDivVisible = opts.birdview === '1'; - } - // visible button sets - if (opts.buttons != null) { - settings.visibleButtonSets = opts.buttons; - } - }; - - // (re)load the img from a new scaler URL - var redisplay = function (data) { - var settings = data.settings; - if (settings.interactionMode === 'fullscreen') { - // update location.href (browser URL) in fullscreen mode - var url = getDigilibUrl(data); - var history = window.history; - if (typeof(history.pushState) === 'function') { - console.debug("we could modify history, but we don't..."); - } - window.location = url; - } else { - // embedded mode -- just change img src - var url = getScalerUrl(data); - data.$img.attr('src', url); - // redisplay bird img - updateBirdDiv(data); - } - }; - - // returns maximum size for scaler img in fullscreen mode - var getFullscreenImgSize = function($elem) { - var $win = $(window); - var winH = $win.height(); - var winW = $win.width(); - // TODO: account for borders? - return geom.size(winW, winH); - }; - - // creates HTML structure for digilib in elem - var setupScalerDiv = function (data) { - var settings = data.settings; - var $elem = data.$elem; - $elem.addClass('digilib'); - var $img; - var scalerUrl; - if (settings.interactionMode === 'fullscreen') { - // fullscreen - $elem.addClass('dl_fullscreen'); - var imgSize = getFullscreenImgSize($elem); - // fitwidth/height omits destination height/width - if (data.dlOpts.fitheight == null) { - settings.dw = imgSize.width; - } - if (data.dlOpts.fitwidth == null) { - settings.dh = imgSize.height; - } - scalerUrl = getScalerUrl(data); - $img = $(''); - } else { - // embedded mode -- try to keep img tag - $elem.addClass('dl_embedded'); - scalerUrl = getScalerUrl(data); - $img = $elem.find('img'); - if ($img.length > 0) { - oldUrl = $img.attr('src'); - if (oldUrl === scalerUrl) { - console.debug("img detach:", $img); - $img.detach(); - } else { - $img = $(''); - } - } else { - $img = $(''); - } - } - // create new html - $elem.empty(); // TODO: should we keep stuff for customization? - var $scaler = $('
'); - $elem.append($scaler); - $scaler.append($img); - $img.addClass('pic'); - data.$scaler = $scaler; - data.$img = $img; - // setup image load handler before setting the src attribute (IE bug) - $img.load(scalerImgLoadedHandler(data)); - $img.attr('src', scalerUrl); - }; - - // creates HTML structure for buttons in elem - var createButtons = function (data, buttonSetIdx) { - var $elem = data.$elem; - var settings = data.settings; - var mode = settings.interactionMode; - var buttonSettings = settings.buttonSettings[mode]; - var buttonGroup = buttonSettings.buttonSets[buttonSetIdx]; - if (buttonGroup == null) { - // no buttons here - return; - } - var $buttonsDiv = $('
'); - var buttonNames = buttonSettings[buttonGroup]; - for (var i = 0; i < buttonNames.length; i++) { - var buttonName = buttonNames[i]; - var buttonConfig = settings.buttons[buttonName]; - // construct the button html - var $button = $('
'); - var $a = $(''); - var $img = $(''); - $buttonsDiv.append($button); - $button.append($a); - $a.append($img); - // add attributes and bindings - $button.attr('title', buttonConfig.tooltip); - $button.addClass('button-' + buttonName); - // create handler for the buttons - $a.bind('click.digilib', (function () { - // we create a new closure to capture the value of action - var action = buttonConfig.onclick; - if ($.isArray(action)) { - // the handler function calls digilib with action and parameters - return function (evt) { - console.debug('click action=', action, ' evt=', evt); - $elem.digilib.apply($elem, action); - return false; - }; - } else { - // the handler function calls digilib with action - return function (evt) { - console.debug('click action=', action, ' evt=', evt); - $elem.digilib(action); - return false; - }; - } - })()); - $img.attr('src', buttonSettings.imagePath + buttonConfig.img); - } - // make buttons div scroll if too large for window - if ($buttonsDiv.height() > $(window).height() - 10) { - $buttonsDiv.css('position', 'absolute'); - } - // buttons hidden at first - $buttonsDiv.hide(); - $elem.append($buttonsDiv); - if (data.$buttonSets == null) { - // first button set - data.$buttonSets = [$buttonsDiv]; - } else { - $elem.append($buttonsDiv); - data.$buttonSets[buttonSetIdx] = $buttonsDiv; - } - return $buttonsDiv; - }; - - // creates HTML structure for the bird's eye view in elem - var setupBirdDiv = function (data) { - var $elem = data.$elem; - // the bird's eye div - var $birdDiv = $('