Initial commit

This commit is contained in:
2025-04-13 20:31:08 +02:00
commit a104e33376
264 changed files with 11050 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="hibernate.bytecode.use_reflection_optimizer">false</property>
<property name="hibernate.connection.driver_class">com.mysql.cj.jdbc.Driver</property>
<property name="hibernate.connection.url">jdbc:mysql://37.97.221.166:3306/psalmenweb?characterEncoding=utf8&useUnicode=true</property>
<property name="hibernate.connection.username">psalmenweb</property>
<property name="hibernate.connection.password">OhWSsRxCOM4pXiiQ</property>
<property name="hibernate.dialect">org.hibernate.dialect.MySQL8Dialect</property>
<property name="show_sql">true</property>
</session-factory>
</hibernate-configuration>

View File

@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE log4j:configuration PUBLIC "-//APACHE//DTD LOG4J 1.2//EN" "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
<!-- Appenders -->
<appender name="console" class="org.apache.log4j.ConsoleAppender">
<param name="Target" value="System.out" />
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%-5p: %c - %m%n" />
</layout>
</appender>
<!-- Application Loggers -->
<logger name="org.tenvoorde.psalmenweb">
<level value="info" />
</logger>
<!-- 3rdparty Loggers -->
<logger name="org.springframework.core">
<level value="info" />
</logger>
<logger name="org.springframework.beans">
<level value="info" />
</logger>
<logger name="org.springframework.context">
<level value="info" />
</logger>
<logger name="org.springframework.web">
<level value="info" />
</logger>
<!-- Root Logger -->
<root>
<priority value="warn" />
<appender-ref ref="console" />
</root>
</log4j:configuration>

View File

@@ -0,0 +1,11 @@
################### JDBC Configuration ##########################
jdbc.driverClassName=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://tenvoorde.org:3306/psalmenweb
jdbc.username=psalmenonline
jdbc.password=zMhMipovKFgc1m8n
################### Hibernate Configuration ##########################
hibernate.dialect=org.hibernate.dialect.MySQLDialect
hibernate.show_sql=true
hibernate.hbm2ddl.auto=update
hibernate.generate_statistics=true

View File

@@ -0,0 +1,76 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans:beans xmlns="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.2.xsd">
<!-- DispatcherServlet Context: defines this servlet's request-processing
infrastructure -->
<!-- Enables the Spring MVC @Controller programming model -->
<annotation-driven />
<!-- Handles HTTP GET requests for /resources/** by efficiently serving
up static resources in the ${webappRoot}/resources directory -->
<resources mapping="/resources/**" location="/resources/" />
<!-- Resolves views selected for rendering by @Controllers to .jsp resources
in the /WEB-INF/views directory -->
<beans:bean
class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<beans:property name="prefix" value="/WEB-INF/views/" />
<beans:property name="suffix" value=".jsp" />
</beans:bean>
<context:component-scan base-package="org.tenvoorde.psalmenweb" />
<!-- JDBC Data Source. It is assumed you have MySQL running on localhost
port 3306 with username root and blank password. Change below if it's not
the case -->
<beans:bean id="psalmenDataSource" class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close">
<beans:property name="driverClassName" value="com.mysql.jdbc.Driver" />
<beans:property name="url"
value="jdbc:mysql://tenvoorde.org:3306/psalmenweb" />
<beans:property name="username" value="psalmenonline" />
<beans:property name="password" value="zMhMipovKFgc1m8n" />
<beans:property name="validationQuery" value="SELECT 1" />
</beans:bean>
<!-- Hibernate Session Factory -->
<beans:bean id="psalmenSessionFactory"
class="org.springframework.orm.hibernate4.LocalSessionFactoryBean">
<beans:property name="dataSource" ref="psalmenDataSource" />
<beans:property name="annotatedClasses">
<beans:list>
<beans:value>org.tenvoorde.psalmenweb.domain.Psalmregel</beans:value>
<beans:value>org.tenvoorde.psalmenweb.domain.CatechismusVraag</beans:value>
</beans:list>
</beans:property>
<beans:property name="packagesToScan">
<beans:array>
<beans:value>org.tenvoorde.psalmenweb.dao</beans:value>
</beans:array>
</beans:property>
<beans:property name="hibernateProperties">
<beans:value>
hibernate.dialect=org.hibernate.dialect.MySQLDialect
</beans:value>
</beans:property>
</beans:bean>
<!-- Hibernate Transaction Manager -->
<beans:bean id="transactionManager"
class="org.springframework.orm.hibernate4.HibernateTransactionManager">
<beans:property name="sessionFactory" ref="psalmenSessionFactory" />
</beans:bean>
<!-- Activates annotation based transaction management -->
<tx:annotation-driven transaction-manager="transactionManager" />
</beans:beans>

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<!-- Root Context: defines shared resources visible to all other web components -->
</beans>

View File

@@ -0,0 +1,125 @@
<%@ page session="false"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html>
<head>
<title>${boek.boek} <c:if test="${boek.hoofdstukken > 1}">${hoofdstuk} </c:if>(${vertaling.afkorting})</title>
<meta name="viewport"
content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=0" />
<link rel="stylesheet"
href="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.css" />
<link rel="stylesheet"
href="resources/css/themes/Psalmenweb.css" />
<link rel="stylesheet"
href="resources/css/psalmenweb.css" />
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script
src="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.js"></script>
<script src="resources/js/prefs.js"></script>
</head>
<body>
<div data-role="page" data-theme="a">
<div data-role="header" data-position="fixed" id="psalmhoofd">
<div class="psalmheader">${boek.boek} <c:if test="${boek.hoofdstukken > 1}">${hoofdstuk} </c:if>(${vertaling.afkorting})</div>
<a data-inline="true" data-icon="custom" data-iconpos="notext" id="bw" data-ajax="false" class="ui-btn-right" style="margin-right:350px;"></a>
<a href="hcindex" data-inline="true" data-icon="custom" data-iconpos="notext" id="hc" data-ajax="false" class="ui-btn-right" style="margin-right:250px;"></a>
<c:choose>
<c:when test="${vertaling.id == 1}">
<a href="${linkvertaling}" data-inline="true" data-icon="custom" data-iconpos="notext" id="sv" data-ajax="false" class="ui-btn-right" style="margin-right:150px;"></a>
</c:when>
<c:otherwise>
<a href="${linkvertaling}" data-inline="true" data-icon="custom" data-iconpos="notext" id="hsv" data-ajax="false" class="ui-btn-right" style="margin-right:150px;"></a>
</c:otherwise>
</c:choose>
<a href="psalmindex" data-inline="true" data-icon="custom" data-iconpos="notext" id="note" data-ajax="false" class="ui-btn-right" style="margin-right:50px;"></a>
</div>
<div data-role="content">
<br /> <br />
<c:forEach items="${verzen}" var="vers"
varStatus="varstatus">
<p class="psalmline"><span class="bijbelvers">${vers.vers}</span> ${vers.tekst}</p>
</c:forEach>
<br />
</div>
<div data-role="footer" class="bigbuttons">
<div data-role="navbar" data-position="fixed" class="bigbuttons" data-grid="d">
<ul>
<li><a href="${linkvorige}" id="left" data-icon="custom" data-ajax="false">&nbsp;</a></li>
<li><a href="#" id="minus" data-icon="custom">&nbsp;</a></li>
<li><a href="bijbelindex?t=${vertaling.id}" id="index" data-icon="custom" data-ajax="false" data-transition="pop">&nbsp;</a></li>
<li><a href="#" id="plus" data-icon="custom">&nbsp;</a></li>
<li><a href="${linkvolgende}" id="right" data-icon="custom" data-ajax="false">&nbsp;</a></li>
</ul>
</div>
</div>
</div>
<script type="text/javascript">
var PREF_TEXTSIZE;
var PREF_COLOR;
$(function() {
loadPreferences();
setPreferences();
bindListeners();
});
function changeTextSize(delta) {
var size = parseInt($(".psalmverseheader").css("font-size"));
cssSize = (size + delta) + "px";
$(".psalmverseheader").css("font-size", cssSize);
size = parseInt($(".psalmline").css("font-size"));
cssSize = (size + delta) + "px";
$(".psalmline").css("font-size", cssSize);
PREF_TEXTSIZE = size + delta;
savePreferences();
}
$(document).on('pageinit', function() {
$(document).on("click", "#minus", function(e) {
changeTextSize(-2);
});
$(document).on("click", "#plus", function(e) {
changeTextSize(2);
});
if ($("#left").attr("href") == "#") {
$("#left span.ui-icon").css("background-image", "none");
}
if ($("#right").attr("href") == "#") {
$("#right span.ui-icon").css("background-image", "none");
}
});
// function goToVerse(immediately) {
// if ("${vers}" != "") {
// var target = $("#v${vers}").get(0).offsetTop;
//
// if (target !== undefined) {
// if (immediately) {
// $.mobile.silentScroll(target);
// } else {
// setTimeout(function(){$.mobile.silentScroll(target);}, 100); // scroll after 1 sec
// }
// }
// }
// }
// $(document).on('pageshow', function(){
//goToVerse(false);
// });
</script>
</body>
</html>

View File

@@ -0,0 +1,46 @@
<%@ page session="false"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
<title>Index (${vertaling.afkorting})</title>
<meta name="viewport"
content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=0" />
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.1.0-rc.1/jquery.mobile-1.1.0-rc.1.min.css" />
<link rel="stylesheet" href="resources/css/themes/Psalmenweb.min.css" />
<link rel="stylesheet" href="resources/css/psalmenweb.css" />
<style type="text/css">
a {
width: 20%;
}
.ui-btn {
height: 100px;
font-size: 60px;
line-height: 40px;
}
</style>
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script
src="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.js"></script></head>
<body>
<div data-role="page" id="myPage" data-theme="a">
<div data-role="content" data-theme="a">
<c:forEach items="${letters}" var="letter" varStatus="index">
<c:if test="${(index.index % 4 == 0) && (index.index > 0)}">
</div>
</c:if>
<c:if test="${index.index % 4 == 0}">
<div data-role="controlgroup" data-type="horizontal" class="localnav indexknoppengroep">
</c:if>
<a href="bijbelindexboeken?start=${letter}&t=${vertaling.id}" data-role="button" data-theme="a" data-ajax="false">${letter}</a>
&nbsp;
</c:forEach>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,46 @@
<%@ page session="false"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
<title>Index (${vertaling.afkorting})</title>
<meta name="viewport"
content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=0" />
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.1.0-rc.1/jquery.mobile-1.1.0-rc.1.min.css" />
<link rel="stylesheet" href="resources/css/themes/Psalmenweb.min.css" />
<link rel="stylesheet" href="resources/css/psalmenweb.css" />
<style type="text/css">
a {
width: 20%;
}
.ui-btn {
height: 100px;
font-size: 60px;
line-height: 40px;
}
</style>
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script
src="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.js"></script></head>
<body>
<div data-role="page" id="myPage" data-theme="a">
<div data-role="content" data-theme="a">
<c:forEach items="${boeken}" var="boek" varStatus="index">
<c:if test="${(index.index % 4 == 0) && (index.index > 0)}">
</div>
</c:if>
<c:if test="${index.index % 4 == 0}">
<div data-role="controlgroup" data-type="horizontal" class="localnav indexknoppengroep">
</c:if>
<a href="bijbelindexchapter?boek=${boek.id}&t=${vertaling.id}" data-role="button" data-theme="a" data-ajax="false">${boek.afkorting}</a>
&nbsp;
</c:forEach>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,176 @@
<%@ page session="false"%>
<!DOCTYPE html>
<html>
<head>
<title>Index (${vertaling.afkorting})</title>
<meta name="viewport"
content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=0" />
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.1.0-rc.1/jquery.mobile-1.1.0-rc.1.min.css" />
<link rel="stylesheet" href="resources/css/themes/Psalmenweb.min.css" />
<link rel="stylesheet" href="resources/css/psalmenweb.css" />
<style type="text/css">
a {
width: 20%;
}
.ui-btn {
height: 100px;
font-size: 60px;
line-height: 40px;
}
</style>
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script
src="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.js"></script></head>
<body>
<div data-role="page" id="myPage" data-theme="a">
<div data-role="content" data-theme="a">
<a id="boekhoofdstuk" style="width: 100%;" href="#" data-role="button" data-transition="fade" class="indexlabel" data-theme="a">${boek.boek} <span id="choice"></span></a>
<div data-role="controlgroup" data-type="horizontal" class="localnav indexknoppengroep">
<a id="k7" href="#" data-role="button" data-theme="a">7</a>
&nbsp;
<a id="k8" href="#" data-role="button" data-theme="a">8</a>
&nbsp;
<a id="k9" href="#" data-role="button" data-theme="a">9</a>
</div>
<div data-role="controlgroup" data-type="horizontal" class="localnav indexknoppengroep">
<a id="k4" href="#" data-role="button" data-theme="a">4</a>
&nbsp;
<a id="k5" href="#" data-role="button" data-theme="a">5</a>
&nbsp;
<a id="k6" href="#" data-role="button" data-theme="a">6</a>
</div>
<div data-role="controlgroup" data-type="horizontal" class="localnav indexknoppengroep">
<a id="k1" href="#" data-role="button" data-theme="a">1</a>
&nbsp;
<a id="k2" href="#" data-role="button" data-theme="a">2</a>
&nbsp;
<a id="k3" href="#" data-role="button" data-theme="a">3</a>
</div>
<div data-role="controlgroup" data-type="horizontal" class="localnav indexknoppengroep">
<a id="kd" href="#" data-role="button" data-theme="a">&#x25C0;</a>
&nbsp;
<a id="k0" href="#" data-role="button" data-theme="a">0</a>
&nbsp;
<a id="ke" href="#" data-role="button" data-theme="a">&#x2714;</a>
</div>
</div>
</div>
<script type="text/javascript">
$(function () {
$(".indexknoppengroep a").click(function() {
if ($("div.ui-loader.ui-overlay-shadow").length == 1) {
return;
}
var knop = this.id.substring(1);
switch(knop) {
case "0":
case "1":
case "2":
case "3":
case "4":
case "5":
case "6":
case "7":
case "8":
case "9":
addNumber(knop);
break;
case "d":
removeChar();
break;
case "e":
if (! $("#boekhoofdstuk").hasClass("invalid")) {
var choice = $("#choice").html();
if (choice == "") {
choice = "1";
$("#choice").html(choice);
}
window.location.href = "bijbel?t=${vertaling.id}&b=${boek.id}&h=" + choice;
}
}
});
});
function addNumber(knop) {
var choice = $("#choice").html();
var lengte = choice.length;
if (lengte == 3) {
choice = "";
}
if (lengte == 0 && knop == "0") {
return;
}
choice += knop;
$("#choice").html(choice);
checkCorrectChapter();
}
function removeChar() {
var choice = $("#choice").html();
var lengte = choice.length;
if (lengte > 0) {
choice = choice.substring(0, choice.length - 1);
$("#choice").html(choice);
}
checkCorrectChapter();
}
function checkCorrectChapter() {
var hoofdstuk = parseInt($("#choice").html());
if (hoofdstuk > ${boek.hoofdstukken}) {
$("#boekhoofdstuk").addClass("invalid");
} else {
$("#boekhoofdstuk").removeClass("invalid");
}
}
function toastVerseDoesNotExist() {
$("a#choice span span").addClass("invalid");
$("<div class='ui-loader ui-overlay-shadow ui-body-e ui-corner-all'><h1>Dit vers bestaat niet.</h1></div>")
.css({
display: "block",
// opacity: 0.90,
position: "fixed",
padding: "7px",
"text-align": "center",
width: "350px",
left: ($(window).width() - 364) / 2,
top: $(window).height() / 2})
.appendTo($.mobile.pageContainer).delay(2000)
.fadeOut(400, function(){
$(this).remove();
var choice = $("a#choice span span").html();
choice = choice.substring(0, choice.indexOf("vers") + 5);
$("a#choice span span").html(choice);
$("a#choice span span").removeClass("invalid");
});
}
function checkPsalmVerseExists(psalm, vers) {
var result;
$.ajax({
url: 'psalmcheck',
async: false,
data: {p: psalm, v: vers}, //'p=' & psalm & '&v=' & vers,
success: function(data) {
result = data;
}
});
return result;
}
</script>
</body>
</html>

View File

@@ -0,0 +1,124 @@
<%@ page session="false"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html>
<head>
<title>Zondag ${hc}</title>
<meta name="viewport"
content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=0" />
<link rel="stylesheet"
href="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.css" />
<link rel="stylesheet"
href="resources/css/themes/Psalmenweb.min.css" />
<link rel="stylesheet"
href="resources/css/psalmenweb.css" />
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script
src="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.js"></script>
<script src="resources/js/prefs.js"></script>
</head>
<body>
<div data-role="page" data-theme="a">
<div data-role="header" data-position="fixed">
<div class="psalmheader">Zondag ${hc}</div>
<a data-inline="true" data-icon="custom" data-iconpos="notext" id="bw" data-ajax="false" class="ui-btn-right" style="margin-right:350px;"></a>
<a href="psalmindex" data-inline="true" data-icon="custom" data-iconpos="notext" id="note" data-ajax="false" class="ui-btn-right" style="margin-right:150px;"></a>
<a href="bijbelindex?t=1" data-inline="true" data-icon="custom" data-iconpos="notext" id="book" data-ajax="false" class="ui-btn-right" style="margin-right:50px;"></a>
</div>
<div data-role="content">
<br /> <br />
<c:forEach items="${zondag}" var="vraag" varStatus="varstatus">
<div class="psalmverseheader">Vraag ${vraag.vraag}</div>
<p class="hclinequestion">${vraag.tekstVraag}</p>
<p class="hclineanswer">${vraag.tekstAntwoord}</p>
<br />
</c:forEach>
<br />
</div>
<div data-role="footer" class="bigbuttons">
<div data-role="navbar" class="bigbuttons" data-position="fixed">
<ul>
<li><a href="hc?z=${hc - 1}" id="left" data-icon="custom" data-ajax="false">&nbsp;</a></li>
<li><a href="#" id="minus" data-icon="custom">&nbsp;</a></li>
<li><a href="hcindex" id="index" data-icon="custom" data-ajax="false" data-transition="pop">&nbsp;</a></li>
<li><a href="#" id="plus" data-icon="custom">&nbsp;</a></li>
<li><a href="hc?z=${hc + 1}" id="right" data-icon="custom" data-ajax="false">&nbsp;</a></li>
</ul>
</div>
</div>
</div>
<script type="text/javascript">
var PREF_TEXTSIZE;
var PREF_COLOR;
$(function() {
loadPreferences();
setPreferences();
bindListeners();
});
function changeTextSize(delta) {
var size = parseInt($(".psalmverseheader").css("font-size"));
cssSize = (size + delta) + "px";
$(".psalmverseheader").css("font-size", cssSize);
size = parseInt($(".hclinequestion").css("font-size"));
cssSize = (size + delta) + "px";
$(".hclinequestion").css("font-size", cssSize);
size = parseInt($(".hclineanswer").css("font-size"));
cssSize = (size + delta) + "px";
$(".hclineanswer").css("font-size", cssSize);
PREF_TEXTSIZE = size + delta;
savePreferences();
}
$(document).on('pageinit', function() {
$(document).on("click", "#minus", function(e) {
changeTextSize(-2);
});
$(document).on("click", "#plus", function(e) {
changeTextSize(2);
});
if ('${hc}' == '1') {
$("#left").attr("href", "#");
$("#left span.ui-icon").css("background-image", "none");
}
if ('${hc}' == '52') {
$("#right").attr("href", "#");
$("#right span.ui-icon").css("background-image", "none");
}
});
function goToVerse(immediately) {
if ("${vers}" != "") {
var target = $("#v${vers}").get(0).offsetTop;
if (target !== undefined) {
if (immediately) {
$.mobile.silentScroll(target);
} else {
setTimeout(function(){$.mobile.silentScroll(target);}, 100); // scroll after 1 sec
}
}
}
}
$(document).on('pageshow', function(){
goToVerse(false);
});
</script>
</body>
</html>

View File

@@ -0,0 +1,146 @@
<%@ page session="false"%>
<!DOCTYPE html>
<html>
<head>
<title>Index Catechismus</title>
<meta name="viewport"
content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=0" />
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.1.0-rc.1/jquery.mobile-1.1.0-rc.1.min.css" />
<link rel="stylesheet" href="resources/css/themes/Psalmenweb.min.css" />
<link rel="stylesheet" href="resources/css/psalmenweb.css" />
<style type="text/css">
a {
width: 20%;
}
.ui-btn {
height: 100px;
font-size: 60px;
line-height: 40px;
}
</style>
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script
src="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.js"></script></head>
<body>
<div data-role="page" id="myPage" data-theme="a">
<div data-role="content" data-theme="a">
<a id="hc" style="width: 100%;" href="#" data-role="button" data-transition="fade" class="indexlabel" data-theme="a">Zondag <span id="choice"></span></a>
<div data-role="controlgroup" data-type="horizontal" class="localnav indexknoppengroep">
<a id="k7" href="#" data-role="button" data-theme="a">7</a>
&nbsp;
<a id="k8" href="#" data-role="button" data-theme="a">8</a>
&nbsp;
<a id="k9" href="#" data-role="button" data-theme="a">9</a>
</div>
<div data-role="controlgroup" data-type="horizontal" class="localnav indexknoppengroep">
<a id="k4" href="#" data-role="button" data-theme="a">4</a>
&nbsp;
<a id="k5" href="#" data-role="button" data-theme="a">5</a>
&nbsp;
<a id="k6" href="#" data-role="button" data-theme="a">6</a>
</div>
<div data-role="controlgroup" data-type="horizontal" class="localnav indexknoppengroep">
<a id="k1" href="#" data-role="button" data-theme="a">1</a>
&nbsp;
<a id="k2" href="#" data-role="button" data-theme="a">2</a>
&nbsp;
<a id="k3" href="#" data-role="button" data-theme="a">3</a>
</div>
<div data-role="controlgroup" data-type="horizontal" class="localnav indexknoppengroep">
<a id="kd" href="#" data-role="button" data-theme="a">&#8630;</a>
&nbsp;
<a id="k0" href="#" data-role="button" data-theme="a">0</a>
&nbsp;
<a id="ke" href="#" data-role="button" data-theme="a">&#x2714;</a>
</div>
</div>
</div>
<script type="text/javascript">
$(function () {
$(".indexknoppengroep a").click(function() {
if ($("div.ui-loader.ui-overlay-shadow").length == 1) {
return;
}
var knop = this.id.substring(1);
switch(knop) {
case "0":
case "1":
case "2":
case "3":
case "4":
case "5":
case "6":
case "7":
case "8":
case "9":
addNumber(knop);
break;
case "d":
if ($("#choice").html().length == 0) {
window.history.back();
} else {
removeChar();
}
break;
case "e":
if (! $("#hc").hasClass("invalid")) {
var choice = $("#choice").html();
window.location.href = "hc?z=" + choice;
}
}
if ($("#choice").html().length == 0) {
$("a#kd span span").html("&#8630;");
} else {
$("a#kd span span").html("&#x25C0;");
}
});
});
function addNumber(knop) {
var choice = $("#choice").html();
var lengte = choice.length;
if (lengte == 2) {
choice = "";
}
if (lengte == 0 && knop == "0") {
return;
}
choice += knop;
$("#choice").html(choice);
checkCorrectChoice();
}
function removeChar() {
var choice = $("#choice").html();
var lengte = choice.length;
if (lengte > 0) {
choice = choice.substring(0, choice.length - 1);
$("#choice").html(choice);
}
checkCorrectChoice();
}
function checkCorrectChoice() {
var hc = parseInt($("#choice").html());
if (hc > 52) {
$("#hc").addClass("invalid");
} else {
$("#hc").removeClass("invalid");
}
}
</script>
</body>
</html>

View File

@@ -0,0 +1,54 @@
<%@ page session="false"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
<title>Psalmen</title>
<meta name="viewport"
content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=0" />
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.1.0-rc.1/jquery.mobile-1.1.0-rc.1.min.css" />
<link rel="stylesheet" href="resources/css/themes/Psalmenweb.css" />
<link rel="stylesheet" href="resources/css/psalmenweb.css" />
<style type="text/css">
a {
width: 30%;
}
.ui-btn {
height: 100px;
font-size: 60px;
line-height: 40px;
}
</style>
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script
src="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.js"></script></head>
<body>
<div data-role="page" id="myPage" data-theme="a">
<div data-role="content" data-theme="a">
<div data-role="controlgroup" data-type="horizontal" class="localnav indexknoppengroep">
<a href="bijbelindex?t=1" style="width: 100%;" data-role="button" data-theme="a" data-ajax="false">Bijbel (HSV)</a>
</div>
<div data-role="controlgroup" data-type="horizontal" class="localnav indexknoppengroep">
<a href="bijbelindex?t=2" style="width: 100%;"data-role="button" data-theme="a" data-ajax="false">Bijbel (SV)</a>
</div>
<div data-role="controlgroup" data-type="horizontal" class="localnav indexknoppengroep">
<a href="psalmindex" style="width: 100%;" data-role="button" data-theme="a" data-ajax="false">Psalmen</a>
</div>
<div data-role="controlgroup" data-type="horizontal" class="localnav indexknoppengroep">
<a href="hcindex" style="width: 100%;" data-role="button" data-theme="a" data-ajax="false">Heidelbergse Catechismus</a>
</div>
<div data-role="controlgroup" data-type="horizontal" class="localnav indexknoppengroep">
<a style="width: 100%; visibility: hidden;" data-role="button" data-theme="a" data-ajax="false">Psalmen</a>
</div>
<div data-role="controlgroup" data-type="horizontal" class="localnav indexknoppengroep">
<a href="info" style="width: 100%;" data-role="button" data-theme="a" data-ajax="false">Informatie</a>
</div>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,43 @@
<%@ page session="false"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
<title>Psalmen</title>
<meta name="viewport"
content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=0" />
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.1.0-rc.1/jquery.mobile-1.1.0-rc.1.min.css" />
<link rel="stylesheet" href="resources/css/themes/Psalmenweb.css" />
<link rel="stylesheet" href="resources/css/psalmenweb.css" />
<style type="text/css">
a {
width: 30%;
}
.ui-btn {
height: 100px;
font-size: 60px;
line-height: 40px;
}
</style>
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script
src="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.js"></script></head>
<body>
<div data-role="page" id="myPage" data-theme="a">
<div data-role="content" data-theme="a">
<p style="font-size: 40px; line-height: 1.5; text-align: left;">
Het doel van deze website is om de Bijbel en de psalmen toegankelijk te maken voor slecht- en minderzienden.
De website is geoptimaliseerd voor tablets. Een internetverbinding is noodzakelijk!
</p>
<p style="font-size: 40px; line-height: 1.5; text-align: left;">
Ik help u graag bij problemen of vragen. Telefoon: 06-14243000 of email: <a href="mailto:info@psalmenonline.nl">info@psalmenonline.nl</a>.
</p>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,132 @@
<%@ page session="false"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html>
<head>
<title>Psalm ${psalm}</title>
<meta name="viewport"
content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=0" />
<link rel="stylesheet"
href="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.css" />
<link rel="stylesheet"
href="resources/css/themes/Psalmenweb.min.css" />
<link rel="stylesheet"
href="resources/css/psalmenweb.css" />
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script
src="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.js"></script>
<script src="resources/js/prefs.js"></script>
</head>
<body>
<div data-role="page" data-theme="a">
<div data-role="header" data-position="fixed">
<div class="psalmheader">Psalm ${psalm}</div>
<a data-inline="true" data-icon="custom" data-iconpos="notext" id="bw" data-ajax="false" class="ui-btn-right" style="margin-right:350px;"></a>
<a href="hcindex" data-inline="true" data-icon="custom" data-iconpos="notext" id="hc" data-ajax="false" class="ui-btn-right" style="margin-right:150px;">a</a>
<a href="bijbelindex?t=1" data-inline="true" data-icon="custom" data-iconpos="notext" id="book" data-ajax="false" class="ui-btn-right" style="margin-right:50px;"></a>
</div>
<div data-role="content">
<br /> <br />
<c:forEach items="${psalmRegels}" var="psalmregel"
varStatus="varstatus">
<c:if
test="${(varstatus.index == 0) || (psalmregel.vers != psalmRegels[varstatus.index - 1].vers)}">
<a id="v${psalmregel.vers}"></a>
<br />
<br />
<br />
<c:choose>
<c:when test="${psalmregel.vers == 0}">
<div class="psalmverseheader">Voorzang</div>
</c:when>
<c:otherwise>
<div class="psalmverseheader">Vers ${psalmregel.vers}</div>
</c:otherwise>
</c:choose>
</c:if>
<p class="psalmline">${psalmregel.tekst}</p>
</c:forEach>
<br />
</div>
<div data-role="footer" class="bigbuttons">
<div data-role="navbar" class="bigbuttons" data-position="fixed">
<ul>
<li><a href="psalm?p=${psalm - 1}" id="left" data-icon="custom" data-ajax="false">&nbsp;</a></li>
<li><a href="#" id="minus" data-icon="custom">&nbsp;</a></li>
<li><a href="psalmindex" id="index" data-icon="custom" data-ajax="false" data-transition="pop">&nbsp;</a></li>
<li><a href="#" id="plus" data-icon="custom">&nbsp;</a></li>
<li><a href="psalm?p=${psalm + 1}" id="right" data-icon="custom" data-ajax="false">&nbsp;</a></li>
</ul>
</div>
</div>
</div>
<script type="text/javascript">
var PREF_TEXTSIZE;
var PREF_COLOR;
$(function() {
loadPreferences();
setPreferences();
bindListeners();
});
function changeTextSize(delta) {
var size = parseInt($(".psalmverseheader").css("font-size"));
cssSize = (size + delta) + "px";
$(".psalmverseheader").css("font-size", cssSize);
size = parseInt($(".psalmline").css("font-size"));
cssSize = (size + delta) + "px";
$(".psalmline").css("font-size", cssSize);
}
$(function () {
$(document).on("click", "#minus", function(e) {
changeTextSize(-2);
//goToVerse(true);
});
$(document).on("click", "#plus", function(e) {
changeTextSize(2);
//goToVerse(true);
});
if ('${psalm}' == '1') {
$("#left").attr("href", "#");
$("#left span.ui-icon").css("background-image", "none");
}
if ('${psalm}' == '150') {
$("#right").attr("href", "#");
$("#right span.ui-icon").css("background-image", "none");
}
});
function goToVerse(immediately) {
if ("${vers}" != "") {
var target = $("#v${vers}").get(0).offsetTop;
if (target !== undefined) {
if (immediately) {
$.mobile.silentScroll(target);
} else {
setTimeout(function(){$.mobile.silentScroll(target);}, 100); // scroll after 1 sec
}
}
}
}
$(document).on('pageshow', function(){
goToVerse(false);
});
</script>
</body>
</html>

View File

@@ -0,0 +1,232 @@
<%@ page session="false"%>
<!DOCTYPE html>
<html>
<head>
<title>Index Psalmen</title>
<meta name="viewport"
content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=0" />
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.1.0-rc.1/jquery.mobile-1.1.0-rc.1.min.css" />
<link rel="stylesheet" href="resources/css/themes/Psalmenweb.min.css" />
<link rel="stylesheet" href="resources/css/psalmenweb.css" />
<style type="text/css">
a {
width: 20%;
}
.ui-btn {
height: 100px;
font-size: 60px;
line-height: 40px;
}
</style>
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script
src="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.js"></script></head>
<body>
<div data-role="page" id="myPage" data-theme="a">
<div data-role="content" data-theme="a">
<a id="choice" style="width: 100%;" href="#" data-role="button" data-transition="fade" class="indexlabel" data-theme="a">Psalm</a>
<div data-role="controlgroup" data-type="horizontal" class="localnav indexknoppengroep">
<a id="k7" href="#" data-role="button" data-theme="a">7</a>
&nbsp;
<a id="k8" href="#" data-role="button" data-theme="a">8</a>
&nbsp;
<a id="k9" href="#" data-role="button" data-theme="a">9</a>
</div>
<div data-role="controlgroup" data-type="horizontal" class="localnav indexknoppengroep">
<a id="k4" href="#" data-role="button" data-theme="a">4</a>
&nbsp;
<a id="k5" href="#" data-role="button" data-theme="a">5</a>
&nbsp;
<a id="k6" href="#" data-role="button" data-theme="a">6</a>
</div>
<div data-role="controlgroup" data-type="horizontal" class="localnav indexknoppengroep">
<a id="k1" href="#" data-role="button" data-theme="a">1</a>
&nbsp;
<a id="k2" href="#" data-role="button" data-theme="a">2</a>
&nbsp;
<a id="k3" href="#" data-role="button" data-theme="a">3</a>
</div>
<div data-role="controlgroup" data-type="horizontal" class="localnav indexknoppengroep">
<a id="kd" href="#" data-role="button" data-theme="a">&#8630;</a>
&nbsp;
<a id="k0" href="#" data-role="button" data-theme="a">0</a>
&nbsp;
<a id="ke" href="#" data-role="button" data-theme="a">&#x2714;</a>
</div>
</div>
</div>
<script type="text/javascript">
$(function () {
$(".indexknoppengroep a").click(function() {
if ($("div.ui-loader.ui-overlay-shadow").length == 1) {
return;
}
var knop = this.id.substring(1);
switch(knop) {
case "0":
case "1":
case "2":
case "3":
case "4":
case "5":
case "6":
case "7":
case "8":
case "9":
addNumber(knop);
break;
case "d":
if ($("a#choice span span").html().length < 7) {
window.history.back();
} else {
removeChar();
}
break;
case "e":
if ($("a#choice span span").hasClass("invalid")) {
break;
}
var choice = $("a#choice span span").html();
if (choice.indexOf("vers") > 0) {
var psalm = choice.substring(6, choice.indexOf("vers") - 1);
var vers = choice.substring(choice.indexOf("vers") + 5);
if (vers == "") {
vers = 1;
choice += "1";
$("a#choice span span").html(choice);
}
if (! checkPsalmVerseExists(psalm, vers)) {
toastVerseDoesNotExist();
} else {
window.location.href = "psalm?p=" + psalm + "&v=" + vers;
//window.location.href = "/psalm?p=" + psalm + "&v=" + vers;
}
} else {
if (! (choice.length < 7)) {
choice += " vers ";
$("a#choice span span").html(choice);
}
}
}
var choice = $("a#choice span span").html();
if (choice.length < 7) {
$("a#kd span span").html("&#8630;");
} else {
$("a#kd span span").html("&#x25C0;");
}
});
});
function addNumber(knop) {
var choice = $("a#choice span span").html();
var lengte = choice.length;
if (choice.indexOf("vers") > 0) {
var vers = choice.substring(choice.indexOf("vers") + 5);
var verslengte = vers.length;
if (verslengte < 2) {
if (!(verslengte == 0 && knop == "0")) {
choice += knop;
}
} else {
if (!(knop == "0")) {
choice = choice.substring(0, choice.indexOf("vers") + 5) + knop;
}
}
$("a#choice span span").html(choice);
} else {
if (lengte == 5) {
choice += " ";
lengte++;
}
if (lengte < 9) {
if (!(lengte == 6 && knop == "0")) {
choice += knop;
}
} else {
if (!(knop == "0")) {
choice = "Psalm " + knop;
}
}
$("a#choice span span").html(choice);
checkCorrectPsalm();
}
}
function removeChar() {
var choice = $("a#choice span span").html();
var lengte = choice.length;
if (lengte > 5) {
choice = choice.substring(0, choice.length - 1);
if (choice.substring(choice.length - 4) == "vers") {
choice = choice.substring(0, choice.length - 5);
}
$("a#choice span span").html(choice);
checkCorrectPsalm();
}
}
function checkCorrectPsalm() {
var psalm = parseInt($("a#choice span span").html().substring(6));
if (psalm < 1 || psalm > 150) {
$("a#choice span span").addClass("invalid");
} else {
$("a#choice span span").removeClass("invalid");
}
}
function toastVerseDoesNotExist() {
$("a#choice span span").addClass("invalid");
$("<div class='ui-loader ui-overlay-shadow ui-body-e ui-corner-all'><h1>Dit vers bestaat niet.</h1></div>")
.css({
display: "block",
// opacity: 0.90,
position: "fixed",
padding: "7px",
"text-align": "center",
width: "350px",
left: ($(window).width() - 364) / 2,
top: $(window).height() / 2})
.appendTo($.mobile.pageContainer).delay(2000)
.fadeOut(400, function(){
$(this).remove();
var choice = $("a#choice span span").html();
choice = choice.substring(0, choice.indexOf("vers") + 5);
$("a#choice span span").html(choice);
$("a#choice span span").removeClass("invalid");
});
}
function checkPsalmVerseExists(psalm, vers) {
var result;
$.ajax({
url: 'psalmcheck',
async: false,
data: {p: psalm, v: vers}, //'p=' & psalm & '&v=' & vers,
success: function(data) {
result = data;
}
});
return result;
}
</script>
</body>
</html>

View File

@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<!-- The definition of the Root Spring Container shared by all Servlets and Filters -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/spring/root-context.xml</param-value>
</context-param>
<!-- Creates the Spring Container shared by all Servlets and Filters -->
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<!-- Processes application requests -->
<servlet>
<servlet-name>appServlet</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/spring/appServlet/servlet-context.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>appServlet</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
</web-app>