2020-11-19 22:47:44 +01:00
< html >
< head >
< title > Ansicht Reservierung< / title >
2020-11-19 22:48:24 +01:00
2020-11-19 22:47:44 +01:00
< meta name = "viewport" content = "width=device-width, initial-scale=1" >
< meta http-equiv = "content-type" content = "text/html; charset=utf-8" >
2020-11-19 22:48:24 +01:00
< meta name = "author" content = "Stefan Pichel" >
2020-11-19 23:24:09 +01:00
< link rel = "stylesheet" type = "text/css" href = "css/bestformat.css?v=2.0.11" >
< link rel = "stylesheet" type = "text/css" href = "css/osdatepicker.css?v=2.0.11" >
2020-11-19 23:02:42 +01:00
< link rel = "stylesheet" href = "php/contenthandler.php?module=admin&command=getmobilecss" / >
2020-11-19 22:47:44 +01:00
< link rel = "stylesheet" href = "php/3rdparty/orderstyle/jquery.mobile.icons.min.css" / >
2020-11-19 22:48:24 +01:00
< link rel = "stylesheet" href = "php/3rdparty/jquery.mobile-1.4.0.min.css" type = "text/css" / >
< script src = "php/3rdparty/jquery-1.11.3.min.js" > < / script >
< script src = "php/3rdparty/jquery.mobile-1.4.5.min.js" > < / script >
< script src = "elements/tablemap.js" > < / script >
2020-11-19 23:24:09 +01:00
< script src = "elements/reservation.js?v=2.0.11" > < / script >
< script src = "elements/osdatepicker.js?v=2.0.11" > < / script >
2020-11-19 22:47:44 +01:00
2020-11-19 23:24:09 +01:00
< script src = "utilities.js?v=2.0.11" > < / script >
2020-11-19 22:47:44 +01:00
2020-11-19 22:48:24 +01:00
< link rel = "stylesheet" href = "php/3rdparty/jqueryui1-11-4/jquery-ui.min.css" / >
< script src = "php/3rdparty/jqueryui1-11-4/jquery-ui.min.js" > < / script >
< script src = "php/3rdparty/jqueryui1-11-4/jquery-ui-i18n.min.js" > < / script >
2020-11-19 22:47:44 +01:00
< / head >
2020-11-19 23:02:08 +01:00
< body >
2020-11-19 22:47:44 +01:00
< style >
2020-11-19 23:13:57 +01:00
@media print
{
2020-11-19 23:14:07 +01:00
#thefooter,#theheader,#modulemenu,#newresbox,#printsummary,#timeperiodsliderform,#viewdatepart,#blockarea {display: none;}
2020-11-19 23:13:57 +01:00
}
2020-11-19 23:12:37 +01:00
.schbtn,.schtablebtn {
font-size: 9px;
width: 170px;
height: 65px;
2020-11-19 22:47:44 +01:00
word-wrap: break-word !important;
white-space: normal !important;
background:Red;
}
.timeschbtn {
font-size: 15px;
width: 100px;
height: 45px;
}
2020-11-19 22:48:24 +01:00
.ui-select .ui-btn {
width:200px;
}
2020-11-19 22:47:44 +01:00
< / style >
2020-11-19 23:02:08 +01:00
2020-11-19 22:47:44 +01:00
< script >
var RES_TITLE = ["Reservierung","Reservation","Reserva"];
var RES_NEW = ["Neue Reservierung","New Reservation","Reserva nueva"];
var RES_STARTTIME = ["Start-Uhrzeit","Start time","Hora de Empieza"];
var RES_NO_PERSONS = ["Anzahl Gäste","Number of persons","Personas"];
2020-11-19 23:13:57 +01:00
var RES_HOUR = ["Stunde","Hour","Hora"];
var RES_MIN = ["Minute","Minute","Minuto"];
var RES_DURATION = ["Dauer","Duration","Quanto tiempo"];
var RES_DURATION_HOURS = ["Stunden","Hours","Horas"];
var RES_DURATION_MINS = ["Minuten","Minutes","Minutos"];
var RES_GUEST_INFO_HEADER = ["Gästeinformation","Guest information","Información sobre huespedes"];
2020-11-19 22:47:44 +01:00
var RES_NAME = ["Name","Name","Nombre"];
var RES_EMAIL = ["E-Mail","Email","Email"];
var RES_TEL = ["Telefon","Phone","Telefono"];
var RES_REMARK = ["Notiz","Remark","Comentario"];
var RES_NO_NAME = ["Name wurde nicht angegeben!","Name field not filled!","Falta el nombre!"];
2020-11-19 23:13:57 +01:00
var RES_NO_PERSONS = ["Anzahl Personen wurde nicht eingetragen","Number of persons not specified","Falta numero de personas"];
var RES_INVALID_NUMBER_OF_PERSONS = ["Invalide Angabe der Personenanzahl","Invalid number of guests","Número de huespedes invalido"];
2020-11-19 22:47:44 +01:00
var RES_APPLY = ["Anwenden","Apply","Aplicar"];
var RES_CANCEL = ["Abbrechen","Cancel","Cancelar"];
var RES_CHANGE_TITLE = ["Reservierung ändern","Change Reservation","Modificar Reserva"];
var RES_LASTCREATOR = ["Letzte Änderung von","Last change by","Ultima modificación de"];
var RES_LASTUPDATE = ["Zuletzt geändert","Last changed","Ultimo cambio"];
2020-11-19 23:13:57 +01:00
var RES_TIME = ["Uhrzeit","Time","Hora"];
2020-11-19 23:12:37 +01:00
var RES_RES = ["Reservierungen","Reservations","Reservaciones"];
2020-11-19 23:13:57 +01:00
var RES_TIME_PERIOD = ["Zeitraum","Time frame","Periodo del tiempo"];
2020-11-19 22:47:44 +01:00
var RES_NORES = ["Keine Reservierungen an diesem Tag","No reservations at the selected day","No hay ningúna reserva"];
var RES_DEL = ["Löschen","Delete","Borrar"];
var RES_EMAIL_IMPOSSIBLE = ["(Eine Email-Reservierungsbestätigung ist erst nach Konfiguration des Emailsystems möglich.)",
"(ending of an email confirmation requires the setup of the email system.)",
"(Enviar una confirmación por email requiere la configuración del sistema de email.)"];
var RES_NOT_SEND = ["Nicht senden","Do not send","No enviar"];
var RES_SEND_EMAIL = ["Senden","Send","Enviar"];
var RES_TO = ["An","To","A"];
2020-11-19 23:02:08 +01:00
var RES_CUS_LABEL = ["Kunden aus Datenbank auswählen","Choose customer from data base","Elegir cliente del base de datos"];
var RES_CUSTOMERS = ["Kunden","Customers","Clientes"];
var RES_NO_CUS_FOUND = ["Kein Kunde gefunden","No customer found","Ningún cliente en base de datos"];
var RES_HINT_CUS_CHOOSE = ["Oder manuell eingeben:","or type in manually:","o insertar por teclado:"];
2020-11-19 23:12:37 +01:00
var RES_TABLESPEC = ["Tischangabe","Table","Mesa"];
var RES_ROOM = ["Raum","Room","Habitación"];
var RES_TABLE = ["Tisch","Table","Mesa"];
2020-11-19 23:12:59 +01:00
var RES_HTMLREPORT = ["Übersicht","Overview","Lista en html"];
2020-11-19 23:13:57 +01:00
var RES_CREATED_OK = ["Reservierung angelegt","Reservation created","Reservación creado"];
2020-11-19 23:14:07 +01:00
var RES_BLOCK_DAY = ["Weitere Buchungen verbieten","Stop further bookings","Evitar más reservaciones"];
var RES_RELEASE_DAY = ["Buchungen wieder erlauben","Allow reservartions again","Permitir más reservaciones"];
var RES_BLOCK_AREA_TXT = ["Tag blocken oder entsperren","Block or release day","Derecho de hacer reservaciones"];
var RES_CAUTION_DAY_BLOCKED = ["Der Tag wurde für weitere Reservierungen gesperrt","This day was blocked for further reservations","Este día ha sido bloqueado para más reservaciones"];
2020-11-19 22:47:44 +01:00
var lang = (-1);
var reservationnote = "";
2020-11-19 23:13:57 +01:00
var reservationitem = "";
2020-11-19 22:47:44 +01:00
var companyinfo = "";
var emailIsPossible = false;
var emailTemplate = "";
2020-11-19 23:02:08 +01:00
var filteredCustomers = [];
2020-11-19 23:12:37 +01:00
var tableoverview = [];
2020-11-19 23:13:57 +01:00
var resofselecteddate = [];
2020-11-19 23:14:07 +01:00
var viewdate = null;
var chgviewdate = null;
2020-11-19 22:47:44 +01:00
function setLanguage(language) {
lang = language;
2020-11-19 23:14:07 +01:00
2020-11-19 22:47:44 +01:00
$("#restitletxt").html(RES_TITLE[lang]);
$("#newtxt").html(RES_NEW[lang]);
$("#newresboxtxt").html(RES_NEW[lang]);
$("#starttimetxt").html(RES_STARTTIME[lang]);
2020-11-19 23:13:57 +01:00
$("#datehourtxt").html(RES_HOUR[lang]);
$("#datemintxt").html(RES_MIN[lang]);
$("#guestheadertxt").html(RES_GUEST_INFO_HEADER[lang]);
2020-11-19 22:47:44 +01:00
$("#personstxt").html(RES_NO_PERSONS[lang]);
2020-11-19 23:13:57 +01:00
$("#durationheadertxt").html(RES_DURATION[lang]);
$("#durationhourtxt").html(RES_DURATION_HOURS[lang]);
$("#durationmintxt").html(RES_DURATION_MINS[lang]);
2020-11-19 22:47:44 +01:00
$("#nametxt").html(RES_NAME[lang]);
2020-11-19 23:02:08 +01:00
$("#customertxt").html(RES_CUS_LABEL[lang]);
2020-11-19 22:47:44 +01:00
$("#emailtxt").html(RES_EMAIL[lang]);
$("#teltxt").html(RES_TEL[lang]);
$("#remarktxt").html(RES_REMARK[lang]);
2020-11-19 23:13:57 +01:00
$("#cdurationheadertxt").html(RES_DURATION[lang]);
$("#cdurationhourtxt").html(RES_DURATION_HOURS[lang]);
$("#cdurationmintxt").html(RES_DURATION_MINS[lang]);
$("#cguestheadertxt").html(RES_GUEST_INFO_HEADER[lang]);
2020-11-19 22:47:44 +01:00
$("#cnewresboxtxt").html(RES_CHANGE_TITLE[lang]);
$("#reschangetitletxt").html(RES_CHANGE_TITLE[lang]);
$("#cstarttimetxt").html(RES_STARTTIME[lang]);
2020-11-19 23:13:57 +01:00
$("#cstarttimehourtxt").html(RES_HOUR[lang]);
2020-11-19 22:47:44 +01:00
$("#cpersonstxt").html(RES_NO_PERSONS[lang]);
2020-11-19 23:13:57 +01:00
$("#cdurationtxt").html(RES_DURATION_HOURS[lang]);
2020-11-19 22:47:44 +01:00
$("#cnametxt").html(RES_NAME[lang]);
$("#cemailtxt").html(RES_EMAIL[lang]);
$("#cteltxt").html(RES_TEL[lang]);
$("#cremarktxt").html(RES_REMARK[lang]);
2020-11-19 23:12:37 +01:00
$("#tablespecheadertxt").html(RES_TABLESPEC[lang]);
$("#ctablespecheadertxt").html(RES_TABLESPEC[lang]);
2020-11-19 22:47:44 +01:00
$("#canceltxt").html(RES_CANCEL[lang]);
$("#changedlgbtn").html(RES_APPLY[lang]);
$("#clastcreatortxt").html(RES_LASTCREATOR[lang]);
$("#clastchangetxt").html(RES_LASTUPDATE[lang]);
$("#deldlgbtn").html(RES_DEL[lang]);
$("#cancelemailbtntxt").html(RES_NOT_SEND[lang]);
$("#sendemailtxtbtn").html(RES_SEND_EMAIL[lang]);
$("#sendemailtotxt").html(RES_TO[lang]);
2020-11-19 23:02:08 +01:00
$("#reshintchoosecustomer").html(RES_HINT_CUS_CHOOSE[lang]);
2020-11-19 23:13:57 +01:00
$("#resbytimesofdaytxt").html(RES_RES[lang]);
2020-11-19 23:14:07 +01:00
$("#blockdaybtn").html(RES_BLOCK_DAY[lang]);
$("#releasedaybtn").html(RES_RELEASE_DAY[lang]);
$("#blockareaheadertxt").html(RES_BLOCK_AREA_TXT[lang]);
2020-11-19 23:13:57 +01:00
$(".timeperiodslider").html(RES_TIME_PERIOD[lang]);
2020-11-19 23:02:08 +01:00
2020-11-19 23:14:07 +01:00
getBlockedDays();
}
2020-11-19 22:47:44 +01:00
2020-11-19 23:14:07 +01:00
function initDatePickers(blockedDays) {
var date = new Date();
viewdate = new OsDatePicker();
viewdate.init("#viewdate","#viewdatemonth",lang,date.getDate(),date.getMonth(),date.getFullYear(),handleViewDateChange,blockedDays);
2020-11-19 22:47:44 +01:00
2020-11-19 23:14:07 +01:00
chgviewdate = new OsDatePicker();
chgviewdate.init("#chgviewdate","#chgviewdatemonth",lang,date.getDate(),date.getMonth(),date.getFullYear(),null,blockedDays);
2020-11-19 22:47:44 +01:00
2020-11-19 23:14:07 +01:00
$("#newresbox").show();
var blockStatusOfToday = viewdate.isTodayBlockedWithRemark();
doVisibilityOfBlockAreas(blockStatusOfToday.blocked,blockStatusOfToday.remark);
2020-11-19 22:47:44 +01:00
}
function getGeneralConfigItems() {
2020-11-19 23:14:07 +01:00
doAjax("GET", "php/contenthandler.php?module=admin& command=getGeneralConfigItems", null, insertGenConfigStartRest, "Fehler Konfigurationsdaten");
}
2020-11-19 22:47:44 +01:00
function insertGenConfigStartRest(configResult) {
if (configResult.status == "OK") {
var values = configResult.msg;
reservationnote = values.reservationnote;
2020-11-19 23:13:57 +01:00
reservationitem = values.reservationitem;
2020-11-19 22:47:44 +01:00
companyinfo = values.companyinfo;
setLanguage(values.userlanguage);
if (values.email != "") {
emailIsPossible = true;
$("#emailinfo").html();
} else {
$("#emailinfo").html(RES_EMAIL_IMPOSSIBLE[lang]);
}
emailTemplate = values.reservationnote;
} else {
2020-11-19 23:14:07 +01:00
setTimeout(function(){document.location.href = "index.html";},250); // not logged in
2020-11-19 22:47:44 +01:00
$("#fullcontent").hide();
}
}
2020-11-19 23:14:07 +01:00
function doVisibilityOfBlockAreas(isBlocked,blockRemark) {
if (isBlocked) {
$("#newresbox").hide();
$("#cautionarea").show();
var infoTxt = RES_CAUTION_DAY_BLOCKED[lang];
if ((blockRemark != null) & & (blockRemark != "")) {
infoTxt += ": < b > " + blockRemark + "< / b > ";
} else {
infoTxt += "!";
}
$("#cautioninfo").html(infoTxt);
$("#blockpart").hide();
$("#releasepart").show();
} else {
$("#newresbox").show();
$("#cautionarea").hide();
$("#blockpart").show();
$("#releasepart").hide();
}
}
function handleViewDateChange(theNewDate,isBlocked,blockRemark) {
$("#res-page").data("date",theNewDate);
displayTodaySchedule(theNewDate);
doVisibilityOfBlockAreas(isBlocked,blockRemark);
2020-11-19 22:47:44 +01:00
}
2020-11-19 23:12:37 +01:00
function displayTodaySchedule(date) {
2020-11-19 22:47:44 +01:00
var data = {
day: date.getDate(),
month: (date.getMonth() + 1),
year: date.getFullYear()
};
2020-11-19 23:12:37 +01:00
getReservationsOfDate(data);
}
function displaySpecificDateSchedule() {
var urlsuffix = location.search;
if (urlsuffix.indexOf('date=') >= 0) {
var datestamp = '';
var urlParts = urlsuffix.split(/&|\?/);
for (var i=0;i< urlParts.length ; i + + ) {
var aPart = urlParts[i];
if (aPart.indexOf('date=') == 0) {
var parts = aPart.split("=");
datestamp = parts[1];
}
}
var dateParts = datestamp.split("-");
2020-11-19 23:14:07 +01:00
var year = parseInt(dateParts[0]);
var month = parseInt(dateParts[1]);
var day = parseInt(dateParts[2]);
2020-11-19 23:13:57 +01:00
var data = {
2020-11-19 23:12:37 +01:00
day: day,
month: month,
year: year
};
2020-11-19 23:14:07 +01:00
getBlockedDays();
viewdate.setDate(new Date(year,month-1,day));
2020-11-19 23:12:37 +01:00
getReservationsOfDate(data);
} else {
displayTodaySchedule(new Date());
}
}
function getReservationsOfDate(dateObj) {
doAjax("GET","php/contenthandler.php?module=reservation&command=getReservations",dateObj,insertReservations,"Reservierungsinfos");
2020-11-19 22:47:44 +01:00
}
2020-11-19 23:14:07 +01:00
function getDateFromViewDatePicker() {
var date = viewdate.getDate();
var data = {
day: date.getDate(),
month: date.getMonth() + 1,
year: date.getFullYear()
};
return data;
}
function getBlockedDays() {
doAjax("POST","php/contenthandler.php?module=reservation&command=getfutureblocks",null,handleGetBlockedDays,"GetBlockedDays",false);
}
function handleGetBlockedDays(answer) {
if (answer.status == "OK") {
initDatePickers(answer.msg);
} else {
alert("Fehler: " + answer.msg);
}
}
function bindBlockDayBtn() {
$("#blockdaybtn").off("click").on("click", function (e) {
e.stopImmediatePropagation();
e.preventDefault();
var data = getDateFromViewDatePicker();
data["remark"] = $("#blockremark").val();
viewdate.blockDayInHashmap(data.day,data.month-1,data.year,data["remark"]);
chgviewdate.blockDayInHashmap(data.day,data.month-1,data.year,data["remark"]);
doVisibilityOfBlockAreas(true,data["remark"]);
doAjax("POST","php/contenthandler.php?module=reservation& command=blockday",data,handleBlock,"Block Reservierung",true);
});
$("#releasedaybtn").off("click").on("click", function (e) {
e.stopImmediatePropagation();
e.preventDefault();
var data = getDateFromViewDatePicker();
viewdate.releaseDayInHashmap(data.day,data.month-1,data.year);
chgviewdate.releaseDayInHashmap(data.day,data.month-1,data.year);
doVisibilityOfBlockAreas(false,"");
doAjax("POST","php/contenthandler.php?module=reservation& command=releaseday",data,handleBlock,"Freigabe Reservierung",true);
});
}
function handleBlock(answer) {
if (answer.status != "OK") {
alert("Fehler: " + answer.msg);
} else {
$("#blockremark").val("");
}
}
2020-11-19 22:47:44 +01:00
function bindNewReservationBtn() {
$("#newbtn").off("click").on("click", function (e) {
2020-11-19 23:14:07 +01:00
var date = viewdate.getDate();
2020-11-19 22:47:44 +01:00
2020-11-19 23:13:57 +01:00
var startTimeHour = $("#timefieldse").val();
var startTimeMin = $("#timefieldmin").val();
2020-11-19 22:47:44 +01:00
var name = ($("#guestname").val()).trim();
var email = ($("#email").val()).trim();
2020-11-19 23:13:57 +01:00
var durationhours = $("#durationse").val();
var durationmins = $("#durationmin").val();
2020-11-19 22:47:44 +01:00
var persons = $("#noofguestse").val();
var phone = $("#telno").val();
var remark = $("#remark").val();
2020-11-19 23:12:37 +01:00
var roomkeys = Object.keys(tableoverview);
var roomid = -1;
var tableid = -1;
if (roomkeys.length == 0) {
tableid = -1;
} else if (roomkeys.length == 1) {
roomid = roomkeys[0];
tableid = $("#tableselect").val();
} else {
roomid = $("#roomselect").val();
tableid = -1;
if (roomid >= 0) {
tableid = $("#tableselect").val();
}
}
2020-11-19 22:47:44 +01:00
if (name.length == 0) {
alert(RES_NO_NAME[lang]);
2020-11-19 23:13:57 +01:00
} else if (persons == "") {
alert(RES_NO_PERSONS[lang]);
} else if (!isInt(persons)) {
alert(RES_INVALID_NUMBER_OF_PERSONS[lang]);
2020-11-19 22:47:44 +01:00
} else {
var data = {
day: date.getDate(),
month: (date.getMonth() + 1),
year: date.getFullYear(),
2020-11-19 23:13:57 +01:00
starthour: startTimeHour,
startmin: startTimeMin,
2020-11-19 22:47:44 +01:00
name: name,
email: email,
2020-11-19 23:13:57 +01:00
durationhours: durationhours,
durationmins: durationmins,
2020-11-19 22:47:44 +01:00
persons: persons,
phone: phone,
2020-11-19 23:12:37 +01:00
remark: remark,
tableid: tableid
2020-11-19 22:47:44 +01:00
};
var emailtext = emailTemplate;
emailtext = emailtext.replace(/DATUM/g,date.getDate() + "." + (date.getMonth() + 1) + "." + date.getFullYear());
emailtext = emailtext.replace(/ANZAHL/g,persons);
2020-11-19 23:13:57 +01:00
emailtext = emailtext.replace(/ZEIT/g,startTimeHour + ":" + startTimeMin);
2020-11-19 22:47:44 +01:00
emailtext = emailtext.replace(/BETRIEBSINFO/g,companyinfo);
$("#emailfield").val(emailtext);
$("#emailtofield").val(email);
doAjax("POST","php/contenthandler.php?module=reservation&command=createReservation",data,handleCreateNewReservation,"Reservierung");
}
});
}
function handleCreateNewReservation(answer) {
if (answer.status != "OK") {
2020-11-19 23:14:07 +01:00
alert("Fehler: " + answer.msg);
2020-11-19 22:47:44 +01:00
return;
} else {
var emailToField = $("#emailtofield").val();
if ((emailToField != "") & & emailIsPossible) {
$.mobile.changePage("#sentemail-page");
} else {
resetFields();
2020-11-19 23:13:57 +01:00
alert(RES_CREATED_OK[lang]);
2020-11-19 22:47:44 +01:00
}
$("#cancelemailsentbtn").off("click").on("click", function (e) {
e.stopImmediatePropagation();
2020-11-19 23:13:57 +01:00
e.preventDefault();
2020-11-19 22:47:44 +01:00
resetFields();
$.mobile.changePage("#res-page");
});
$("#sendemailbtn").off("click").on("click", function (e) {
e.stopImmediatePropagation();
2020-11-19 23:13:57 +01:00
e.preventDefault();
2020-11-19 22:47:44 +01:00
resetFields();
var data = {
2020-11-19 23:13:57 +01:00
to: $("#emailtofield").val(),
2020-11-19 22:47:44 +01:00
msg: $("#emailfield").val()
};
doAjax("POST","php/contenthandler.php?module=reservation&command=emailConfirmReservation",data,handleEmailSendResult,"Emailbestätigung");
});
2020-11-19 23:12:37 +01:00
displayTodaySchedule($("#res-page").data("date"));
2020-11-19 22:47:44 +01:00
}
}
function handleEmailSendResult(result) {
if (result == "OK") {
resetFields();
$.mobile.changePage("#res-page");
} else {
alert("Fehler: Email konnte nicht versandt werden.");
}
}
function resetFields() {
$("#guestname").val("");
$("#email").val("");
2020-11-19 23:13:57 +01:00
$("#timefieldmin").val(0);
$("#timefieldmin").selectmenu().selectmenu('refresh', true);
2020-11-19 22:47:44 +01:00
$("#durationse").val(2);
2020-11-19 23:13:57 +01:00
$("#durationse").selectmenu().selectmenu('refresh', true);
$("#noofguestse").val("");
$("#durationmin").val(0);
$("#durationmin").selectmenu().selectmenu('refresh', true);
2020-11-19 22:47:44 +01:00
$("#telno").val("");
$("#remark").val("");
$("#newresbox").trigger("create");
}
function handleChangedReservation(answer) {
if (answer.status != "OK") {
2020-11-19 23:14:07 +01:00
alert("Fehler " + ": " + answer.msg);
2020-11-19 22:47:44 +01:00
return;
} else {
2020-11-19 23:12:37 +01:00
setTimeout(function(){document.location.href = "reservation.html";},500);
2020-11-19 22:47:44 +01:00
}
}
2020-11-19 23:12:37 +01:00
function getTableName(roomid,tableid) {
var tablename = "";
if ((tableid >= 0) & & (roomid >= 0)) {
var abbr = tableoverview[roomid].roomabbreviation;
if (abbr != "") {
tablename = abbr + "-";
}
var tables = tableoverview[roomid].tables;
for (var i=0;i< tables.length ; i + + ) {
var aTable = tables[i];
if (aTable.id == tableid) {
tablename += aTable.tablename;
break;
}
}
}
return tablename;
}
2020-11-19 22:47:44 +01:00
2020-11-19 23:13:57 +01:00
function updateTableOfReservationsByTables(reservations) {
2020-11-19 23:14:07 +01:00
var date = new Date();
if (viewdate != null) {
date = viewdate.getDate();
}
var dateAsText = date.getDate() + "." + (date.getMonth() +1 ) + "." + date.getFullYear();
$("#dateofreservations").html(dateAsText);
2020-11-19 23:13:57 +01:00
var restable = new ReservationsTable();
2020-11-19 23:12:37 +01:00
2020-11-19 23:13:57 +01:00
var startDisplayHour = $("#range-starthour").val();
var endDisplayHour = $("#range-endhour").val();
var tableHtml = restable.layoutTable(startDisplayHour,endDisplayHour,reservations,reservationitem);
$("#restablearea").html(tableHtml);
}
function getResWithId(id) {
for (var i=0;i< resofselecteddate.length ; i + + ) {
var allReservationsOfATable = resofselecteddate[i].reservations;
for (var j=0;j< allReservationsOfATable.length ; j + + ) {
var aRes = allReservationsOfATable[j];
if (aRes.id == id) {
return aRes;
2020-11-19 22:47:44 +01:00
}
}
2020-11-19 23:12:37 +01:00
}
2020-11-19 23:13:57 +01:00
return null;
2020-11-19 23:12:37 +01:00
}
function insertReservations(answer) {
if (answer.status != "OK") {
alert("Fehler " + answer.code + ": " + answer.msg);
return;
} else {
tableoverview = answer.tableoverview;
fillRoomList("tablespecinforoomarea","roomselect","tablespecinfotablearea","tableselect",null,null);
2020-11-19 23:13:57 +01:00
//var res = answer.msg.bytimes;
//$("#res-page").data("res",res);
2020-11-19 23:12:37 +01:00
var resbytables = answer.msg.bytables;
2020-11-19 23:13:57 +01:00
resofselecteddate = resbytables;
2020-11-19 23:12:37 +01:00
$("#res-page").data("resbytables",resbytables);
2020-11-19 22:47:44 +01:00
2020-11-19 23:13:57 +01:00
updateTableOfReservationsByTables(resbytables);
bindTimeRangeSliders();
bindPrintBtn();
bindClickResItem();
bindCustomerField();
2020-11-19 22:47:44 +01:00
}
}
2020-11-19 23:13:57 +01:00
function bindPrintBtn() {
$("#printsummary").off("click").on("click", function (e) {
e.stopImmediatePropagation();
e.preventDefault();
window.print();
});
2020-11-19 22:47:44 +01:00
}
2020-11-19 23:13:57 +01:00
function bindTimeRangeSliders() {
$("#range-starthour").off("slidestop").on("slidestop", function (e) {
e.stopImmediatePropagation();
e.preventDefault();
displayTodaySchedule($("#res-page").data("date"));
});
$("#range-endhour").off("slidestop").on("slidestop", function (e) {
e.stopImmediatePropagation();
e.preventDefault();
displayTodaySchedule($("#res-page").data("date"));
2020-11-19 22:47:44 +01:00
});
}
2020-11-19 23:02:08 +01:00
function bindCustomerField() {
$("#customer").off("keyup").on("keyup", function (e) {
startCusSearch();
});
}
function startCusSearch() {
var cusdata = { search: $("#customer").val().trim() }
doAjax("POST","php/contenthandler.php?module=customers& command=getCustomersForReserv",cusdata, handleGetCustomerResult, "Kundenabfrage unmöglich",true);
}
function handleGetCustomerResult(answer) {
if (answer.status != "OK") {
alert("Error: " + answer.msg);
return;
}
filteredCustomers = answer.msg;
var txt = '< ul data-role = "listview" id = "cuslist" data-divider-theme = "a" data-inset = "true" > ';
txt += '< li data-role = "list-divider" data-theme = "b" data-role = "heading" > ' + RES_CUSTOMERS[lang] + '< / li > ';
if (filteredCustomers.length === 0) {
txt += '< li id = "nocusentry" data-theme = "d" data-icon = "" > < a href = "#" > ' + RES_NO_CUS_FOUND[lang] + '< / a > < / li > ';
} else {
for (var i=0;i< filteredCustomers.length ; i + + ) {
var aCus = filteredCustomers[i];
txt += '< li id = "cus_' + aCus.id + '" data-theme = "f" data-icon = "" class = "cuslistelem" > < a href = "#" > ' + toHtml(aCus.summary) + '< / a > < / li > ';
}
}
txt += '< / ul > ';
$("#customerlist").html(txt);
$("#customerlist").trigger("create");
bindCusElem();
}
function bindCusElem() {
$(".cuslistelem").off("click").on("click", function (e) {
e.stopImmediatePropagation();
e.preventDefault();
var cusid = this.id.split("_")[1];
for (var i=0;i< filteredCustomers.length ; i + + ) {
var aCus = filteredCustomers[i];
if (aCus.id == cusid) {
$("#guestname").val(aCus.name);
$("#email").val(aCus.email);
$("#telno").val(aCus.phone);
$("#customer").val("");
$("#customerlist").html('');
}
}
});
}
2020-11-19 22:47:44 +01:00
function bindCancelButtn() {
$("#cancelbtn").off("click").on("click", function (e) {
e.stopImmediatePropagation();
2020-11-19 23:12:37 +01:00
e.preventDefault();
2020-11-19 23:14:07 +01:00
var date = viewdate.getDate();
2020-11-19 23:12:37 +01:00
var day = date.getDate();
var month = date.getMonth() + 1;
var year = date.getFullYear();
var dateStr = year + "-" + month + "-" + day;
2020-11-19 23:24:09 +01:00
setTimeout(function(){document.location.href = "reservation.html?v=2.0.11& date=" + dateStr;},500);
2020-11-19 22:47:44 +01:00
});
}
2020-11-19 23:12:37 +01:00
function openEditPageForRes(res) {
$("#changeres-page").data("id",res.id);
var day = res.day;
var month = parseInt(res.month)-1;
var year = res.year;
2020-11-19 23:13:57 +01:00
var startHour = res.starthour;
var startMin = res.startmin;
var durationhours = res.durationhours;
var durationmins = res.durationmins;
2020-11-19 23:12:37 +01:00
var name = res.guest;
var email = res.email;
var noOfGuests = res.persons;
var phone = res.phone;
var remark = res.remark;
var roomid = res.roomid;
var tableid = res.tableid;
if (tableid < 0 ) {
roomid = -1;
}
var changeDate = new Date(year, month, day, 0,0,0,0);
2020-11-19 23:14:07 +01:00
chgviewdate.setDate(changeDate);
2020-11-19 23:12:37 +01:00
2020-11-19 23:13:57 +01:00
$("#ctimefieldse").val(startHour);
$("#ctimefieldmin").val(startMin);
2020-11-19 23:12:37 +01:00
$("#cnoofguestse").val(noOfGuests);
2020-11-19 23:13:57 +01:00
$("#cdurationse").val(durationhours);
$("#cdurationmin").val(durationmins);
2020-11-19 23:12:37 +01:00
$("#cguestname").val(name);
$("#cemail").val(email);
$("#ctelno").val(phone);
$("#cremark").val(remark);
fillRoomList("ctablespecinforoomarea","croomselect","ctablespecinfotablearea","ctableselect",roomid,tableid);
$("#clastcreator").html("< i > " + toHtml(res.creator) + "< / i > ");
$("#clastchanged").html("< i > " + toHtml(res.creationdate) + "< / i > ");
bindDlgChangeBtn();
bindDlgDelBtn();
$.mobile.changePage("#changeres-page");
}
2020-11-19 23:13:57 +01:00
function bindClickResItem() {
$(".resitem").off("click").on("click", function (e) {
2020-11-19 22:47:44 +01:00
var resid = ((this.id).split("_"))[1];
2020-11-19 23:13:57 +01:00
openEditPageForRes(getResWithId(resid));
2020-11-19 23:12:37 +01:00
});
}
2020-11-19 23:12:59 +01:00
function bindHtmlReportButton() {
$("#htmlreportbtn").off("click").on("click", function (e) {
e.stopImmediatePropagation();
e.preventDefault();
2020-11-19 23:14:07 +01:00
var date = viewdate.getDate();
2020-11-19 23:12:59 +01:00
var getParam = "day=" + date.getDate() + "& month=" + (date.getMonth() + 1) + "& year=" + date.getFullYear();
window.open("php/contenthandler.php?module=reservation& command=reservationsAsHtml& " + getParam,'_blank');
});
}
2020-11-19 23:12:37 +01:00
function bindChangeResByTableButton() {
$(".schtablebtn").off("click").on("click", function (e) {
var resid = ((this.id).split("_"))[1];
var allRes = $("#res-page").data("resbytables");
var theRes = null;
for (var i=0;i< allRes.length ; i + + ) {
var tableReservations = allRes[i].reservations;
for (var j=0;j< tableReservations.length ; j + + ) {
var aRes = tableReservations[j];
if (aRes.id == resid) {
theRes = aRes;
break;
}
}
}
if (theRes != null) {
openEditPageForRes(theRes);
}
2020-11-19 22:47:44 +01:00
});
}
function bindDlgChangeBtn() {
$("#changebtn").off("click").on("click", function (e) {
e.stopImmediatePropagation();
2020-11-19 23:12:37 +01:00
e.preventDefault();
2020-11-19 23:13:57 +01:00
var startHour = $("#ctimefieldse").val();
var startMin = $("#ctimefieldmin").val();
2020-11-19 22:47:44 +01:00
var persons = $("#cnoofguestse").val();
2020-11-19 23:13:57 +01:00
var durationHours = $("#cdurationse").val();
var durationMins = $("#cdurationmin").val();
2020-11-19 22:47:44 +01:00
var guestname = $("#cguestname").val();
var email = $("#cemail").val();
var phone = $("#ctelno").val();
var remark = $("#cremark").val();
2020-11-19 23:12:37 +01:00
var roomkeys = Object.keys(tableoverview);
var roomid = -1;
var tableid = -1;
if (roomkeys.length == 0) {
tableid = -1;
} else if (roomkeys.length == 1) {
roomid = roomkeys[0];
tableid = $("#ctableselect").val();
} else {
roomid = $("#croomselect").val();
tableid = -1;
if (roomid >= 0) {
tableid = $("#ctableselect").val();
}
}
2020-11-19 23:14:07 +01:00
var date = chgviewdate.getDate();
2020-11-19 22:47:44 +01:00
var id = $("#changeres-page").data("id");
var data = {
id: id,
day: date.getDate(),
month: (date.getMonth() + 1),
year: date.getFullYear(),
2020-11-19 23:13:57 +01:00
starthour: startHour,
startmin: startMin,
2020-11-19 22:47:44 +01:00
name: guestname,
email: email,
2020-11-19 23:13:57 +01:00
durationhours: durationHours,
durationmins: durationMins,
2020-11-19 22:47:44 +01:00
persons: persons,
phone: phone,
2020-11-19 23:12:37 +01:00
remark: remark,
tableid: tableid
2020-11-19 22:47:44 +01:00
};
doAjax("POST","php/contenthandler.php?module=reservation&command=changeReservation",data,handleChangedReservation,"Reservierung");
});
}
function bindDlgDelBtn() {
$("#delbtn").off("click").on("click", function (e) {
e.stopImmediatePropagation();
2020-11-19 23:12:37 +01:00
e.preventDefault();
2020-11-19 22:47:44 +01:00
var id = $("#changeres-page").data("id");
doAjax("POST","php/contenthandler.php?module=reservation& command=delReservation",{ id: id },handleChangedReservation,"Reservierung");
});
}
$(document).on("pageinit", "#res-page", function () {
initializeMainMenu("#modulemenu");
hideMenu();
$.ajaxSetup({ cache: false });
$("#res-page").data("date",new Date());
getGeneralConfigItems();
2020-11-19 23:12:37 +01:00
displaySpecificDateSchedule();
2020-11-19 22:47:44 +01:00
bindNewReservationBtn();
2020-11-19 23:14:07 +01:00
bindBlockDayBtn();
2020-11-19 22:47:44 +01:00
2020-11-19 23:13:57 +01:00
bindClickResItem();
2020-11-19 22:47:44 +01:00
bindCancelButtn();
var currentHour = String(new Date().getHours());
$("#timefieldse").val(currentHour);
2020-11-19 23:13:57 +01:00
$("#timefieldse").selectmenu().selectmenu('refresh', true);
$("#timefieldmin").val(0);
$("#timefieldmin").selectmenu().selectmenu('refresh', true);
$("#durationse").val(2);
$("#durationse").selectmenu().selectmenu('refresh', true);
$("#durationmin").val(0);
$("#durationmin").selectmenu().selectmenu('refresh', true);
2020-11-19 23:02:08 +01:00
$("#customer").val("");
2020-11-19 23:13:57 +01:00
$("#noofguestse").val("");
$("#guestname").val("");
$("#email").val("");
$("#telno").val("");
$("#remark").val("");
2020-11-19 23:14:07 +01:00
$("#blockremark").val("");
2020-11-19 22:47:44 +01:00
});
$(document).on("pagebeforeshow", "#changeres-page", function () {
if (lang < 0 ) {
2020-11-19 23:14:07 +01:00
setTimeout(function(){document.location.href = "reservation.html?";},500);
2020-11-19 22:47:44 +01:00
} else {
2020-11-19 23:13:57 +01:00
$("#ctimefieldse").selectmenu().selectmenu('refresh', true);
$("#ctimefieldmin").selectmenu().selectmenu('refresh', true);
$("#cdurationse").selectmenu().selectmenu('refresh', true);
$("#cdurationmin").selectmenu().selectmenu('refresh', true);
2020-11-19 22:47:44 +01:00
}
});
2020-11-19 22:48:24 +01:00
2020-11-19 23:12:37 +01:00
function fillRoomList(roomsectionid,roomselectid,tablesectionid,tableselectid,selectedRoomid,selectedTableid) {
var roomkeys = Object.keys(tableoverview);
if (roomkeys.length > 1) {
var txt = '< label for = "' + roomselectid + '" > ' + RES_ROOM[lang] + ':< / label > ';
txt += "< SELECT id = '" + roomselectid + "' > ";
txt += "< option value = '-1' > -< / option > ";
for (var i=0;i< roomkeys.length ; i + + ) {
var aRoomKey = roomkeys[i];
var aRoom = tableoverview[aRoomKey];
var selected = "";
if (aRoom.roomid == selectedRoomid) {
selected = " selected";
}
txt += "< option value = '" + aRoom.roomid + "' " + selected + " > " + toHtml(aRoom.roomname) + "< / option > ";
}
txt += "< / SELECT > ";
$("#" + roomsectionid).html(txt);
$("#" + roomsectionid).trigger("create");
fillTableList(roomselectid,tablesectionid,tableselectid,selectedTableid);
bindRoomSelect(roomsectionid,roomselectid,tablesectionid,tableselectid,selectedTableid);
} else {
fillTableList(roomselectid,tablesectionid,tableselectid,selectedTableid);
}
}
function fillTableList(roomsectionid,tablesectionid,tableselectid,selectedTableid) {
var roomkeys = Object.keys(tableoverview);
var allowNoTableToSelect = false;
var roomid = null;
if (roomkeys.length == 0) {
return;
} else if (roomkeys.length == 1) {
allowNoTableToSelect = true;
roomid = roomkeys[0]
} else {
roomid = $("#" + roomsectionid).val();
}
var txt = "";
if (roomid >= 0) {
var tables = tableoverview[roomid]["tables"];
txt += '< label for = "' + tableselectid + '" > ' + RES_TABLE[lang] + ':< / label > ';
txt += "< SELECT id = '" + tableselectid + "' > ";
if (allowNoTableToSelect) {
txt += "< option value = '-1' > -< / option > ";
}
for (var i=0;i< tables.length ; i + + ) {
var aTable = tables[i];
var selected = "";
if (aTable.id == selectedTableid) {
selected = " selected";
}
txt += "< option value = '" + aTable.id + "' " + selected + " > " + toHtml(aTable.tablename) + "< / option > ";
}
txt += "< / SELECT > ";
}
$("#" + tablesectionid).html(txt);
$("#" + tablesectionid).trigger("create");
}
function bindRoomSelect(roomsectionid,roomselectid,tablesectionid,tableselectid,selectedTableid) {
$("#" + roomsectionid).off("change").on("change", function (e) {
e.stopImmediatePropagation();
e.preventDefault();
var selectedRoomid = $("#" + roomselectid).val();
selectedTableid = null;
fillRoomList(roomsectionid,roomselectid,tablesectionid,tableselectid,selectedRoomid,selectedTableid);
});
}
2020-11-19 22:47:44 +01:00
< / script >
2020-11-19 23:11:29 +01:00
< div data-role = "page" id = "res-page" data-theme = "c" >
2020-11-19 22:47:44 +01:00
< div data-role = "panel" id = "modulepanel" data-position = "right" data-display = "overlay" >
< ul data-role = "listview" id = "modulemenu" data-divider-theme = "a" data-inset = "true" >
2020-11-19 23:14:07 +01:00
< li data-role = "list-divider" data-theme = "b" > Hauptmenü< / li >
2020-11-19 22:47:44 +01:00
< / ul >
< / div > <!-- /panel -->
2020-11-19 23:11:29 +01:00
< div data-role = "header" data-theme = "b" data-position = "fixed" id = "theheader" style = "background-color:black;" >
2020-11-19 23:14:48 +01:00
< h1 > < span id = "restitletxt" > Reservierung< / span > < img src = "img/connection.png" class = "connectionstatus" style = "display:none;" / > < img src = "img/printerstatus.png" class = "printerstatus" style = "display:none;" / > < img src = "img/tsestatus.png" class = "tsestatus" style = "display:none;" / > < img src = "img/tasksstatus.png" class = "tasksstatus" style = "display:none;" / > < / h1 >
2020-11-19 22:47:44 +01:00
< div data-type = "horizontal" style = "top:0px;position:absolute;float:right;z-index:10;display:inline;" align = "right" class = "ui-btn-right" >
2020-11-19 23:02:16 +01:00
< a href = "#" data-role = "button" data-icon = "arrow-d" data-ajax = "false" id = "menuswitch" > < span id = "modulstxt2" > Hauptmenü< / span > < / a >
2020-11-19 22:47:44 +01:00
< / div >
< / div >
< div data-role = "content" id = "fullcontent" >
2020-11-19 23:14:07 +01:00
< div id = "viewdatepart" data-role = "fieldcontain" style = "height:50px;" >
< input data-role = "date" data-inline = "true" type = "text" id = "viewdate" data-theme = "d" >
< div id = "viewdatemonth" class = "daypicker" >
Month Overlay
< / div >
2020-11-19 22:47:44 +01:00
< / div >
2020-11-19 23:14:07 +01:00
< div id = "newresbox" data-role = "collapsible" data-theme = "c" data-content-theme = "c" data-collapsed = "true" style = "display:none;" >
2020-11-19 22:47:44 +01:00
< h3 > < span id = "newresboxtxt" > Neue Reservierung< / span > < / h3 >
< form >
2020-11-19 23:13:57 +01:00
< span id = "starttimetxt" class = "headerformat" > Start-Uhrzeit< / span > :
< div data-role = "fieldcontain" >
< label for = "timefieldse" > < span id = datehourtxt > Stunde< / span > : < / label >
< select name = "timefieldse" id = "timefieldse" data-theme = "a" >
< option value = "0" > 0< / option >
< option value = "1" > 1< / option >
< option value = "2" > 2< / option >
< option value = "3" > 3< / option >
< option value = "4" > 4< / option >
< option value = "5" > 5< / option >
< option value = "6" > 6< / option >
< option value = "7" > 7< / option >
< option value = "8" > 8< / option >
< option value = "9" > 9< / option >
< option value = "10" > 10< / option >
< option value = "11" > 11< / option >
< option value = "12" > 12< / option >
< option value = "13" > 13< / option >
< option value = "14" > 14< / option >
< option value = "15" > 15< / option >
< option value = "16" > 16< / option >
< option value = "17" > 17< / option >
< option value = "18" > 18< / option >
< option value = "19" > 19< / option >
< option value = "20" > 20< / option >
< option value = "21" > 21< / option >
< option value = "22" > 22< / option >
< option value = "23" > 23< / option >
< / select >
< / div >
< div data-role = "fieldcontain" >
< label for = "timefieldmin" > < span id = datemintxt > Minute< / span > : < / label >
< select name = "timefieldmin" id = "timefieldmin" data-theme = "a" >
< option value = "0" > 0< / option >
< option value = "15" > 15< / option >
< option value = "30" > 30< / option >
< option value = "45" > 45< / option >
< / select >
< / div >
< span id = "durationheadertxt" class = "headerformat" > Dauer< / span > :
< div data-role = "fieldcontain" >
< label for = "durationse" > < span id = "durationhourtxt" > Stunden< / span > : < / label >
< select name = "durationse" id = "durationse" data-theme = "a" >
< option value = "0" > 0< / option >
< option value = "1" > 1< / option >
< option value = "2" selected > 2< / option >
< option value = "3" > 3< / option >
< option value = "4" > 4< / option >
< option value = "5" > 5< / option >
< option value = "6" > 6< / option >
< option value = "7" > 7< / option >
< option value = "8" > 8< / option >
< option value = "9" > 9< / option >
< option value = "10" > 10< / option >
< option value = "11" > 11< / option >
< option value = "12" > 12< / option >
< / select >
< / div > <!-- fieldcontain for duration hour -->
< div data-role = "fieldcontain" >
< label for = "durationmin" > < span id = "durationmintxt" > Minuten< / span > : < / label >
< select name = "durationmin" id = "durationmin" data-theme = "a" >
< option value = "0" selected > 0< / option >
< option value = "15" > 15< / option >
< option value = "30" > 30< / option >
< option value = "45" > 45< / option >
< / select >
2020-11-19 22:47:44 +01:00
2020-11-19 23:13:57 +01:00
< / div > <!-- fieldcontain for duration min -->
2020-11-19 22:47:44 +01:00
2020-11-19 23:13:57 +01:00
< span id = "guestheadertxt" class = "headerformat" > Gästeinformation< / span > :
2020-11-19 22:47:44 +01:00
< div data-role = "fieldcontain" >
2020-11-19 23:13:57 +01:00
< label for = "noofguestse" > < span id = "personstxt" > Anzahl Gäste< / span > : < / label >
< input data-wrapper-class = "shortfield" type = "text" name = "noofguestse" id = "noofguestse" class = "whiteinput" / >
2020-11-19 22:47:44 +01:00
< / div > <!-- fieldcontain for number of guests -->
< div data-role = "fieldcontain" >
2020-11-19 23:13:57 +01:00
< label for = "customer" style = "width: 100%;" > < span id = "customertxt" > Kunde< / span > : < / label >
2020-11-19 23:11:29 +01:00
< input type = "text" id = "customer" class = "reservationinputfield whiteinput" value = "" data-mini = "true" placeholder = "Name / Telefon" / >
2020-11-19 23:02:08 +01:00
< / div > <!-- fieldcontain name -->
< div id = "customerlist" > < / div >
< p id = "reshintchoosecustomer" > Oder manuell eingeben:
< p > < div data-role = "fieldcontain" >
2020-11-19 23:13:57 +01:00
< label for = "guestname" style = "width: 100%;" > < span id = "nametxt" > Name< / span > : < / label >
2020-11-19 23:11:29 +01:00
< input type = "text" id = "guestname" class = "reservationinputfield whiteinput" value = "" data-mini = "true" / >
2020-11-19 22:47:44 +01:00
< / div > <!-- fieldcontain name -->
< div data-role = "fieldcontain" >
2020-11-19 23:13:57 +01:00
< label for = "email" style = "width: 100%;" > < span id = "emailtxt" > Email< / span > : < / label >
2020-11-19 23:11:29 +01:00
< input type = "text" id = "email" class = "reservationinputfield whiteinput" value = "" data-mini = "true" / >
2020-11-19 22:47:44 +01:00
< / div > <!-- fieldcontain name -->
< div data-role = "fieldcontain" >
2020-11-19 23:13:57 +01:00
< label for = "telno" style = "width: 100%;" > < span id = "teltxt" > Telefon< / span > : < / label >
2020-11-19 23:11:29 +01:00
< input type = "text" id = "telno" class = "reservationinputfield whiteinput" value = "" data-mini = "true" / >
2020-11-19 22:47:44 +01:00
< / div > <!-- fieldcontain name -->
< div data-role = "fieldcontain" >
2020-11-19 23:13:57 +01:00
< label for = "remark" style = "width: 100%;" > < span id = "remarktxt" > Notiz< / span > : < / label >
2020-11-19 23:11:29 +01:00
< input type = "text" id = "remark" class = "reservationinputfield whiteinput" value = "" data-mini = "true" / >
2020-11-19 22:47:44 +01:00
< / div > <!-- fieldcontain name -->
2020-11-19 23:12:37 +01:00
< div id = "tableinfo" data-role = "collapsible" data-theme = "c" data-content-theme = "e" data-collapsed = "true" >
< h3 > < span id = "tablespecheadertxt" > Tischang.< / span > < / h3 >
< div id = "tablespecinforoomarea" > < / div >
< div id = "tablespecinfotablearea" > < / div >
< / div >
2020-11-19 22:47:44 +01:00
< a href = "#" data-role = "button" data-theme = "f" id = "newbtn" > < span id = "newtxt" > Neu< / span > < / a >
< / form >
< div id = emailinfo style = "text-align:center;" > < / div >
< / div > <!-- newresbox -->
2020-11-19 23:14:07 +01:00
< div id = "cautionarea" style = "display:none;" >
< img src = "img/caution.png" style = "height:50px;" / > < span id = "cautioninfo" > Achtung< / span >
< / div >
2020-11-19 22:47:44 +01:00
< br >
2020-11-19 23:12:37 +01:00
2020-11-19 23:13:57 +01:00
< div id = "resoverview" data-role = "collapsible" data-theme = "c" data-content-theme = "c" data-collapsed = "false" >
< h3 > < span id = "resbytimesofdaytxt" > Reservierungen< / span > < span id = "dateofreservations" > Datum< / span > < / h3 >
< div id = "restablearea" > < / div >
< div id = "timeperiodsliderform" >
< p > < form >
< div data-role = "rangeslider" >
< label for = "range-starthour" > < span class = "timeperiodslider" > Zeitr.< / span > :< / label >
2020-11-19 23:14:07 +01:00
< input name = "range-starthour" id = "range-starthour" min = "0" max = "23" value = "9" type = "range" >
2020-11-19 23:13:57 +01:00
< label for = "range-endhour" > < span class = "timeperiodslider" > Zeitr.< / span > :< / label >
< input name = "range-endhour" id = "range-endhour" min = "1" max = "24" value = "18" type = "range" >
< / div >
< / form >
< / div >
2020-11-19 23:14:07 +01:00
< p / > < button type = "submit" data-theme = "f" data-icon = "check" id = "printsummary" > Drucken< / button >
< / div >
< div id = "blockarea" data-role = "collapsible" data-theme = "c" data-content-theme = "c" data-collapsed = "true" >
< h3 > < span id = "blockareaheadertxt" > Blocken< / h3 >
< div id = "blockpart" >
< input id = "blockremark" type = "text" placeholder = "Bemerkung für Blocken" class = "whiteinput" / >
< p > < button id = "blockdaybtn" data-theme = "b" > < span id = "blockdaybtntxt" > Block< / span > < / button >
< / div >
< div id = "releasepart" >
< button id = "releasedaybtn" data-theme = "f" > < span id = "releasedaybtntxt" > Freigabe< / span > < / button >
< / div >
< / div >
2020-11-19 23:12:37 +01:00
< / div > <!-- resbytimes -->
2020-11-19 23:13:57 +01:00
2020-11-19 22:47:44 +01:00
< / div >
2020-11-19 23:11:29 +01:00
< div data-role = "footer" data-theme = "b" id = "thefooterr" style = "background-color:black;" >
2020-11-19 22:47:44 +01:00
< div class = "ui-grid-a" >
< div class = "ui-block-a userinfo" id = "loggedinuser" > < / div >
< div class = "ui-block-b grid_right" id = "versioninfo" > < / div >
< / div > <!-- /grid - a -->
< / div > <!-- footer -->
< div data-role = "page" id = "sentemail-page" > <!-- second page -->
< div data-role = "header" data-theme = "b" data-position = "fixed" id = "ctheheader" >
< h1 > < span id = "emailtitletxt" > Emailbestätigung< / span > < / h1 >
< / div >
< div data-role = "content" >
< form >
< div data-role = "fieldcontain" >
< label for = "emailfield" > Email:< / label >
2020-11-19 23:11:29 +01:00
< textarea cols = "40" rows = "8" name = "emailfield" id = "emailfield" style = "background-color: white; color:black;" > < / textarea >
2020-11-19 22:47:44 +01:00
< / div >
< div data-role = "fieldcontain" >
< label for = "emailtofield" > < span id = "sendemailtotxt" > An< / span > :< / label >
2020-11-19 23:11:29 +01:00
< input type = "text" id = "emailtofield" style = "background-color: white; color:black;" value = "" data-mini = "true" disabled / >
2020-11-19 22:47:44 +01:00
< / div >
2020-11-19 23:13:57 +01:00
< p / >
2020-11-19 22:47:44 +01:00
< fieldset class = "ui-grid-a" id = "changecancelarea" >
< div class = "ui-block-a" > < button type = "submit" data-theme = "d" class = "cancelButton" data-icon = "back" id = "cancelemailsentbtn" > < span id = "cancelemailbtntxt" > Nicht senden< / span > < / button > < / div >
< div class = "ui-block-b" > < button type = "submit" data-theme = "f" class = "applyButton" data-icon = "check" id = "sendemailbtn" > < span id = "sendemailtxtbtn" > Senden< / span > < / button > < / div >
< / fieldset >
< / form >
< / div > <!-- content -->
< / div > <!-- page for email sending -->
< div data-role = "page" id = "changeres-page" > <!-- second page -->
< div data-role = "header" data-theme = "b" data-position = "fixed" id = "ctheheader" >
< h1 > < span id = "reschangetitletxt" > Reservierung ändern< / span > < / h1 >
< / div >
< div data-role = "content" >
< div id = "cnewresbox" data-role = "collapsible" data-theme = "c" data-content-theme = "c" data-collapsed = "false" >
< h3 > < span id = "cnewresboxtxt" > Reservierung ändern< / span > < / h3 >
< form >
< div data-role = "fieldcontain" >
< p > < span id = "clastcreatortxt" > Letzte Änderung von< / span > : < span id = "clastcreator" > < / span > < / p >
< p > < span id = "clastchangetxt" > zuletzt geändert< / span > : < span id = "clastchanged" > < / span > < / p >
2020-11-19 23:13:57 +01:00
2020-11-19 23:14:07 +01:00
< div id = "chgviewdatepart" data-role = "fieldcontain" style = "height:50px;" >
< input data-role = "date" data-inline = "true" type = "text" id = "chgviewdate" data-theme = "d" >
< div id = "chgviewdatemonth" class = "daypicker" >
Month Overlay
< / div >
< / div >
2020-11-19 22:47:44 +01:00
2020-11-19 23:14:07 +01:00
< span id = "cstarttimetxt" class = "headerformat" > Start-Uhrzeit< / span > :
2020-11-19 23:13:57 +01:00
< label for = "ctimefieldse" > < span id = "cstarttimehourtxt" > Start-Uhrzeit< / span > : < / label >
< select name = "ctimefieldse" id = "ctimefieldse" data-theme = "a" >
2020-11-19 22:47:44 +01:00
< option value = "0" > 0< / option >
< option value = "1" > 1< / option >
< option value = "2" > 2< / option >
< option value = "3" > 3< / option >
< option value = "4" > 4< / option >
< option value = "5" > 5< / option >
< option value = "6" > 6< / option >
< option value = "7" > 7< / option >
< option value = "8" > 8< / option >
< option value = "9" > 9< / option >
< option value = "10" > 10< / option >
< option value = "11" > 11< / option >
< option value = "12" > 12< / option >
< option value = "13" > 13< / option >
< option value = "14" > 14< / option >
< option value = "15" > 15< / option >
< option value = "16" > 16< / option >
< option value = "17" > 17< / option >
< option value = "18" > 18< / option >
< option value = "19" > 19< / option >
< option value = "20" > 20< / option >
< option value = "21" > 21< / option >
< option value = "22" > 22< / option >
< option value = "23" > 23< / option >
< / select >
< / div > <!-- fieldcontain for start time -->
< div data-role = "fieldcontain" >
2020-11-19 23:13:57 +01:00
< label for = "ctimefieldmin" > < span id = cdatemintxt > Minute< / span > : < / label >
< select name = "ctimefieldmin" id = "ctimefieldmin" data-theme = "a" >
< option value = "0" > 0< / option >
< option value = "15" > 15< / option >
< option value = "30" > 30< / option >
< option value = "45" > 45< / option >
2020-11-19 22:47:44 +01:00
< / select >
2020-11-19 23:13:57 +01:00
< / div >
< span id = "cdurationheadertxt" class = "headerformat" > Dauer< / span > :
< div data-role = "fieldcontain" >
< label for = "cdurationse" > < span id = "cdurationhourtxt" > Stunden< / span > : < / label >
< select name = "cdurationse" id = "cdurationse" data-theme = "a" >
< option value = "0" > 0< / option >
< option value = "1" > 1< / option >
< option value = "2" selected > 2< / option >
< option value = "3" > 3< / option >
< option value = "4" > 4< / option >
< option value = "5" > 5< / option >
< option value = "6" > 6< / option >
< option value = "7" > 7< / option >
< option value = "8" > 8< / option >
< option value = "9" > 9< / option >
< option value = "10" > 10< / option >
< option value = "11" > 11< / option >
< option value = "12" > 12< / option >
< / select >
< / div > <!-- fieldcontain for duration hour -->
< div data-role = "fieldcontain" >
< label for = "cdurationmin" > < span id = "cdurationmintxt" > Minuten< / span > : < / label >
< select name = "cdurationmin" id = "cdurationmin" data-theme = "a" >
< option value = "0" selected > 0< / option >
< option value = "15" > 15< / option >
< option value = "30" > 30< / option >
< option value = "45" > 45< / option >
< / select >
< / div > <!-- fieldcontain for duration min -->
2020-11-19 22:47:44 +01:00
2020-11-19 23:13:57 +01:00
< span id = "guestheadertxt" class = "headerformat" > Gästeinformation< / span > :
2020-11-19 22:47:44 +01:00
< div data-role = "fieldcontain" >
2020-11-19 23:13:57 +01:00
< label for = "cnoofguestse" > < span id = "cpersonstxt" > Anzahl Gäste< / span > : < / label >
< input data-wrapper-class = "shortfield" type = "text" name = "cnoofguestse" id = "cnoofguestse" class = "whiteinput" / >
2020-11-19 22:47:44 +01:00
< / div > <!-- fieldcontain for number of guests -->
< div data-role = "fieldcontain" >
< label for = "cguestname" class = "select" style = "width: 200px;" > < span id = "cnametxt" > Name< / span > : < / label >
2020-11-19 23:11:29 +01:00
< input type = "text" id = "cguestname" class = "reservationinputfield whiteinput" value = "" data-mini = "true" / >
2020-11-19 22:47:44 +01:00
< / div > <!-- fieldcontain cguestname -->
< div data-role = "fieldcontain" >
< label for = "cemail" class = "select" style = "width: 200px;" > < span id = "cemailtxt" > Name< / span > : < / label >
2020-11-19 23:11:29 +01:00
< input type = "text" id = "cemail" class = "reservationinputfield whiteinput" value = "" data-mini = "true" / >
2020-11-19 22:47:44 +01:00
< / div > <!-- fieldcontain cemail -->
< div data-role = "fieldcontain" >
< label for = "ctelno" class = "select" style = "width: 200px;" > < span id = "cteltxt" > Telefon< / span > : < / label >
2020-11-19 23:11:29 +01:00
< input type = "text" id = "ctelno" class = "reservationinputfield whiteinput" value = "" data-mini = "true" / >
2020-11-19 22:47:44 +01:00
< / div > <!-- fieldcontain ctelno -->
< div data-role = "fieldcontain" >
< label for = "cremark" class = "select" style = "width: 200px;" > < span id = "cremarktxt" > Notiz< / span > : < / label >
2020-11-19 23:11:29 +01:00
< input type = "text" id = "cremark" class = "reservationinputfield whiteinput" value = "" data-mini = "true" / >
2020-11-19 22:47:44 +01:00
< / div > <!-- fieldcontain cremark -->
2020-11-19 23:12:37 +01:00
< div id = "ctableinfo" data-role = "collapsible" data-theme = "c" data-content-theme = "e" data-collapsed = "true" >
< h3 > < span id = "ctablespecheadertxt" > Tischang.< / span > < / h3 >
< div id = "ctablespecinforoomarea" > < / div >
< div id = "ctablespecinfotablearea" > < / div >
< / div >
2020-11-19 23:14:07 +01:00
< p / >
2020-11-19 22:47:44 +01:00
< fieldset class = "ui-grid-b" id = "changecancelarea" >
< div class = "ui-block-a" > < button type = "submit" data-theme = "d" class = "cancelButton" data-icon = "back" id = "cancelbtn" > < span id = "canceltxt" > Abbruch< / span > < / button > < / div >
< div class = "ui-block-b" > < button type = "submit" data-theme = "f" class = "applyButton" data-icon = "check" id = "changebtn" > < span id = "changedlgbtn" > Ändern< / span > < / button > < / div >
< div class = "ui-block-c" > < button type = "submit" data-theme = "b" class = "applyButton" data-icon = "delete" id = "delbtn" > < span id = "deldlgbtn" > Löschen< / span > < / button > < / div >
< / fieldset >
< / form >
< / div > <!-- newresbox -->
< br >
< / div >
< / div > <!-- second page -->
< / body >
< / html >